From 9b7e13c6e8d6349a9f12e30b6e1d41c7bc20ca0f Mon Sep 17 00:00:00 2001 From: James Henry Date: Fri, 30 Nov 2018 21:09:23 -0500 Subject: [PATCH 01/30] feat: ts 3.2 support (#35) (#37) BREAKING CHANGE: Supported TypeScript version is now 3.2 --- README.md | 2 +- package.json | 4 +- src/ast-node-types.ts | 1 + src/convert.ts | 14 + tests/ast-alignment/fixtures-to-test.ts | 1 + tests/ast-alignment/parse.ts | 7 +- tests/ast-alignment/utils.ts | 4 + .../javascript/bigIntLiterals/binary.src.js | 1 + .../javascript/bigIntLiterals/decimal.src.js | 1 + .../javascript/bigIntLiterals/hex.src.js | 1 + .../javascript/bigIntLiterals/octal.src.js | 1 + tests/lib/__snapshots__/javascript.ts.snap | 388 ++++++++++++++++++ yarn.lock | 14 +- 13 files changed, 426 insertions(+), 13 deletions(-) create mode 100644 tests/fixtures/javascript/bigIntLiterals/binary.src.js create mode 100644 tests/fixtures/javascript/bigIntLiterals/decimal.src.js create mode 100644 tests/fixtures/javascript/bigIntLiterals/hex.src.js create mode 100644 tests/fixtures/javascript/bigIntLiterals/octal.src.js diff --git a/README.md b/README.md index a389fcd..922a49f 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ const astNodeTypes = parser.AST_NODE_TYPES; We will always endeavor to support the latest stable version of TypeScript. -The version of TypeScript currently supported by this parser is `~3.1.1`. This is reflected in the `devDependency` requirement within the package.json file, and it is what the tests will be run against. We have an open `peerDependency` requirement in order to allow for experimentation on newer/beta versions of TypeScript. +The version of TypeScript currently supported by this parser is `~3.2.1`. This is reflected in the `devDependency` requirement within the package.json file, and it is what the tests will be run against. We have an open `peerDependency` requirement in order to allow for experimentation on newer/beta versions of TypeScript. If you use a non-supported version of TypeScript, the parser will log a warning to the console. diff --git a/package.json b/package.json index a1ba511..0bd6640 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ }, "license": "BSD-2-Clause", "devDependencies": { + "@babel/parser": "7.1.6", "@commitlint/cli": "^7.1.2", "@commitlint/config-conventional": "^7.1.2", "@commitlint/travis-cli": "^7.1.2", @@ -29,7 +30,6 @@ "@types/semver": "^5.5.0", "@types/shelljs": "^0.8.0", "babel-code-frame": "6.26.0", - "babylon": "7.0.0-beta.39", "cz-conventional-changelog": "2.1.0", "glob": "7.1.2", "husky": "0.14.3", @@ -41,7 +41,7 @@ "shelljs": "0.8.2", "travis-deploy-once": "^5.0.8", "ts-jest": "^23.10.4", - "typescript": "~3.1.1" + "typescript": "~3.2.1" }, "keywords": [ "ast", diff --git a/src/ast-node-types.ts b/src/ast-node-types.ts index ea3ce8d..35a086f 100644 --- a/src/ast-node-types.ts +++ b/src/ast-node-types.ts @@ -12,6 +12,7 @@ export const AST_NODE_TYPES: { [key: string]: string } = { AssignmentExpression: 'AssignmentExpression', AssignmentPattern: 'AssignmentPattern', AwaitExpression: 'AwaitExpression', + BigIntLiteral: 'BigIntLiteral', BinaryExpression: 'BinaryExpression', BlockStatement: 'BlockStatement', BreakStatement: 'BreakStatement', diff --git a/src/convert.ts b/src/convert.ts index 2204233..efa2ab7 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -2004,6 +2004,20 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { }); break; + case SyntaxKind.BigIntLiteral: { + const raw = ast.text.slice( + (result as any).range[0], + (result as any).range[1] + ); + const value = raw.slice(0, -1); // remove suffix `n` + Object.assign(result, { + type: AST_NODE_TYPES.BigIntLiteral, + raw, + value + }); + break; + } + case SyntaxKind.RegularExpressionLiteral: { const pattern = (node as any).text.slice( 1, diff --git a/tests/ast-alignment/fixtures-to-test.ts b/tests/ast-alignment/fixtures-to-test.ts index 1285ce1..37ebcf3 100644 --- a/tests/ast-alignment/fixtures-to-test.ts +++ b/tests/ast-alignment/fixtures-to-test.ts @@ -141,6 +141,7 @@ let fixturePatternConfigsToTest = [ ] }), + createFixturePatternConfigFor('javascript/bigIntLiterals'), createFixturePatternConfigFor('javascript/binaryLiterals'), createFixturePatternConfigFor('javascript/blockBindings'), diff --git a/tests/ast-alignment/parse.ts b/tests/ast-alignment/parse.ts index d875556..b3d7b47 100644 --- a/tests/ast-alignment/parse.ts +++ b/tests/ast-alignment/parse.ts @@ -15,7 +15,7 @@ function createError(message: string, line: number, column: number) { function parseWithBabylonPluginTypescript(text: string, parserOptions?: any) { parserOptions = parserOptions || {}; - const babylon = require('babylon'); + const babylon = require('@babel/parser'); return babylon.parse( text, Object.assign( @@ -28,11 +28,12 @@ function parseWithBabylonPluginTypescript(text: string, parserOptions?: any) { 'jsx', 'typescript', 'objectRestSpread', - 'decorators', + 'decorators-legacy', 'classProperties', 'asyncGenerators', 'dynamicImport', - 'estree' + 'estree', + 'bigInt' ] }, parserOptions diff --git a/tests/ast-alignment/utils.ts b/tests/ast-alignment/utils.ts index 0d1b1ca..95fb1f9 100644 --- a/tests/ast-alignment/utils.ts +++ b/tests/ast-alignment/utils.ts @@ -126,6 +126,10 @@ export function preprocessBabylonAST(ast: any): any { { key: 'guardedHandlers', predicate: always + }, + { + key: 'interpreter', + predicate: always } ]); } diff --git a/tests/fixtures/javascript/bigIntLiterals/binary.src.js b/tests/fixtures/javascript/bigIntLiterals/binary.src.js new file mode 100644 index 0000000..2b13801 --- /dev/null +++ b/tests/fixtures/javascript/bigIntLiterals/binary.src.js @@ -0,0 +1 @@ +0b1n; diff --git a/tests/fixtures/javascript/bigIntLiterals/decimal.src.js b/tests/fixtures/javascript/bigIntLiterals/decimal.src.js new file mode 100644 index 0000000..fe03424 --- /dev/null +++ b/tests/fixtures/javascript/bigIntLiterals/decimal.src.js @@ -0,0 +1 @@ +1n; diff --git a/tests/fixtures/javascript/bigIntLiterals/hex.src.js b/tests/fixtures/javascript/bigIntLiterals/hex.src.js new file mode 100644 index 0000000..204f239 --- /dev/null +++ b/tests/fixtures/javascript/bigIntLiterals/hex.src.js @@ -0,0 +1 @@ +0x1n; diff --git a/tests/fixtures/javascript/bigIntLiterals/octal.src.js b/tests/fixtures/javascript/bigIntLiterals/octal.src.js new file mode 100644 index 0000000..f2ce84f --- /dev/null +++ b/tests/fixtures/javascript/bigIntLiterals/octal.src.js @@ -0,0 +1 @@ +0o1n; diff --git a/tests/lib/__snapshots__/javascript.ts.snap b/tests/lib/__snapshots__/javascript.ts.snap index 35c0cb4..399dd29 100644 --- a/tests/lib/__snapshots__/javascript.ts.snap +++ b/tests/lib/__snapshots__/javascript.ts.snap @@ -12803,6 +12803,394 @@ Object { } `; +exports[`javascript fixtures/bigIntLiterals/binary.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "raw": "0b1n", + "type": "BigIntLiteral", + "value": "0b1", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "0b1n", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/bigIntLiterals/decimal.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 2, + ], + "raw": "1n", + "type": "BigIntLiteral", + "value": "1", + }, + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 2, + ], + "type": "Identifier", + "value": "1n", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/bigIntLiterals/hex.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "raw": "0x1n", + "type": "BigIntLiteral", + "value": "0x1", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "0x1n", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/bigIntLiterals/octal.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "raw": "0o1n", + "type": "BigIntLiteral", + "value": "0o1", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "0o1n", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + exports[`javascript fixtures/binaryLiterals/invalid.src 1`] = `"';' expected."`; exports[`javascript fixtures/binaryLiterals/lowercase.src 1`] = ` diff --git a/yarn.lock b/yarn.lock index 39a2805..19af772 100644 --- a/yarn.lock +++ b/yarn.lock @@ -203,6 +203,10 @@ esutils "^2.0.2" js-tokens "^4.0.0" +"@babel/parser@7.1.6": + version "7.1.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.6.tgz#16e97aca1ec1062324a01c5a6a7d0df8dd189854" + "@babel/parser@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.0.tgz#a7cd42cb3c12aec52e24375189a47b39759b783e" @@ -1270,10 +1274,6 @@ babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.26.0: lodash "^4.17.4" to-fast-properties "^1.0.3" -babylon@7.0.0-beta.39: - version "7.0.0-beta.39" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.39.tgz#512833ea788f6570c6db026d743a7565e58d3aeb" - babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" @@ -6765,9 +6765,9 @@ typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" -typescript@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.1.tgz#3362ba9dd1e482ebb2355b02dfe8bcd19a2c7c96" +typescript@~3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.1.tgz#0b7a04b8cf3868188de914d9568bd030f0c56192" uglify-js@^2.6: version "2.8.29" From f0838246e8505b061f6564de3c114b1016461da2 Mon Sep 17 00:00:00 2001 From: Armano Date: Sat, 1 Dec 2018 03:47:45 +0100 Subject: [PATCH 02/30] test: replace babylon(beta) with babel/parser (#40) --- .gitignore | 3 ++- package.json | 2 +- tests/ast-alignment/fixtures-to-test.ts | 27 +++++++++++++------------ tests/ast-alignment/parse.ts | 16 +++++++++------ tests/ast-alignment/spec.ts | 22 ++++++++++---------- yarn.lock | 5 +++-- 6 files changed, 41 insertions(+), 34 deletions(-) diff --git a/.gitignore b/.gitignore index 557d485..fcbaa8e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ npm-debug.log _test.js .DS_Store .vscode -dist \ No newline at end of file +.idea +dist diff --git a/package.json b/package.json index 0bd6640..2199885 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ }, "license": "BSD-2-Clause", "devDependencies": { + "@babel/code-frame": "7.0.0", "@babel/parser": "7.1.6", "@commitlint/cli": "^7.1.2", "@commitlint/config-conventional": "^7.1.2", @@ -29,7 +30,6 @@ "@types/node": "^10.12.2", "@types/semver": "^5.5.0", "@types/shelljs": "^0.8.0", - "babel-code-frame": "6.26.0", "cz-conventional-changelog": "2.1.0", "glob": "7.1.2", "husky": "0.14.3", diff --git a/tests/ast-alignment/fixtures-to-test.ts b/tests/ast-alignment/fixtures-to-test.ts index 37ebcf3..3e22061 100644 --- a/tests/ast-alignment/fixtures-to-test.ts +++ b/tests/ast-alignment/fixtures-to-test.ts @@ -1,6 +1,8 @@ import glob from 'glob'; import path from 'path'; import jsxKnownIssues from '../jsx-known-issues'; +import { ParserOptions as BabelParserOptions } from '@babel/parser'; +import { ParserOptions } from '../../src/temp-types-based-on-js-source'; interface Fixture { filename: string; @@ -10,8 +12,8 @@ interface Fixture { interface FixturePatternConfig { pattern: string; config?: { - babylonParserOptions?: any; - typeScriptESTreeOptions?: any; + babelParserOptions?: BabelParserOptions; + typeScriptESTreeOptions?: ParserOptions; }; } @@ -77,16 +79,17 @@ function createFixturePatternConfigFor( config.ignore, config.parseWithSourceTypeModule ); - fixturesRequiringSourceTypeModule = ([] as FixturePatternConfig[]).concat( - fixturesRequiringSourceTypeModule, - config.parseWithSourceTypeModule.map(fixture => ({ + for (const fixture of config.parseWithSourceTypeModule) { + fixturesRequiringSourceTypeModule.push({ // It needs to be the full path from within fixtures/ for the pattern - pattern: `${fixturesSubPath}/${fixture}.src.${ - (config as CreateFixturePatternConfig).fileType - }`, - config: { babylonParserOptions: { sourceType: 'module' } } - })) - ); + pattern: `${fixturesSubPath}/${fixture}.src.${config.fileType}`, + config: { + babelParserOptions: { + sourceType: 'module' + } + } + }); + } } return { pattern: `${fixturesSubPath}/!(${config.ignore.join('|')}).src.${ @@ -370,8 +373,6 @@ let fixturePatternConfigsToTest = [ 'interface-with-all-property-types', // babylon parse errors 'interface-with-construct-signature-with-parameter-accessibility', // babylon parse errors 'class-with-implements-and-extends', // babylon parse errors - 'var-with-definite-assignment', // babylon parse errors - 'class-with-definite-assignment', // babylon parse errors /** * typescript-estree erroring, but babylon not. */ diff --git a/tests/ast-alignment/parse.ts b/tests/ast-alignment/parse.ts index b3d7b47..85e53bd 100644 --- a/tests/ast-alignment/parse.ts +++ b/tests/ast-alignment/parse.ts @@ -1,7 +1,8 @@ import codeFrame from 'babel-code-frame'; import * as parser from '../../src/parser'; -import { ParserOptions } from '../../src/temp-types-based-on-js-source'; import * as parseUtils from './utils'; +import { ParserOptions as BabelParserOptions } from '@babel/parser'; +import { ParserOptions } from '../../src/temp-types-based-on-js-source'; function createError(message: string, line: number, column: number) { // Construct an error similar to the ones thrown by Babylon. @@ -13,7 +14,10 @@ function createError(message: string, line: number, column: number) { return error; } -function parseWithBabylonPluginTypescript(text: string, parserOptions?: any) { +function parseWithBabelParser( + text: string, + parserOptions?: BabelParserOptions +) { parserOptions = parserOptions || {}; const babylon = require('@babel/parser'); return babylon.parse( @@ -67,7 +71,7 @@ function parseWithTypeScriptESTree( interface ASTComparisonParseOptions { parser: string; typeScriptESTreeOptions?: ParserOptions; - babylonParserOptions?: any; + babelParserOptions?: BabelParserOptions; } export function parse(text: string, opts: ASTComparisonParseOptions) { @@ -87,14 +91,14 @@ export function parse(text: string, opts: ASTComparisonParseOptions) { parseWithTypeScriptESTree(text, opts.typeScriptESTreeOptions) ); break; - case 'babylon-plugin-typescript': + case '@babel/parser': result.ast = parseUtils.normalizeNodeTypes( - parseWithBabylonPluginTypescript(text, opts.babylonParserOptions) + parseWithBabelParser(text, opts.babelParserOptions) ); break; default: throw new Error( - 'Please provide a valid parser: either "typescript-estree" or "babylon-plugin-typescript"' + 'Please provide a valid parser: either "typescript-estree" or "@babel/parser"' ); } } catch (error) { diff --git a/tests/ast-alignment/spec.ts b/tests/ast-alignment/spec.ts index bf1359a..378ed9e 100644 --- a/tests/ast-alignment/spec.ts +++ b/tests/ast-alignment/spec.ts @@ -21,25 +21,25 @@ fixturesToTest.forEach(fixture => { /** * Parse the source with babylon typescript-plugin */ - const babylonTypeScriptPluginResult = parse(source, { - parser: 'babylon-plugin-typescript', - babylonParserOptions: - fixture.config && fixture.config.babylonParserOptions - ? fixture.config.babylonParserOptions + const babelParserResult = parse(source, { + parser: '@babel/parser', + babelParserOptions: + fixture.config && fixture.config.babelParserOptions + ? fixture.config.babelParserOptions : null }); /** * If babylon fails to parse the source, ensure that typescript-estree has the same fundamental issue */ - if (babylonTypeScriptPluginResult.parseError) { + if (babelParserResult.parseError) { /** * FAIL: babylon errored but typescript-estree did not */ if (!typeScriptESTreeResult.parseError) { it(`TEST FAIL [BABYLON ERRORED, BUT TSEP DID NOT] - ${filename}`, () => { expect(typeScriptESTreeResult.parseError).toEqual( - babylonTypeScriptPluginResult.parseError + babelParserResult.parseError ); }); return; @@ -48,7 +48,7 @@ fixturesToTest.forEach(fixture => { * Both parsers errored - this is OK as long as the errors are of the same "type" */ it(`[Both parsers error as expected] - ${filename}`, () => { - expect(babylonTypeScriptPluginResult.parseError.name).toEqual( + expect(babelParserResult.parseError.name).toEqual( typeScriptESTreeResult.parseError.name ); }); @@ -60,7 +60,7 @@ fixturesToTest.forEach(fixture => { */ if (typeScriptESTreeResult.parseError) { it(`TEST FAIL [TSEP ERRORED, BUT BABYLON DID NOT] - ${filename}`, () => { - expect(babylonTypeScriptPluginResult.parseError).toEqual( + expect(babelParserResult.parseError).toEqual( typeScriptESTreeResult.parseError ); }); @@ -71,14 +71,14 @@ fixturesToTest.forEach(fixture => { * No errors, assert the two ASTs match */ it(`${filename}`, () => { - expect(babylonTypeScriptPluginResult.ast).toBeTruthy(); + expect(babelParserResult.ast).toBeTruthy(); expect(typeScriptESTreeResult.ast).toBeTruthy(); /** * Perform some extra formatting steps on the babylon AST before comparing */ expect( parseUtils.removeLocationDataFromProgramNode( - parseUtils.preprocessBabylonAST(babylonTypeScriptPluginResult.ast) + parseUtils.preprocessBabylonAST(babelParserResult.ast) ) ).toEqual( parseUtils.removeLocationDataFromProgramNode(typeScriptESTreeResult.ast) diff --git a/yarn.lock b/yarn.lock index 19af772..130bd0d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,9 +2,10 @@ # yarn lockfile v1 -"@babel/code-frame@^7.0.0": +"@babel/code-frame@7.0.0", "@babel/code-frame@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" + integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== dependencies: "@babel/highlight" "^7.0.0" @@ -1125,7 +1126,7 @@ aws4@^1.6.0, aws4@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" -babel-code-frame@6.26.0, babel-code-frame@^6.26.0: +babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" dependencies: From 2f9c255c67424cbb0267225b350e0b060486ba1c Mon Sep 17 00:00:00 2001 From: Armano Date: Wed, 5 Dec 2018 02:04:08 +0100 Subject: [PATCH 03/30] chore: regenerate yarn-lock to fix vulnerabilities (#41) --- yarn.lock | 2780 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 1867 insertions(+), 913 deletions(-) diff --git a/yarn.lock b/yarn.lock index 130bd0d..25ccc12 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,43 +2,39 @@ # yarn lockfile v1 -"@babel/code-frame@7.0.0", "@babel/code-frame@^7.0.0": +"@babel/code-frame@7.0.0", "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.0.0-beta.35": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" integrity sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA== dependencies: "@babel/highlight" "^7.0.0" -"@babel/code-frame@^7.0.0-beta.35": - version "7.0.0-beta.56" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.56.tgz#09f76300673ac085d3b90e02aafa0ffc2c96846a" - dependencies: - "@babel/highlight" "7.0.0-beta.56" - "@babel/core@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.0.tgz#08958f1371179f62df6966d8a614003d11faeb04" + version "7.1.6" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.6.tgz#3733cbee4317429bc87c62b29cf8587dba7baeb3" + integrity sha512-Hz6PJT6e44iUNpAn8AoyAs6B3bl60g7MJQaI0rZEar6ECzh6+srYO1xlIdssio34mPaUtAb1y+XlkkSJzok3yw== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.0.0" - "@babel/helpers" "^7.1.0" - "@babel/parser" "^7.1.0" - "@babel/template" "^7.1.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/generator" "^7.1.6" + "@babel/helpers" "^7.1.5" + "@babel/parser" "^7.1.6" + "@babel/template" "^7.1.2" + "@babel/traverse" "^7.1.6" + "@babel/types" "^7.1.6" convert-source-map "^1.1.0" - debug "^3.1.0" - json5 "^0.5.0" + debug "^4.1.0" + json5 "^2.1.0" lodash "^4.17.10" resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.0.0.tgz#1efd58bffa951dc846449e58ce3a1d7f02d393aa" +"@babel/generator@^7.1.6": + version "7.1.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.1.6.tgz#001303cf87a5b9d093494a4bf251d7b5d03d3999" + integrity sha512-brwPBtVvdYdGxtenbQgfCdDPmtkmUBZPjUoK5SXJEBuHaA5BCubh9ly65fzXz7R6o5rA76Rs22ES8Z+HCc0YIQ== dependencies: - "@babel/types" "^7.0.0" + "@babel/types" "^7.1.6" jsesc "^2.5.1" lodash "^4.17.10" source-map "^0.5.0" @@ -47,12 +43,14 @@ "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" + integrity sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q== dependencies: "@babel/types" "^7.0.0" "@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" + integrity sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w== dependencies: "@babel/helper-explode-assignable-expression" "^7.1.0" "@babel/types" "^7.0.0" @@ -60,6 +58,7 @@ "@babel/helper-call-delegate@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.1.0.tgz#6a957f105f37755e8645343d3038a22e1449cc4a" + integrity sha512-YEtYZrw3GUK6emQHKthltKNZwszBcHK58Ygcis+gVUrF4/FmTVr5CCqQNSfmvg2y+YDEANyYoaLz/SHsnusCwQ== dependencies: "@babel/helper-hoist-variables" "^7.0.0" "@babel/traverse" "^7.1.0" @@ -68,6 +67,7 @@ "@babel/helper-define-map@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.1.0.tgz#3b74caec329b3c80c116290887c0dd9ae468c20c" + integrity sha512-yPPcW8dc3gZLN+U1mhYV91QU3n5uTbx7DUdf8NnPbjS0RMwBuHi9Xt2MUgppmNz7CJxTBWsGczTiEp1CSOTPRg== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/types" "^7.0.0" @@ -76,6 +76,7 @@ "@babel/helper-explode-assignable-expression@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" + integrity sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA== dependencies: "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" @@ -83,6 +84,7 @@ "@babel/helper-function-name@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" + integrity sha512-A95XEoCpb3TO+KZzJ4S/5uW5fNe26DjBGqf1o9ucyLyCmi1dXq/B3c8iaWTfBk3VvetUxl16e8tIrd5teOCfGw== dependencies: "@babel/helper-get-function-arity" "^7.0.0" "@babel/template" "^7.1.0" @@ -91,30 +93,35 @@ "@babel/helper-get-function-arity@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3" + integrity sha512-r2DbJeg4svYvt3HOS74U4eWKsUAMRH01Z1ds1zx8KNTPtpTL5JAsdFv8BNyOpVqdFhHkkRDIg5B4AsxmkjAlmQ== dependencies: "@babel/types" "^7.0.0" "@babel/helper-hoist-variables@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.0.0.tgz#46adc4c5e758645ae7a45deb92bab0918c23bb88" + integrity sha512-Ggv5sldXUeSKsuzLkddtyhyHe2YantsxWKNi7A+7LeD12ExRDWTRk29JCXpaHPAbMaIPZSil7n+lq78WY2VY7w== dependencies: "@babel/types" "^7.0.0" "@babel/helper-member-expression-to-functions@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" + integrity sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg== dependencies: "@babel/types" "^7.0.0" "@babel/helper-module-imports@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" + integrity sha512-aP/hlLq01DWNEiDg4Jn23i+CXxW/owM4WpDLFUbpjxe4NS3BhLVZQ5i7E0ZrxuQ/vwekIeciyamgB1UIYxxM6A== dependencies: "@babel/types" "^7.0.0" "@babel/helper-module-transforms@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.1.0.tgz#470d4f9676d9fad50b324cdcce5fbabbc3da5787" + integrity sha512-0JZRd2yhawo79Rcm4w0LwSMILFmFXjugG3yqf+P/UsKsRS1mJCmMwwlHDlMg7Avr9LrvSpp4ZSULO9r8jpCzcw== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" @@ -126,22 +133,26 @@ "@babel/helper-optimise-call-expression@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" + integrity sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g== dependencies: "@babel/types" "^7.0.0" "@babel/helper-plugin-utils@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" + integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== "@babel/helper-regex@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0.tgz#2c1718923b57f9bbe64705ffe5640ac64d9bdb27" + integrity sha512-TR0/N0NDCcUIUEbqV6dCO+LptmmSQFQ7q70lfcEB4URsjD0E1HzicrwUH+ap6BAQ2jhCX9Q4UqZy4wilujWlkg== dependencies: lodash "^4.17.10" "@babel/helper-remap-async-to-generator@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" + integrity sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-wrap-function" "^7.1.0" @@ -152,6 +163,7 @@ "@babel/helper-replace-supers@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz#5fc31de522ec0ef0899dc9b3e7cf6a5dd655f362" + integrity sha512-BvcDWYZRWVuDeXTYZWxekQNO5D4kO55aArwZOTFXw6rlLQA8ZaDicJR1sO47h+HrnCiDFiww0fSPV0d713KBGQ== dependencies: "@babel/helper-member-expression-to-functions" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" @@ -161,6 +173,7 @@ "@babel/helper-simple-access@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" + integrity sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w== dependencies: "@babel/template" "^7.1.0" "@babel/types" "^7.0.0" @@ -168,53 +181,47 @@ "@babel/helper-split-export-declaration@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0.tgz#3aae285c0311c2ab095d997b8c9a94cad547d813" + integrity sha512-MXkOJqva62dfC0w85mEf/LucPPS/1+04nmmRMPEBUB++hiiThQ2zPtX/mEWQ3mtzCEjIJvPY8nuwxXtQeQwUag== dependencies: "@babel/types" "^7.0.0" "@babel/helper-wrap-function@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.1.0.tgz#8cf54e9190706067f016af8f75cb3df829cc8c66" + integrity sha512-R6HU3dete+rwsdAfrOzTlE9Mcpk4RjU3aX3gi9grtmugQY0u79X7eogUvfXA5sI81Mfq1cn6AgxihfN33STjJA== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/template" "^7.1.0" "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helpers@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.0.tgz#429bf0f0020be56a4242883432084e3d70a8a141" +"@babel/helpers@^7.1.5": + version "7.1.5" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.5.tgz#68bfc1895d685f2b8f1995e788dbfe1f6ccb1996" + integrity sha512-2jkcdL02ywNBry1YNFAH/fViq4fXG0vdckHqeJk+75fpQ2OH+Az6076tX/M0835zA45E0Cqa6pV5Kiv9YOqjEg== dependencies: - "@babel/template" "^7.1.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" - -"@babel/highlight@7.0.0-beta.56": - version "7.0.0-beta.56" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0-beta.56.tgz#f8b0fc8c5c2de53bb2c12f9001ad3d99e573696d" - dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^3.0.0" + "@babel/template" "^7.1.2" + "@babel/traverse" "^7.1.5" + "@babel/types" "^7.1.5" "@babel/highlight@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4" + integrity sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw== dependencies: chalk "^2.0.0" esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@7.1.6": +"@babel/parser@7.1.6", "@babel/parser@^7.1.2", "@babel/parser@^7.1.6": version "7.1.6" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.6.tgz#16e97aca1ec1062324a01c5a6a7d0df8dd189854" - -"@babel/parser@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.0.tgz#a7cd42cb3c12aec52e24375189a47b39759b783e" + integrity sha512-dWP6LJm9nKT6ALaa+bnL247GHHMWir3vSlZ2+IHgHgktZQx0L3Uvq2uAWcuzIe+fujRsYWBW2q622C5UvGK9iQ== "@babel/plugin-proposal-async-generator-functions@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.1.0.tgz#41c1a702e10081456e23a7b74d891922dd1bb6ce" + integrity sha512-Fq803F3Jcxo20MXUSDdmZZXrPe6BWyGcWBPPNB/M7WaUYESKDeKMOGIxEzQOjGSmW/NWb6UaPZrtTB2ekhB/ew== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-remap-async-to-generator" "^7.1.0" @@ -223,6 +230,7 @@ "@babel/plugin-proposal-json-strings@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.0.0.tgz#3b4d7b5cf51e1f2e70f52351d28d44fc2970d01e" + integrity sha512-kfVdUkIAGJIVmHmtS/40i/fg/AGnw/rsZBCaapY5yjeO5RA9m165Xbw9KMOu2nqXP5dTFjEjHdfNdoVcHv133Q== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-json-strings" "^7.0.0" @@ -230,6 +238,7 @@ "@babel/plugin-proposal-object-rest-spread@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0.tgz#9a17b547f64d0676b6c9cecd4edf74a82ab85e7e" + integrity sha512-14fhfoPcNu7itSen7Py1iGN0gEm87hX/B+8nZPqkdmANyyYWYMY2pjA3r8WXbWVKMzfnSNS0xY8GVS0IjXi/iw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread" "^7.0.0" @@ -237,6 +246,7 @@ "@babel/plugin-proposal-optional-catch-binding@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.0.0.tgz#b610d928fe551ff7117d42c8bb410eec312a6425" + integrity sha512-JPqAvLG1s13B/AuoBjdBYvn38RqW6n1TzrQO839/sIpqLpbnXKacsAgpZHzLD83Sm8SDXMkkrAvEnJ25+0yIpw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" @@ -244,6 +254,7 @@ "@babel/plugin-proposal-unicode-property-regex@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.0.0.tgz#498b39cd72536cd7c4b26177d030226eba08cd33" + integrity sha512-tM3icA6GhC3ch2SkmSxv7J/hCWKISzwycub6eGsDrFDgukD4dZ/I+x81XgW0YslS6mzNuQ1Cbzh5osjIMgepPQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" @@ -252,36 +263,42 @@ "@babel/plugin-syntax-async-generators@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.0.0.tgz#bf0891dcdbf59558359d0c626fdc9490e20bc13c" + integrity sha512-im7ged00ddGKAjcZgewXmp1vxSZQQywuQXe2B1A7kajjZmDeY/ekMPmWr9zJgveSaQH0k7BcGrojQhcK06l0zA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-json-strings@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.0.0.tgz#0d259a68090e15b383ce3710e01d5b23f3770cbd" + integrity sha512-UlSfNydC+XLj4bw7ijpldc1uZ/HB84vw+U6BTuqMdIEmz/LDe63w/GHtpQMdXWdqQZFeAI9PjnHe/vDhwirhKA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-object-rest-spread@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0.tgz#37d8fbcaf216bd658ea1aebbeb8b75e88ebc549b" + integrity sha512-5A0n4p6bIiVe5OvQPxBnesezsgFJdHhSs3uFSvaPdMqtsovajLZ+G2vZyvNe10EzJBWWo3AcHGKhAFUxqwp2dw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-optional-catch-binding@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.0.0.tgz#886f72008b3a8b185977f7cb70713b45e51ee475" + integrity sha512-Wc+HVvwjcq5qBg1w5RG9o9RVzmCaAg/Vp0erHCKpAYV8La6I94o4GQAmFYNmkzoMO6gzoOSulpKeSSz6mPEoZw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-arrow-functions@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749" + integrity sha512-2EZDBl1WIO/q4DIkIp4s86sdp4ZifL51MoIviLY/gG/mLSuOIEg7J8o6mhbxOTvUJkaN50n+8u41FVsr5KLy/w== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-async-to-generator@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.1.0.tgz#109e036496c51dd65857e16acab3bafdf3c57811" + integrity sha512-rNmcmoQ78IrvNCIt/R9U+cixUHeYAzgusTFgIAv+wQb9HJU4szhpDD6e5GCACmj/JP5KxuCwM96bX3L9v4ZN/g== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -290,12 +307,14 @@ "@babel/plugin-transform-block-scoped-functions@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0.tgz#482b3f75103927e37288b3b67b65f848e2aa0d07" + integrity sha512-AOBiyUp7vYTqz2Jibe1UaAWL0Hl9JUXEgjFvvvcSc9MVDItv46ViXFw2F7SVt1B5k+KWjl44eeXOAk3UDEaJjQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-block-scoping@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.0.0.tgz#1745075edffd7cdaf69fab2fb6f9694424b7e9bc" +"@babel/plugin-transform-block-scoping@^7.1.5": + version "7.1.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.1.5.tgz#3e8e0bc9a5104519923302a24f748f72f2f61f37" + integrity sha512-jlYcDrz+5ayWC7mxgpn1Wj8zj0mmjCT2w0mPIMSwO926eXBRxpEgoN/uQVRBfjtr8ayjcmS+xk2G1jaP8JjMJQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.10" @@ -303,6 +322,7 @@ "@babel/plugin-transform-classes@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.1.0.tgz#ab3f8a564361800cbc8ab1ca6f21108038432249" + integrity sha512-rNaqoD+4OCBZjM7VaskladgqnZ1LO6o2UxuWSDzljzW21pN1KXkB7BstAVweZdxQkHAujps5QMNOTWesBciKFg== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-define-map" "^7.1.0" @@ -316,18 +336,21 @@ "@babel/plugin-transform-computed-properties@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0.tgz#2fbb8900cd3e8258f2a2ede909b90e7556185e31" + integrity sha512-ubouZdChNAv4AAWAgU7QKbB93NU5sHwInEWfp+/OzJKA02E6Woh9RVoX4sZrbRwtybky/d7baTUqwFx+HgbvMA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-destructuring@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.0.0.tgz#68e911e1935dda2f06b6ccbbf184ffb024e9d43a" + version "7.1.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.1.3.tgz#e69ff50ca01fac6cb72863c544e516c2b193012f" + integrity sha512-Mb9M4DGIOspH1ExHOUnn2UUXFOyVTiX84fXCd+6B5iWrQg/QMeeRmSwpZ9lnjYLSXtZwiw80ytVMr3zue0ucYw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-dotall-regex@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.0.0.tgz#73a24da69bc3c370251f43a3d048198546115e58" + integrity sha512-00THs8eJxOJUFVx1w8i1MBF4XH4PsAjKjQ1eqN/uCH3YKwP21GCKfrn6YZFZswbOk9+0cw1zGQPHVc1KBlSxig== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" @@ -336,12 +359,14 @@ "@babel/plugin-transform-duplicate-keys@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.0.0.tgz#a0601e580991e7cace080e4cf919cfd58da74e86" + integrity sha512-w2vfPkMqRkdxx+C71ATLJG30PpwtTpW7DDdLqYt2acXU7YjztzeWW2Jk1T6hKqCLYCcEA5UQM/+xTAm+QCSnuQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-exponentiation-operator@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.1.0.tgz#9c34c2ee7fd77e02779cfa37e403a2e1003ccc73" + integrity sha512-uZt9kD1Pp/JubkukOGQml9tqAeI8NkE98oZnHZ2qHRElmeKCodbTZgOEUtujSCSLhHSBWbzNiFSDIMC4/RBTLQ== dependencies: "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -349,12 +374,14 @@ "@babel/plugin-transform-for-of@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0.tgz#f2ba4eadb83bd17dc3c7e9b30f4707365e1c3e39" + integrity sha512-TlxKecN20X2tt2UEr2LNE6aqA0oPeMT1Y3cgz8k4Dn1j5ObT8M3nl9aA37LLklx0PBZKETC9ZAf9n/6SujTuXA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-function-name@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.1.0.tgz#29c5550d5c46208e7f730516d41eeddd4affadbb" + integrity sha512-VxOa1TMlFMtqPW2IDYZQaHsFrq/dDoIjgN098NowhexhZcz3UGlvPgZXuE1jEvNygyWyxRacqDpCZt+par1FNg== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -362,12 +389,14 @@ "@babel/plugin-transform-literals@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0.tgz#2aec1d29cdd24c407359c930cdd89e914ee8ff86" + integrity sha512-1NTDBWkeNXgpUcyoVFxbr9hS57EpZYXpje92zv0SUzjdu3enaRwF/l3cmyRnXLtIdyJASyiS6PtybK+CgKf7jA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-modules-amd@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.1.0.tgz#f9e0a7072c12e296079b5a59f408ff5b97bf86a8" + integrity sha512-wt8P+xQ85rrnGNr2x1iV3DW32W8zrB6ctuBkYBbf5/ZzJY99Ob4MFgsZDFgczNU76iy9PWsy4EuxOliDjdKw6A== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -375,14 +404,16 @@ "@babel/plugin-transform-modules-commonjs@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.1.0.tgz#0a9d86451cbbfb29bd15186306897c67f6f9a05c" + integrity sha512-wtNwtMjn1XGwM0AXPspQgvmE6msSJP15CX2RVfpTSTNPLhKhaOjaIfBaVfj4iUZ/VrFSodcFedwtPg/NxwQlPA== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" "@babel/plugin-transform-modules-systemjs@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.0.0.tgz#8873d876d4fee23209decc4d1feab8f198cf2df4" + version "7.1.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.1.3.tgz#2119a3e3db612fd74a19d88652efbfe9613a5db0" + integrity sha512-PvTxgjxQAq4pvVUZF3mD5gEtVDuId8NtWkJsZLEJZMZAW3TvgQl1pmydLLN1bM8huHFVVU43lf0uvjQj9FRkKw== dependencies: "@babel/helper-hoist-variables" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -390,6 +421,7 @@ "@babel/plugin-transform-modules-umd@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.1.0.tgz#a29a7d85d6f28c3561c33964442257cc6a21f2a8" + integrity sha512-enrRtn5TfRhMmbRwm7F8qOj0qEYByqUvTttPEGimcBH4CJHphjyK1Vg7sdU7JjeEmgSpM890IT/efS2nMHwYig== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -397,12 +429,14 @@ "@babel/plugin-transform-new-target@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.0.0.tgz#ae8fbd89517fa7892d20e6564e641e8770c3aa4a" + integrity sha512-yin069FYjah+LbqfGeTfzIBODex/e++Yfa0rH0fpfam9uTbuEeEOx5GLGr210ggOV77mVRNoeqSYqeuaqSzVSw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-object-super@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.1.0.tgz#b1ae194a054b826d8d4ba7ca91486d4ada0f91bb" + integrity sha512-/O02Je1CRTSk2SSJaq0xjwQ8hG4zhZGNjE8psTsSNPXyLRCODv7/PBozqT5AmQMzp7MI3ndvMhGdqp9c96tTEw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-replace-supers" "^7.1.0" @@ -410,6 +444,7 @@ "@babel/plugin-transform-parameters@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.1.0.tgz#44f492f9d618c9124026e62301c296bf606a7aed" + integrity sha512-vHV7oxkEJ8IHxTfRr3hNGzV446GAb+0hgbA7o/0Jd76s+YzccdWuTU296FOCOl/xweU4t/Ya4g41yWz80RFCRw== dependencies: "@babel/helper-call-delegate" "^7.1.0" "@babel/helper-get-function-arity" "^7.0.0" @@ -418,24 +453,28 @@ "@babel/plugin-transform-regenerator@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.0.0.tgz#5b41686b4ed40bef874d7ed6a84bdd849c13e0c1" + integrity sha512-sj2qzsEx8KDVv1QuJc/dEfilkg3RRPvPYx/VnKLtItVQRWt1Wqf5eVCOLZm29CiGFfYYsA3VPjfizTCV0S0Dlw== dependencies: regenerator-transform "^0.13.3" "@babel/plugin-transform-shorthand-properties@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0.tgz#85f8af592dcc07647541a0350e8c95c7bf419d15" + integrity sha512-g/99LI4vm5iOf5r1Gdxq5Xmu91zvjhEG5+yZDJW268AZELAu4J1EiFLnkSG3yuUsZyOipVOVUKoGPYwfsTymhw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-spread@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0.tgz#93583ce48dd8c85e53f3a46056c856e4af30b49b" + integrity sha512-L702YFy2EvirrR4shTj0g2xQp7aNwZoWNCkNu2mcoU0uyzMl0XRwDSwzB/xp6DSUFiBmEXuyAyEN16LsgVqGGQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-sticky-regex@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0.tgz#30a9d64ac2ab46eec087b8530535becd90e73366" + integrity sha512-LFUToxiyS/WD+XEWpkx/XJBrUXKewSZpzX68s+yEOtIbdnsRjpryDw9U06gYc6klYEij/+KQVRnD3nz3AoKmjw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" @@ -443,6 +482,7 @@ "@babel/plugin-transform-template-literals@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0.tgz#084f1952efe5b153ddae69eb8945f882c7a97c65" + integrity sha512-vA6rkTCabRZu7Nbl9DfLZE1imj4tzdWcg5vtdQGvj+OH9itNNB6hxuRMHuIY8SGnEt1T9g5foqs9LnrHzsqEFg== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -450,12 +490,14 @@ "@babel/plugin-transform-typeof-symbol@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.0.0.tgz#4dcf1e52e943e5267b7313bff347fdbe0f81cec9" + integrity sha512-1r1X5DO78WnaAIvs5uC48t41LLckxsYklJrZjNKcevyz83sF2l4RHbw29qrCPr/6ksFsdfRpT/ZgxNWHXRnffg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-transform-unicode-regex@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0.tgz#c6780e5b1863a76fe792d90eded9fcd5b51d68fc" + integrity sha512-uJBrJhBOEa3D033P95nPHu3nbFwFE9ZgXsfEitzoIXIwqAZWk7uXcg06yFKXz9FSxBH5ucgU/cYdX0IV8ldHKw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" @@ -464,13 +506,15 @@ "@babel/polyfill@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.0.0.tgz#c8ff65c9ec3be6a1ba10113ebd40e8750fb90bff" + integrity sha512-dnrMRkyyr74CRelJwvgnnSUDh2ge2NCTyHVwpOdvRMHtJUyxLtMAfhBN3s64pY41zdw0kgiLPh6S20eb1NcX6Q== dependencies: core-js "^2.5.7" regenerator-runtime "^0.11.1" "@babel/preset-env@^7.0.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.1.0.tgz#e67ea5b0441cfeab1d6f41e9b5c79798800e8d11" + version "7.1.6" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.1.6.tgz#a0bf4b96b6bfcf6e000afc5b72b4abe7cc13ae97" + integrity sha512-YIBfpJNQMBkb6MCkjz/A9J76SNCSuGVamOVBgoUkLzpJD/z8ghHi9I42LQ4pulVX68N/MmImz6ZTixt7Azgexw== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -485,7 +529,7 @@ "@babel/plugin-transform-arrow-functions" "^7.0.0" "@babel/plugin-transform-async-to-generator" "^7.1.0" "@babel/plugin-transform-block-scoped-functions" "^7.0.0" - "@babel/plugin-transform-block-scoping" "^7.0.0" + "@babel/plugin-transform-block-scoping" "^7.1.5" "@babel/plugin-transform-classes" "^7.1.0" "@babel/plugin-transform-computed-properties" "^7.0.0" "@babel/plugin-transform-destructuring" "^7.0.0" @@ -517,6 +561,7 @@ "@babel/register@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.0.0.tgz#fa634bae1bfa429f60615b754fc1f1d745edd827" + integrity sha512-f/+CRmaCe7rVEvcvPvxeA8j5aJhHC3aJie7YuqcMDhUOuyWLA7J/aNrTaHIzoWPEhpHA54mec4Mm8fv8KBlv3g== dependencies: core-js "^2.5.7" find-cache-dir "^1.0.0" @@ -526,43 +571,47 @@ pirates "^4.0.0" source-map-support "^0.5.9" -"@babel/template@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.0.tgz#58cc9572e1bfe24fe1537fdf99d839d53e517e22" +"@babel/template@^7.1.0", "@babel/template@^7.1.2": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644" + integrity sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/parser" "^7.1.2" + "@babel/types" "^7.1.2" -"@babel/traverse@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.0.tgz#503ec6669387efd182c3888c4eec07bcc45d91b2" +"@babel/traverse@^7.1.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.1.6": + version "7.1.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.6.tgz#c8db9963ab4ce5b894222435482bd8ea854b7b5c" + integrity sha512-CXedit6GpISz3sC2k2FsGCUpOhUqKdyL0lqNrImQojagnUMXf8hex4AxYFRuMkNGcvJX5QAFGzB5WJQmSv8SiQ== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.0.0" + "@babel/generator" "^7.1.6" "@babel/helper-function-name" "^7.1.0" "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - debug "^3.1.0" + "@babel/parser" "^7.1.6" + "@babel/types" "^7.1.6" + debug "^4.1.0" globals "^11.1.0" lodash "^4.17.10" -"@babel/types@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0.tgz#6e191793d3c854d19c6749989e3bc55f0e962118" +"@babel/types@^7.0.0", "@babel/types@^7.1.2", "@babel/types@^7.1.5", "@babel/types@^7.1.6": + version "7.1.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.1.6.tgz#0adb330c3a281348a190263aceb540e10f04bcce" + integrity sha512-DMiUzlY9DSjVsOylJssxLHSgj6tWM9PRFJOGW/RaOglVOK9nzTxoOMfTfRQXGUCUQ/HmlG2efwC+XqUEJ5ay4w== dependencies: esutils "^2.0.2" lodash "^4.17.10" to-fast-properties "^2.0.0" -"@commitlint/cli@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-7.1.2.tgz#9ad1b4703679e18e3b1972c4abf0441255219e78" +"@commitlint/cli@^7.1.2", "@commitlint/cli@^7.2.1": + version "7.2.1" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-7.2.1.tgz#dbb9eeb1f5015a129bb0801fbc1115eb1dcd513b" + integrity sha512-PUHWGoQOx8m6ZSpZPSHb+YISFAvW7jiWvCJOQiViKHZC8CLKu4bjyc/AwP8gBte0RsTGAu1ekiitp5Q0NcLGcA== dependencies: - "@commitlint/format" "^7.1.2" - "@commitlint/lint" "^7.1.2" - "@commitlint/load" "^7.1.2" + "@commitlint/format" "^7.2.1" + "@commitlint/lint" "^7.2.1" + "@commitlint/load" "^7.2.1" "@commitlint/read" "^7.1.2" babel-polyfill "6.26.0" chalk "2.3.1" @@ -570,14 +619,18 @@ lodash.merge "4.6.1" lodash.pick "4.4.0" meow "5.0.0" + resolve-from "^4.0.0" + resolve-global "^0.1.0" "@commitlint/config-conventional@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-7.1.2.tgz#5b5e45924c9abd8f9a8d83eb1f66e24e5f66916f" + integrity sha512-DmA4ixkpv03qA1TVs1Bl25QsVym2bPL6pKapesALWIVggG3OpwqGZ55vN75Tx8xZoG7LFKrVyrt7kwhA7X8njQ== -"@commitlint/ensure@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-7.1.2.tgz#30d74bf0062ac6d917037f20dbf27bb63a4ae7c1" +"@commitlint/ensure@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-7.2.0.tgz#03cfab7135f57f62b73698f441a516886a84a1f6" + integrity sha512-j2AJE4eDeLP6O/Z1CdPwEXAzcrRRoeeHLuvW8bldQ4J2nHiX9hzmSe87H87Ob8Avm+zIegsqVPGaBAtRmbODYw== dependencies: lodash.camelcase "4.3.0" lodash.kebabcase "4.1.1" @@ -588,35 +641,40 @@ "@commitlint/execute-rule@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-7.1.2.tgz#b504e800c5f7c0fbfa24a261b04c549aa2726254" + integrity sha512-EP/SqX2U2L4AQHglZ2vGM1pvHJOh3sbYtHn1QhtllqEpsdmhuNpVPSGHP/r9OD2h4i90vtnWgZQoskt2MkbknA== dependencies: babel-runtime "6.26.0" -"@commitlint/format@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-7.1.2.tgz#0f601d572d97d7cca59ef6f3da0cde0d10de3de2" +"@commitlint/format@^7.2.1": + version "7.2.1" + resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-7.2.1.tgz#7d8b25002792d6481f0f8f9614736e43106749c1" + integrity sha512-1YcL+ZWB8V52oDFQBhSBJjiJOZDt4Vl06O5TkG70BMpre3EQru5KYIN16eEPqfihNw0bj8gSIWcf87Gvh3OrOw== dependencies: babel-runtime "^6.23.0" chalk "^2.0.1" -"@commitlint/is-ignored@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-7.1.2.tgz#1168ef48883e86446dd2930f23300ec0e038dddc" +"@commitlint/is-ignored@^7.2.1": + version "7.2.1" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-7.2.1.tgz#624b3703ca88a4b6573176439b1126b7eb3708d4" + integrity sha512-3DsEEKRnj8Bv9qImsxWcGf9BwerDnk5Vs+oK6ELzIwkndHaAZLHyATjmaz/rsc+U+DWiVjgKrrw3xvd/UsoazA== dependencies: - semver "5.5.0" + semver "5.6.0" -"@commitlint/lint@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-7.1.2.tgz#7166a9ba71e75c2f981f531a2386739ef28b21a3" +"@commitlint/lint@^7.2.1": + version "7.2.1" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-7.2.1.tgz#4511a9acada6870042ca3244417b401ad1043d46" + integrity sha512-rM7nUyNUJyuKw1MTwJG/wk4twB5YCAG2wzJMn5NqVpGD/qmLOzlZoBl0+CYmuOsbIRAA2rlEV6KZHBk9tTfAdQ== dependencies: - "@commitlint/is-ignored" "^7.1.2" + "@commitlint/is-ignored" "^7.2.1" "@commitlint/parse" "^7.1.2" - "@commitlint/rules" "^7.1.2" + "@commitlint/rules" "^7.2.0" babel-runtime "^6.23.0" lodash.topairs "4.3.0" -"@commitlint/load@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-7.1.2.tgz#91fc756f63477d19299cd1ed79be2d36aaa8c33d" +"@commitlint/load@^7.2.1": + version "7.2.1" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-7.2.1.tgz#f1a49cb2ecf53e235e4f3523f75a553f5b481f5c" + integrity sha512-FnfmfhPGJqGwILVRznduBejOicNey6p/byfcyxtcBkN2+X96gDuNtqcnGcngCrzPIAgaIrQQcTQDA1/KMtW21A== dependencies: "@commitlint/execute-rule" "^7.1.2" "@commitlint/resolve-extends" "^7.1.2" @@ -631,10 +689,12 @@ "@commitlint/message@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-7.1.2.tgz#b8e7ed3914896f8490b5897c4f6b8923105b55fd" + integrity sha512-6FQeK5LAs1Bde6W/jULg+I/XZhj3gbqCWlS2Q11A2JbaTRpRJZzm7WdD9nK3I0+De41EOqW2t4mBnrpio3o1Zg== "@commitlint/parse@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-7.1.2.tgz#d63b246cebd5a2cf326b0356421f9ec5f227a2d4" + integrity sha512-wrdLwJZL3cs89MfgPtnbbKByijUo3Wrug55aTke5k/F0XNxGaDaNJyH4QXgidgXk57r2t4NJVAKwjnY4wjfNwg== dependencies: conventional-changelog-angular "^1.3.3" conventional-commits-parser "^2.1.0" @@ -642,6 +702,7 @@ "@commitlint/read@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-7.1.2.tgz#6a1fcb192e54e311eee280e5070627981d8d7bf3" + integrity sha512-sarYQgfTay2Eu7onHz53EYyRw7pI5QmLE7tP5Ri9op6eu4LadjSoA/4dfc+VE7avsq21J2ewSbz+9f0uvhDxgg== dependencies: "@commitlint/top-level" "^7.1.2" "@marionebl/sander" "^0.6.0" @@ -651,6 +712,7 @@ "@commitlint/resolve-extends@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-7.1.2.tgz#886f589f1c2ce87c42f2786696b68fac7e356978" + integrity sha512-zwbifMB9DeHP4sYQdrkx+XJh5Q1lyP/OdlErUCC34NV4Lkxw/XxXF4St3e+y1X28/SgrEc2XSOS6n/vQQfUlLA== dependencies: babel-runtime "6.26.0" lodash.merge "4.6.1" @@ -659,11 +721,12 @@ resolve-from "^4.0.0" resolve-global "^0.1.0" -"@commitlint/rules@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-7.1.2.tgz#ba241dc3dbb6c05ce4a186a7cdf85c170345778c" +"@commitlint/rules@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-7.2.0.tgz#44ab5dadead1668f6a2790fbdfe70e456346866c" + integrity sha512-c15Q9H5iYE9fnncLnFnMuvPLYA/i0pve5moV0uxJJGr4GgJoBKyldd4CCDhoE80C1k8ABuqr2o2qsopzVEp3Ww== dependencies: - "@commitlint/ensure" "^7.1.2" + "@commitlint/ensure" "^7.2.0" "@commitlint/message" "^7.1.2" "@commitlint/to-lines" "^7.1.2" babel-runtime "^6.23.0" @@ -671,24 +734,28 @@ "@commitlint/to-lines@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-7.1.2.tgz#2277347e50eac2a8d38ab6ab2c70f01b84c5f115" + integrity sha512-Nz3qZwrIEYiN9v/ThJqXAwu4X5+hvT9H8yRPHfjc538R8WhwEfhvym7/4YznDHSvWrQgwqtNPdrb6b2OSBsHmg== "@commitlint/top-level@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-7.1.2.tgz#58f78043546bce0c1bfba36291bc4a812b6426b3" + integrity sha512-YKugOAKy3hgM/ITezPp7Ns51U3xoJfuOsVnMGW4oDcHLhuQ/Qd58ROv/Hgedtk8HugKX3DdZ8XoEnRG70RDGqQ== dependencies: find-up "^2.1.0" "@commitlint/travis-cli@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@commitlint/travis-cli/-/travis-cli-7.1.2.tgz#7de0ed9cc420e0f231119e3ba8fcf73fb7d2a7e9" + version "7.2.1" + resolved "https://registry.yarnpkg.com/@commitlint/travis-cli/-/travis-cli-7.2.1.tgz#ce637a2c6adc1d9eb6f22369d58429fa332e7b1b" + integrity sha512-ePNYSDCALqMq9lu8QqR6Lcn46Llhj7S8PN3YqbSKw5vE3f8ZYAmi5wEfZrxfvPcek3qVFW9b4XsZ0QidRdUpQQ== dependencies: - "@commitlint/cli" "^7.1.2" + "@commitlint/cli" "^7.2.1" babel-runtime "6.26.0" execa "0.9.0" "@marionebl/sander@^0.6.0": version "0.6.1" resolved "https://registry.yarnpkg.com/@marionebl/sander/-/sander-0.6.1.tgz#1958965874f24bc51be48875feb50d642fc41f7b" + integrity sha1-GViWWHTyS8Ub5Ih1/rUNZC/EH3s= dependencies: graceful-fs "^4.1.3" mkdirp "^0.5.1" @@ -697,37 +764,63 @@ "@mrmlnc/readdir-enhanced@^2.2.1": version "2.2.1" resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde" + integrity sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g== dependencies: call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" -"@nodelib/fs.stat@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.2.tgz#54c5a964462be3d4d78af631363c18d6fa91ac26" +"@nodelib/fs.stat@^1.1.2": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" + integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== -"@octokit/rest@^15.2.0": - version "15.12.0" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-15.12.0.tgz#458efa0466ce3b257726bffff869a06da026e954" +"@octokit/endpoint@^3.0.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-3.1.0.tgz#ec60152d018d75d4eed5d8a5fd68c9a1e99f3b50" + integrity sha512-ANAOhyEY40qzOjQPEYXqg3GDGLYTjLDjqQqcG1wgqRoE7qFLnvx5a0upzxpes83UK/YHUu6qTymZl/yTu4GvKg== + dependencies: + deepmerge "2.2.1" + is-plain-object "^2.0.4" + universal-user-agent "^2.0.1" + url-template "^2.0.8" + +"@octokit/request@2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-2.2.0.tgz#f4b2d1ad7c4c8a0b148193610c912046961f8be5" + integrity sha512-4P9EbwKZ4xfyupVMb3KVuHmM+aO2fye3nufjGKz/qDssvdJj9Rlx44O0FdFvUp4kIzToy3AHLTOulEIDAL+dpg== + dependencies: + "@octokit/endpoint" "^3.0.0" + is-plain-object "^2.0.4" + node-fetch "^2.3.0" + universal-user-agent "^2.0.1" + +"@octokit/rest@^16.0.1": + version "16.1.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.1.0.tgz#43bee0f58821b6c6a4c9d63e14919a1fb67a71b5" + integrity sha512-/D1XokSycOE+prxxI2r9cxssiLMqcr+BsEUjdruC67puEEjNJjJoRIkuA1b20jOkX5Ue3Rz99Mu9rTnNmjetUA== dependencies: - before-after-hook "^1.1.0" + "@octokit/request" "2.2.0" + before-after-hook "^1.2.0" btoa-lite "^1.0.0" - debug "^3.1.0" - http-proxy-agent "^2.1.0" - https-proxy-agent "^2.2.0" - lodash "^4.17.4" - node-fetch "^2.1.1" + lodash.get "^4.4.2" + lodash.pick "^4.4.0" + lodash.set "^4.3.2" + lodash.uniq "^4.5.0" + octokit-pagination-methods "^1.1.0" universal-user-agent "^2.0.0" url-template "^2.0.8" "@samverschueren/stream-to-observable@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f" + integrity sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg== dependencies: any-observable "^0.3.0" -"@semantic-release/commit-analyzer@^6.0.0": - version "6.0.1" - resolved "https://registry.yarnpkg.com/@semantic-release/commit-analyzer/-/commit-analyzer-6.0.1.tgz#5acd015130d60e279b6ed2de56b8e0d06169cd3f" +"@semantic-release/commit-analyzer@^6.1.0": + version "6.1.0" + resolved "https://registry.yarnpkg.com/@semantic-release/commit-analyzer/-/commit-analyzer-6.1.0.tgz#32bbe3c23da86e23edf072fbb276fa2f383fcb17" + integrity sha512-2lb+t6muGenI86mYGpZYOgITx9L3oZYF697tJoqXeQEk0uw0fm+OkkOuDTBA3Oax9ftoNIrCKv9bwgYvxrbM6w== dependencies: conventional-changelog-angular "^5.0.0" conventional-commits-filter "^2.0.0" @@ -739,12 +832,14 @@ "@semantic-release/error@^2.2.0": version "2.2.0" resolved "https://registry.yarnpkg.com/@semantic-release/error/-/error-2.2.0.tgz#ee9d5a09c9969eade1ec864776aeda5c5cddbbf0" + integrity sha512-9Tj/qn+y2j+sjCI3Jd+qseGtHjOAeg7dU2/lVcqIQ9TV3QDaDXDYXcoOHU+7o2Hwh8L8ymL4gfuO7KxDs3q2zg== -"@semantic-release/github@^5.0.0": - version "5.0.5" - resolved "https://registry.yarnpkg.com/@semantic-release/github/-/github-5.0.5.tgz#9149b4fd9232f63ee38039c540a800a00a4d9e55" +"@semantic-release/github@^5.1.0": + version "5.2.5" + resolved "https://registry.yarnpkg.com/@semantic-release/github/-/github-5.2.5.tgz#14e53d99f1e84c76b5674b7506f235a7a4cae302" + integrity sha512-myO00q84CyfyzaEZ4OdA7GOMCQKd+juZd5g2Cloh4jV6CyiMyWflZ629RH99wjAVUiwMKnvX2SQ5XPFvO1+FCw== dependencies: - "@octokit/rest" "^15.2.0" + "@octokit/rest" "^16.0.1" "@semantic-release/error" "^2.2.0" aggregate-error "^1.0.0" bottleneck "^2.0.1" @@ -762,28 +857,27 @@ parse-github-url "^1.0.1" url-join "^4.0.0" -"@semantic-release/npm@^5.0.1": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@semantic-release/npm/-/npm-5.0.4.tgz#bef4ff31c9a70cc6db7583e08d2d29741b32d2f8" +"@semantic-release/npm@^5.0.5": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@semantic-release/npm/-/npm-5.1.1.tgz#f05d50ad174b7b90d71367799780e6dedb7797d8" + integrity sha512-5OnV0od1HKp2QjToXxQufvHNG8n+IQlp7h3FjqmZYH7DAHzAGx4NCf/R4p3RhyX5YJEfQl4ZflX9219JVNsuJg== dependencies: "@semantic-release/error" "^2.2.0" aggregate-error "^1.0.0" - detect-indent "^5.0.0" - detect-newline "^2.1.0" execa "^1.0.0" fs-extra "^7.0.0" lodash "^4.17.4" nerf-dart "^1.0.0" - normalize-url "^3.0.0" + normalize-url "^4.0.0" npm "^6.3.0" - parse-json "^4.0.0" rc "^1.2.8" read-pkg "^4.0.0" registry-auth-token "^3.3.1" -"@semantic-release/release-notes-generator@^7.0.0": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@semantic-release/release-notes-generator/-/release-notes-generator-7.0.2.tgz#67f15c53c4f8e68106a74f0364bfb1326ade3e63" +"@semantic-release/release-notes-generator@^7.1.2": + version "7.1.4" + resolved "https://registry.yarnpkg.com/@semantic-release/release-notes-generator/-/release-notes-generator-7.1.4.tgz#8f4f752c5a8385abdaac1256127cef05988bc2ad" + integrity sha512-pWPouZujddgb6t61t9iA9G3yIfp3TeQ7bPbV1ixYSeP6L7gI1+Du82fY/OHfEwyifpymLUQW0XnIKgKct5IMMw== dependencies: conventional-changelog-angular "^5.0.0" conventional-changelog-writer "^4.0.0" @@ -791,223 +885,246 @@ conventional-commits-parser "^3.0.0" debug "^4.0.0" get-stream "^4.0.0" - git-url-parse "^10.0.1" import-from "^2.1.0" - into-stream "^3.1.0" + into-stream "^4.0.0" lodash "^4.17.4" -"@sindresorhus/is@^0.11.0": - version "0.11.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.11.0.tgz#a65970040a5b55c4713452666703b92a6c331fdb" +"@sindresorhus/is@^0.12.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.12.0.tgz#55c37409c809e802efea25911a579731adfc6e07" + integrity sha512-9ve22cGrAKlSRvi8Vb2JIjzcaaQg79531yQHnF+hi/kOpsSj3Om8AyR1wcHrgl0u7U3vYQ7gmF5erZzOp4+51Q== dependencies: symbol-observable "^1.2.0" "@szmarczak/http-timer@^1.1.0": version "1.1.1" resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.1.tgz#6402258dfe467532b26649ef076b4d11f74fb612" + integrity sha512-WljfOGkmSJe8SUkl+4TPvN2ec0dpUGVyfTBQLoXJUiILs+wBSc4Kvp2N3aAWE4VwwDSLGdmD3/bufS5BgZpVSQ== dependencies: defer-to-connect "^1.0.1" "@types/babel-code-frame@^6.20.1": version "6.20.1" resolved "https://registry.yarnpkg.com/@types/babel-code-frame/-/babel-code-frame-6.20.1.tgz#e79a40ea81435034df7b46b5e32e8ed638aea4dd" + integrity sha1-55pA6oFDUDTfe0a14y6O1jiupN0= "@types/events@*": version "1.2.0" - resolved "http://registry.npmjs.org/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" + resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86" + integrity sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA== "@types/glob@*": version "7.1.1" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" + integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== dependencies: "@types/events" "*" "@types/minimatch" "*" "@types/node" "*" "@types/jest@^23.3.9": - version "23.3.9" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.9.tgz#c16b55186ee73ae65e001fbee69d392c51337ad1" + version "23.3.10" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.10.tgz#4897974cc317bf99d4fe6af1efa15957fa9c94de" + integrity sha512-DC8xTuW/6TYgvEg3HEXS7cu9OijFqprVDXXiOcdOKZCU/5PJNLZU37VVvmZHdtMiGOa8wAA/We+JzbdxFzQTRQ== "@types/lodash.isplainobject@^4.0.4": version "4.0.4" resolved "https://registry.yarnpkg.com/@types/lodash.isplainobject/-/lodash.isplainobject-4.0.4.tgz#ac28008a145ea19ac9f6dc46045aa92e11a09322" + integrity sha512-FSXjsYFgJQA42YudKpfSbp9WfKcOdC6xJ62tdFFQJqj2XMvqj+9qLEXBeKZzD55LzngXD/DyQbU2gDMNqMASGw== dependencies: "@types/lodash" "*" "@types/lodash.unescape@^4.0.4": version "4.0.4" resolved "https://registry.yarnpkg.com/@types/lodash.unescape/-/lodash.unescape-4.0.4.tgz#b8eec58cdd642d3a52adc13fbdee1ef0e878a132" + integrity sha512-nLcg2100hVhVubEyFXui5xoSLBS9q9u3Khn03rTTtTV7Q5ABVZOIpF9F3O6vynGNS/dky5vRks6WhrfcvKfedw== dependencies: "@types/lodash" "*" "@types/lodash@*": - version "4.14.117" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.117.tgz#695a7f514182771a1e0f4345d189052ee33c8778" + version "4.14.118" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.118.tgz#247bab39bfcc6d910d4927c6e06cbc70ec376f27" + integrity sha512-iiJbKLZbhSa6FYRip/9ZDX6HXhayXLDGY2Fqws9cOkEQ6XeKfaxB0sC541mowZJueYyMnVUmmG+al5/4fCDrgw== "@types/minimatch@*": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== -"@types/node@*": - version "10.12.2" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.2.tgz#d77f9faa027cadad9c912cd47f4f8b07b0fb0864" - -"@types/node@^10.12.2": - version "10.12.10" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.10.tgz#4fa76e6598b7de3f0cb6ec3abacc4f59e5b3a2ce" +"@types/node@*", "@types/node@^10.12.2": + version "10.12.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.11.tgz#715c476c99a5f6898a1ae61caf9825e43c03912e" + integrity sha512-3iIOhNiPGTdcUNVCv9e5G7GotfvJJe2pc9w2UgDXlUwnxSZ3RgcUocIU+xYm+rTU54jIKih998QE4dMOyMN1NQ== "@types/semver@^5.5.0": version "5.5.0" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45" + integrity sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ== "@types/shelljs@^0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.0.tgz#0caa56b68baae4f68f44e0dd666ab30b098e3632" + integrity sha512-vs1hCC8RxLHRu2bwumNyYRNrU3o8BtZhLysH5A4I98iYmA2APl6R3uNQb5ihl+WiwH0xdC9LLO+vRrXLs/Kyxg== dependencies: "@types/glob" "*" "@types/node" "*" JSONStream@^1.0.4, JSONStream@^1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.4.tgz#615bb2adb0cd34c8f4c447b5f6512fa1d8f16a2e" + version "1.3.5" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" + integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== dependencies: jsonparse "^1.2.0" through ">=2.2.7 <3" -abab@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.4.tgz#5faad9c2c07f60dd76770f71cf025b62a63cfd4e" - abab@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.0.tgz#aba0ab4c5eee2d4c79d3487d85450fb2376ebb0f" + integrity sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w== abbrev@1, abbrev@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== acorn-globals@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.1.0.tgz#ab716025dbe17c54d3ef81d32ece2b2d99fe2538" + version "4.3.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.0.tgz#e3b6f8da3c1552a95ae627571f7dd6923bb54103" + integrity sha512-hMtHj3s5RnuhvHPowpBYvJVj3rAar82JiDQHvGs1zO0l10ocX/xEdBShNHTJaboucJUsScghp74pH3s7EnHHQw== dependencies: - acorn "^5.0.0" + acorn "^6.0.1" + acorn-walk "^6.0.1" + +acorn-walk@^6.0.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" + integrity sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw== -acorn@^5.0.0, acorn@^5.5.3: - version "5.7.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" +acorn@^5.5.3: + version "5.7.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" + integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== + +acorn@^6.0.1: + version "6.0.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.4.tgz#77377e7353b72ec5104550aa2d2097a2fd40b754" + integrity sha512-VY4i5EKSKkofY2I+6QLTbTTN/UvEQPCo6eiwzzSaSWfpaDhOmStMCMod6wmuPciNq+XS0faCglFu2lHZpdHUtg== agent-base@4, agent-base@^4.1.0, agent-base@~4.2.0: version "4.2.1" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" + integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== dependencies: es6-promisify "^5.0.0" agentkeepalive@^3.4.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.1.tgz#4eba75cf2ad258fc09efd506cdb8d8c2971d35a4" + version "3.5.2" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.2.tgz#a113924dd3fa24a0bc3b78108c450c2abee00f67" + integrity sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ== dependencies: humanize-ms "^1.2.1" aggregate-error@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-1.0.0.tgz#888344dad0220a72e3af50906117f48771925fac" + integrity sha1-iINE2tAiCnLjr1CQYRf0h3GSX6w= dependencies: clean-stack "^1.0.0" indent-string "^3.0.0" -ajv@^5.1.0, ajv@^5.3.0: - version "5.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" +ajv@^6.5.5: + version "6.6.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.1.tgz#6360f5ed0d80f232cc2b294c362d5dc2e538dd61" + integrity sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww== dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" + fast-deep-equal "^2.0.1" fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" - -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" ansi-align@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" + integrity sha1-w2rsy6VjuJzrVW82kPCx2eNUf38= dependencies: string-width "^2.0.0" -ansi-escapes@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" - ansi-escapes@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" + integrity sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw== ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= ansi-regex@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= ansi-styles@^3.2.0, ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" ansicolors@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.3.2.tgz#665597de86a9ffe3aa9bfbe6cae5c6ea426b4979" + integrity sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk= ansistyles@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/ansistyles/-/ansistyles-0.1.3.tgz#5de60415bda071bb37127854c864f41b23254539" + integrity sha1-XeYEFb2gcbs3EnhUyGT0GyMlRTk= any-observable@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" + integrity sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog== anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" + integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== dependencies: micromatch "^3.1.4" normalize-path "^2.1.1" -append-transform@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-1.0.0.tgz#046a52ae582a228bd72f58acfbe2967c678759ab" +append-transform@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-0.4.0.tgz#d76ebf8ca94d276e247a36bad44a4b74ab611991" + integrity sha1-126/jKlNJ24keja61EpLdKthGZE= dependencies: - default-require-extensions "^2.0.0" + default-require-extensions "^1.0.0" aproba@^1.0.3, aproba@^1.1.1, aproba@^1.1.2, aproba@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" + integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== "aproba@^1.1.2 || 2": version "2.0.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" + integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== archy@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= are-we-there-yet@~1.1.2: version "1.1.5" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" + integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== dependencies: delegates "^1.0.0" readable-stream "^2.0.6" @@ -1015,120 +1132,147 @@ are-we-there-yet@~1.1.2: argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" argv-formatter@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/argv-formatter/-/argv-formatter-1.0.0.tgz#a0ca0cbc29a5b73e836eebe1cbf6c5e0e4eb82f9" + integrity sha1-oMoMvCmltz6Dbuvhy/bF4OTrgvk= arr-diff@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + integrity sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8= dependencies: arr-flatten "^1.0.1" arr-diff@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" + integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= arr-flatten@^1.0.1, arr-flatten@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" + integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== arr-union@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" + integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= array-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= array-ify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" + integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + integrity sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk= dependencies: array-uniq "^1.0.1" -array-uniq@^1.0.0, array-uniq@^1.0.1: +array-uniq@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= + +array-uniq@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-2.0.0.tgz#0009e30306e37a6dd2e2e2480db5316fdade1583" + integrity sha512-O3QZEr+3wDj7otzF7PjNGs6CA3qmYMLvt5xGkjY/V0VxS+ovvqVo/5wKM/OVOAyuX4DTh9H31zE/yKtO66hTkg== array-unique@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + integrity sha1-odl8yvy8JiXMcPrc6zalDFiwGlM= array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" + integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= asap@^2.0.0: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" + integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= asn1@~0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== dependencies: safer-buffer "~2.1.0" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" + integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= astral-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" + integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== async-limiter@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" - -async@^1.4.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" + integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== async@^2.1.4, async@^2.5.0: version "2.6.1" resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" + integrity sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ== dependencies: lodash "^4.17.10" asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= atob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.1.tgz#ae2d5a729477f289d60dd7f96a6314a22dd6c22a" + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= -aws4@^1.6.0, aws4@^1.8.0: +aws4@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" + integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= dependencies: chalk "^1.1.3" esutils "^2.0.2" @@ -1137,6 +1281,7 @@ babel-code-frame@^6.26.0: babel-core@^6.0.0, babel-core@^6.26.0: version "6.26.3" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" + integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== dependencies: babel-code-frame "^6.26.0" babel-generator "^6.26.0" @@ -1161,6 +1306,7 @@ babel-core@^6.0.0, babel-core@^6.26.0: babel-generator@^6.18.0, babel-generator@^6.26.0: version "6.26.1" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" + integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== dependencies: babel-messages "^6.23.0" babel-runtime "^6.26.0" @@ -1174,13 +1320,15 @@ babel-generator@^6.18.0, babel-generator@^6.26.0: babel-helpers@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" + integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= dependencies: babel-runtime "^6.22.0" babel-template "^6.24.1" -babel-jest@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.4.2.tgz#f276de67798a5d68f2d6e87ff518c2f6e1609877" +babel-jest@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.6.0.tgz#a644232366557a2240a0c083da6b25786185a2f1" + integrity sha512-lqKGG6LYXYu+DQh/slrQ8nxXQkEkhugdXsU6St7GmhVS7Ilc/22ArwqXNJrf0QaOBjZB0360qZMwXqDYQHXaew== dependencies: babel-plugin-istanbul "^4.1.6" babel-preset-jest "^23.2.0" @@ -1188,12 +1336,14 @@ babel-jest@^23.4.2: babel-messages@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" + integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= dependencies: babel-runtime "^6.22.0" babel-plugin-istanbul@^4.1.6: version "4.1.6" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45" + integrity sha512-PWP9FQ1AhZhS01T/4qLSKoHGY/xvkZdVBGlKM/HuxxS3+sC66HhTNR7+MpbO/so/cz/wY94MeSWJuP1hXIPfwQ== dependencies: babel-plugin-syntax-object-rest-spread "^6.13.0" find-up "^2.1.0" @@ -1203,14 +1353,17 @@ babel-plugin-istanbul@^4.1.6: babel-plugin-jest-hoist@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz#e61fae05a1ca8801aadee57a6d66b8cefaf44167" + integrity sha1-5h+uBaHKiAGq3uV6bWa4zvr0QWc= babel-plugin-syntax-object-rest-spread@^6.13.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5" + integrity sha1-/WU28rzhODb/o6VFjEkDpZe7O/U= babel-polyfill@6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" + integrity sha1-N5k3q8Z9eJWXCtxiHyhM2WbPIVM= dependencies: babel-runtime "^6.26.0" core-js "^2.5.0" @@ -1219,6 +1372,7 @@ babel-polyfill@6.26.0: babel-preset-jest@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46" + integrity sha1-jsegOhOPABoaj7HoETZSvxpV2kY= dependencies: babel-plugin-jest-hoist "^23.2.0" babel-plugin-syntax-object-rest-spread "^6.13.0" @@ -1226,6 +1380,7 @@ babel-preset-jest@^23.2.0: babel-register@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" + integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= dependencies: babel-core "^6.26.0" babel-runtime "^6.26.0" @@ -1238,6 +1393,7 @@ babel-register@^6.26.0: babel-runtime@6.26.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" + integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= dependencies: core-js "^2.4.0" regenerator-runtime "^0.11.0" @@ -1245,6 +1401,7 @@ babel-runtime@6.26.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtim babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" + integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= dependencies: babel-runtime "^6.26.0" babel-traverse "^6.26.0" @@ -1255,6 +1412,7 @@ babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0: babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" + integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= dependencies: babel-code-frame "^6.26.0" babel-messages "^6.23.0" @@ -1269,6 +1427,7 @@ babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.26.0: babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" + integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= dependencies: babel-runtime "^6.26.0" esutils "^2.0.2" @@ -1278,14 +1437,17 @@ babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.26.0: babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" + integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" + integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== dependencies: cache-base "^1.0.1" class-utils "^0.3.5" @@ -1298,16 +1460,19 @@ base@^0.11.1: bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= dependencies: tweetnacl "^0.14.3" -before-after-hook@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-1.1.0.tgz#83165e15a59460d13702cb8febd6a1807896db5a" +before-after-hook@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-1.2.0.tgz#1079c10312cd4d4ad0d1676d37951ef8bfc3a563" + integrity sha512-wI3QtdLppHNkmM1VgRVLCrlWCKk/YexlPicYbXPs4eYdd1InrUCTFsx5bX1iUQzzMsoRXXPpM1r+p7JEJJydag== bin-links@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-1.1.2.tgz#fb74bd54bae6b7befc6c6221f25322ac830d9757" + integrity sha512-8eEHVgYP03nILphilltWjeIjMbKyJo3wvp9K816pHbhP301ismzw15mxAAEVQ/USUwcP++1uNrbERbp8lOA6Fg== dependencies: bluebird "^3.5.0" cmd-shim "^2.0.2" @@ -1318,20 +1483,24 @@ bin-links@^1.1.2: block-stream@*: version "0.0.9" resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + integrity sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo= dependencies: inherits "~2.0.0" bluebird@^3.5.0, bluebird@^3.5.1, bluebird@~3.5.1: - version "3.5.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.2.tgz#1be0908e054a751754549c270489c1505d4ab15a" + version "3.5.3" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7" + integrity sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw== bottleneck@^2.0.1: - version "2.11.0" - resolved "https://registry.yarnpkg.com/bottleneck/-/bottleneck-2.11.0.tgz#d91e194ef071ddb88312f13454405e52067ea9cc" + version "2.13.0" + resolved "https://registry.yarnpkg.com/bottleneck/-/bottleneck-2.13.0.tgz#875df17df9e62c76bea42b62af3a45c73a995c4f" + integrity sha512-9YmZ0aiKta2OAxTujKCS/INjGWCIGWK4Ff1nQpgHnR4CTjlk9jcnpaHOjPnMZPtqRXkqwKdtxZgvJ9udsXylaw== boxen@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" + integrity sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw== dependencies: ansi-align "^2.0.0" camelcase "^4.0.0" @@ -1344,6 +1513,7 @@ boxen@^1.2.1: brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" @@ -1351,6 +1521,7 @@ brace-expansion@^1.1.7: braces@^1.8.2: version "1.8.5" resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + integrity sha1-uneWLhLf+WnWt2cR6RS3N4V79qc= dependencies: expand-range "^1.8.1" preserve "^0.2.0" @@ -1359,6 +1530,7 @@ braces@^1.8.2: braces@^2.3.1: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" + integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== dependencies: arr-flatten "^1.1.0" array-unique "^0.3.2" @@ -1372,62 +1544,74 @@ braces@^2.3.1: to-regex "^3.0.1" browser-process-hrtime@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e" + version "0.1.3" + resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" + integrity sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw== browser-resolve@^1.11.3: version "1.11.3" resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" + integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== dependencies: resolve "1.1.7" browserslist@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.1.1.tgz#328eb4ff1215b12df6589e9ab82f8adaa4fc8cd6" + version "4.3.4" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.3.4.tgz#4477b737db6a1b07077275b24791e680d4300425" + integrity sha512-u5iz+ijIMUlmV8blX82VGFrB9ecnUg5qEt55CMZ/YJEhha+d8qpBfOFuutJ6F/VKRXjZoD33b6uvarpPxcl3RA== dependencies: - caniuse-lite "^1.0.30000884" - electron-to-chromium "^1.3.62" - node-releases "^1.0.0-alpha.11" + caniuse-lite "^1.0.30000899" + electron-to-chromium "^1.3.82" + node-releases "^1.0.1" bs-logger@0.x: - version "0.2.5" - resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.5.tgz#1d82f0cf88864e1341cd9262237f8d0748a49b22" + version "0.2.6" + resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" + integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== dependencies: - fast-json-stable-stringify "^2.0.0" + fast-json-stable-stringify "2.x" bser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + integrity sha1-mseNPtXZFYBP2HrLFYvHlxR6Fxk= dependencies: node-int64 "^0.4.0" btoa-lite@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337" + integrity sha1-M3dm2hWAEhD92VbCLpxokaudAzc= buffer-from@1.x, buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" + integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= builtins@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" + integrity sha1-y5T662HIaWRR2zZTThQi+U8K7og= byline@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" + integrity sha1-dBxSFkaOrcRXsDQQEYrXfejB3bE= byte-size@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-4.0.3.tgz#b7c095efc68eadf82985fccd9a2df43a74fa2ccd" + version "4.0.4" + resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-4.0.4.tgz#29d381709f41aae0d89c631f1c81aec88cd40b23" + integrity sha512-82RPeneC6nqCdSwCX2hZUz3JPOvN5at/nTEw/CMf05Smu3Hrpo9Psb7LjN+k+XndNArG1EY8L4+BM3aTM4BCvw== cacache@^10.0.4: version "10.0.4" resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460" + integrity sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA== dependencies: bluebird "^3.5.1" chownr "^1.0.1" @@ -1444,8 +1628,9 @@ cacache@^10.0.4: y18n "^4.0.0" cacache@^11.0.1, cacache@^11.0.2, cacache@^11.2.0: - version "11.2.0" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.2.0.tgz#617bdc0b02844af56310e411c0878941d5739965" + version "11.3.1" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.1.tgz#d09d25f6c4aca7a6d305d141ae332613aa1d515f" + integrity sha512-2PEw4cRRDu+iQvBTTuttQifacYjLPhET+SYO/gEFMy8uhi+jlJREDAjSF5FWSdV/Aw5h18caHA7vMTw2c+wDzA== dependencies: bluebird "^3.5.1" chownr "^1.0.1" @@ -1465,6 +1650,7 @@ cacache@^11.0.1, cacache@^11.0.2, cacache@^11.2.0: cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" + integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== dependencies: collection-visit "^1.0.0" component-emitter "^1.2.1" @@ -1476,9 +1662,10 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" -cacheable-request@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-5.0.0.tgz#7ce347741c48d85c76bc41b78f6bf13e2907056d" +cacheable-request@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-5.2.0.tgz#00c87097835af4caf92a97390660ecadce51187d" + integrity sha512-h1n0vjpFaByTvU6PiyTKk2kx4OnuV1aVUynCUd/FiKl4icpPSceowk3rHczwFEBuZvz+E1EU4KExR0MCPeQfaQ== dependencies: clone-response "^1.0.2" get-stream "^4.0.0" @@ -1491,58 +1678,84 @@ cacheable-request@^5.0.0: call-limit@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/call-limit/-/call-limit-1.1.0.tgz#6fd61b03f3da42a2cd0ec2b60f02bd0e71991fea" + integrity sha1-b9YbA/PaQqLNDsK2DwK9DnGZH+o= call-me-maybe@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" + integrity sha1-JtII6onje1y95gJQoV8DHBak1ms= + +caller-callsite@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" + integrity sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= + dependencies: + callsites "^2.0.0" caller-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f" + integrity sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8= dependencies: callsites "^0.2.0" +caller-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-2.0.0.tgz#468f83044e369ab2010fac5f06ceee15bb2cb1f4" + integrity sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= + dependencies: + caller-callsite "^2.0.0" + callsites@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" + integrity sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo= callsites@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + integrity sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= camelcase-keys@^4.0.0: version "4.2.0" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77" + integrity sha1-oqpfsa9oh1glnDLBQUJteJI7m3c= dependencies: camelcase "^4.1.0" map-obj "^2.0.0" quick-lru "^1.0.0" -camelcase@^1.0.2: - version "1.2.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" - camelcase@^4.0.0, camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= -caniuse-lite@^1.0.30000884: - version "1.0.30000886" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000886.tgz#2127186c4f57da10d3ba26fc3e87dce4a5ddd3ae" +camelcase@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42" + integrity sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA== + +caniuse-lite@^1.0.30000899: + version "1.0.30000912" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000912.tgz#08e650d4090a9c0ab06bfd2b46b7d3ad6dcaea28" + integrity sha512-M3zAtV36U+xw5mMROlTXpAHClmPAor6GPKAMD5Yi7glCB5sbMPFtnQ3rGpk4XqPdUrrTIaVYSJZxREZWNy8QJg== capture-exit@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f" + integrity sha1-HF/MSJ/QqwDU8ax64QcuMXP7q28= dependencies: rsvp "^3.3.3" capture-stack-trace@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz#a6c0bbe1f38f3aa0b92238ecb6ff42c344d4135d" + integrity sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw== cardinal@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-2.1.1.tgz#7cc1055d822d212954d07b085dea251cc7bc5505" + integrity sha1-fMEFXYItISlU0HsIXeolHMe8VQU= dependencies: ansicolors "~0.3.2" redeyed "~2.1.0" @@ -1550,17 +1763,12 @@ cardinal@^2.1.1: caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= chalk@2.3.1: version "2.3.1" - resolved "http://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz#523fe2678aec7b04e8041909292fe8b17059b796" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.1.tgz#523fe2678aec7b04e8041909292fe8b17059b796" + integrity sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g== dependencies: ansi-styles "^3.2.0" escape-string-regexp "^1.0.5" @@ -1569,6 +1777,7 @@ chalk@2.3.1: chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= dependencies: ansi-styles "^2.2.1" escape-string-regexp "^1.0.2" @@ -1579,32 +1788,38 @@ chalk@^1.0.0, chalk@^1.1.3: chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.3.2, chalk@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e" + integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ== dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chownr@^1.0.1, chownr@~1.0.1: +chownr@^1.0.1, chownr@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" + integrity sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g== + +chownr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + integrity sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE= -ci-info@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.3.tgz#710193264bb05c77b8c90d02f5aaf22216a667b2" - -ci-info@^1.4.0: +ci-info@^1.4.0, ci-info@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" + integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A== cidr-regex@^2.0.10: version "2.0.10" resolved "https://registry.yarnpkg.com/cidr-regex/-/cidr-regex-2.0.10.tgz#af13878bd4ad704de77d6dc800799358b3afa70d" + integrity sha512-sB3ogMQXWvreNPbJUZMRApxuRYd+KoIo4RGQ81VatjmMW6WJPo+IJZ2846FGItr9VzKo5w7DXzijPLGtSd0N3Q== dependencies: ip-regex "^2.1.0" class-utils@^0.3.5: version "0.3.6" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" + integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== dependencies: arr-union "^3.1.0" define-property "^0.2.5" @@ -1614,27 +1829,32 @@ class-utils@^0.3.5: clean-stack@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-1.3.0.tgz#9e821501ae979986c46b1d66d2d432db2fd4ae31" + integrity sha1-noIVAa6XmYbEax1m0tQy2y/UrjE= cli-boxes@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" + integrity sha1-T6kXw+WclKAEzWH47lCdplFocUM= cli-columns@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/cli-columns/-/cli-columns-3.1.2.tgz#6732d972979efc2ae444a1f08e08fa139c96a18e" + integrity sha1-ZzLZcpee/CrkRKHwjgj6E5yWoY4= dependencies: string-width "^2.0.0" strip-ansi "^3.0.1" -cli-cursor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" +cli-cursor@^2.0.0, cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" + integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= dependencies: - restore-cursor "^1.0.1" + restore-cursor "^2.0.0" cli-table3@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202" + integrity sha512-7Qg2Jrep1S/+Q3EceiZtQcDPWxhAvBw+ERf1162v4sikJrvojMHFqXt8QIVha8UlH9rgU0BeWPytZ9/TzYqlUw== dependencies: object-assign "^4.1.0" string-width "^2.1.1" @@ -1644,27 +1864,22 @@ cli-table3@^0.5.0: cli-table@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" + integrity sha1-9TsFJmqLGguTSz0IIebi3FkUriM= dependencies: colors "1.0.3" cli-truncate@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" + integrity sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ= dependencies: slice-ansi "0.0.4" string-width "^1.0.1" -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - cliui@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" + integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== dependencies: string-width "^2.1.1" strip-ansi "^4.0.0" @@ -1673,16 +1888,19 @@ cliui@^4.0.0: clone-response@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" + integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= dependencies: mimic-response "^1.0.0" clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= cmd-shim@^2.0.2, cmd-shim@~2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-2.0.2.tgz#6fcbda99483a8fd15d7d30a196ca69d688a2efdb" + integrity sha1-b8vamUg6j9FdfTChlspp1oii79s= dependencies: graceful-fs "^4.1.2" mkdirp "~0.5.0" @@ -1690,89 +1908,95 @@ cmd-shim@^2.0.2, cmd-shim@~2.0.2: co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" + integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= collection-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" + integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= dependencies: map-visit "^1.0.0" object-visit "^1.0.0" color-convert@^1.9.0: - version "1.9.2" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147" + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: - color-name "1.1.1" + color-name "1.1.3" -color-name@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= colors@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" + integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= colors@^1.1.2: version "1.3.2" resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.2.tgz#2df8ff573dfbf255af562f8ce7181d6b971a359b" + integrity sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ== columnify@~1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" + integrity sha1-Rzfd8ce2mop8NAVweC6UfuyOeLs= dependencies: strip-ansi "^3.0.0" wcwidth "^1.0.0" -combined-stream@1.0.6, combined-stream@~1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" - dependencies: - delayed-stream "~1.0.0" - -combined-stream@~1.0.6: +combined-stream@^1.0.6, combined-stream@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828" + integrity sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w== dependencies: delayed-stream "~1.0.0" commander@^2.14.1, commander@^2.9.0: - version "2.18.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970" + version "2.19.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" + integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== commander@~2.17.1: version "2.17.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" + integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= compare-func@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/compare-func/-/compare-func-1.3.2.tgz#99dd0ba457e1f9bc722b12c08ec33eeab31fa648" + integrity sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg= dependencies: array-ify "^1.0.0" dot-prop "^3.0.0" -compare-versions@^3.1.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.3.0.tgz#af93ea705a96943f622ab309578b9b90586f39c3" - component-emitter@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6" + integrity sha1-E3kY1teCg/ffemt8WmPhQOaUJeY= concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= concat-stream@^1.5.0, concat-stream@^1.5.2: version "1.6.2" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== dependencies: buffer-from "^1.0.0" inherits "^2.0.3" @@ -1782,6 +2006,7 @@ concat-stream@^1.5.0, concat-stream@^1.5.2: config-chain@~1.1.11: version "1.1.12" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" + integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== dependencies: ini "^1.3.4" proto-list "~1.2.1" @@ -1789,6 +2014,7 @@ config-chain@~1.1.11: configstore@^3.0.0: version "3.1.2" resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.2.tgz#c6f25defaeef26df12dd33414b001fe81a543f8f" + integrity sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw== dependencies: dot-prop "^4.1.0" graceful-fs "^4.1.2" @@ -1800,27 +2026,31 @@ configstore@^3.0.0: console-control-strings@^1.0.0, console-control-strings@^1.1.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= conventional-changelog-angular@^1.3.3: version "1.6.6" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.6.6.tgz#b27f2b315c16d0a1f23eb181309d0e6a4698ea0f" + integrity sha512-suQnFSqCxRwyBxY68pYTsFkG0taIdinHLNEAX5ivtw8bCRnIgnpvcHmlR/yjUyZIrNPYAoXlY1WiEKWgSE4BNg== dependencies: compare-func "^1.3.1" q "^1.5.1" conventional-changelog-angular@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.1.tgz#f96431b76de453333a909decd02b15cb5bd2d364" + version "5.0.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.2.tgz#39d945635e03b6d0c9d4078b1df74e06163dc66a" + integrity sha512-yx7m7lVrXmt4nKWQgWZqxSALEiAKZhOAcbxdUaU9575mB0CzXVbgrgpfSnSP7OqWDUTYGD0YVJ0MSRdyOPgAwA== dependencies: compare-func "^1.3.1" q "^1.5.1" conventional-changelog-writer@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.0.tgz#3ed983c8ef6a3aa51fe44e82c9c75e86f1b5aa42" + version "4.0.2" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.2.tgz#eb493ed84269e7a663da36e49af51c54639c9a67" + integrity sha512-d8/FQY/fix2xXEBUhOo8u3DCbyEw3UOQgYHxLsPDw+wHUDma/GQGAGsGtoH876WyNs32fViHmTOUrgRKVLvBug== dependencies: compare-func "^1.3.1" - conventional-commits-filter "^2.0.0" + conventional-commits-filter "^2.0.1" dateformat "^3.0.0" handlebars "^4.0.2" json-stringify-safe "^5.0.1" @@ -1833,10 +2063,12 @@ conventional-changelog-writer@^4.0.0: conventional-commit-types@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/conventional-commit-types/-/conventional-commit-types-2.2.0.tgz#5db95739d6c212acbe7b6f656a11b940baa68946" + integrity sha1-XblXOdbCEqy+e29lahG5QLqmiUY= -conventional-commits-filter@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.0.tgz#a0ce1d1ff7a1dd7fab36bee8e8256d348d135651" +conventional-commits-filter@^2.0.0, conventional-commits-filter@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.1.tgz#55a135de1802f6510b6758e0a6aa9e0b28618db3" + integrity sha512-92OU8pz/977udhBjgPEbg3sbYzIxMDFTlQT97w7KdhR9igNqdJvy8smmedAAgn4tPiqseFloKkrVfbXCVd+E7A== dependencies: is-subset "^0.1.1" modify-values "^1.0.0" @@ -1844,6 +2076,7 @@ conventional-commits-filter@^2.0.0: conventional-commits-parser@^2.1.0: version "2.1.7" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz#eca45ed6140d72ba9722ee4132674d639e644e8e" + integrity sha512-BoMaddIEJ6B4QVMSDu9IkVImlGOSGA1I2BQyOZHeLQ6qVOJLcLKn97+fL6dGbzWEiqDzfH4OkcveULmeq2MHFQ== dependencies: JSONStream "^1.0.4" is-text-path "^1.0.0" @@ -1854,8 +2087,9 @@ conventional-commits-parser@^2.1.0: trim-off-newlines "^1.0.0" conventional-commits-parser@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.0.tgz#7f604549a50bd8f60443fbe515484b1c2f06a5c4" + version "3.0.1" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.1.tgz#fe1c49753df3f98edb2285a5e485e11ffa7f2e4c" + integrity sha512-P6U5UOvDeidUJ8ebHVDIoXzI7gMlQ1OF/id6oUvp8cnZvOXMt1n8nYl74Ey9YMn0uVQtxmCtjPQawpsssBWtGg== dependencies: JSONStream "^1.0.4" is-text-path "^1.0.0" @@ -1865,19 +2099,17 @@ conventional-commits-parser@^3.0.0: through2 "^2.0.0" trim-off-newlines "^1.0.0" -convert-source-map@^1.1.0: +convert-source-map@^1.1.0, convert-source-map@^1.4.0, convert-source-map@^1.5.1: version "1.6.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" + integrity sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A== dependencies: safe-buffer "~5.1.1" -convert-source-map@^1.4.0, convert-source-map@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" - copy-concurrently@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" + integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== dependencies: aproba "^1.1.1" fs-write-stream-atomic "^1.0.8" @@ -1889,18 +2121,22 @@ copy-concurrently@^1.0.0: copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" + integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= core-js@^2.4.0, core-js@^2.5.0, core-js@^2.5.7: version "2.5.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" + integrity sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= cosmiconfig@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" + integrity sha512-6e5vDdrXZD+t5v0L8CrurPeybg4Fmf+FCSYxXKYVAqLUtyCSbuyqE059d0kDthTNRzKVjL7QMgNpEUlsoYH3iQ== dependencies: is-directory "^0.3.1" js-yaml "^3.9.0" @@ -1908,9 +2144,11 @@ cosmiconfig@^4.0.0: require-from-string "^2.0.1" cosmiconfig@^5.0.1, cosmiconfig@^5.0.2: - version "5.0.6" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.0.6.tgz#dca6cf680a0bd03589aff684700858c81abeeb39" + version "5.0.7" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.0.7.tgz#39826b292ee0d78eda137dfa3173bd1c21a43b04" + integrity sha512-PcLqxTKiDmNT6pSpy4N6KtuPwb53W+2tzNvwOZw0WH9N6O0vLIBq0x8aj8Oj75ere4YcGi48bDFCL+3fRJdlNA== dependencies: + import-fresh "^2.0.0" is-directory "^0.3.1" js-yaml "^3.9.0" parse-json "^4.0.0" @@ -1918,12 +2156,14 @@ cosmiconfig@^5.0.1, cosmiconfig@^5.0.2: create-error-class@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" + integrity sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y= dependencies: capture-stack-trace "^1.0.0" cross-spawn@^5.0.1: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= dependencies: lru-cache "^4.0.1" shebang-command "^1.2.0" @@ -1932,6 +2172,7 @@ cross-spawn@^5.0.1: cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== dependencies: nice-try "^1.0.4" path-key "^2.0.1" @@ -1942,30 +2183,36 @@ cross-spawn@^6.0.0: crypto-random-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" + integrity sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4= cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": version "0.3.4" resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.4.tgz#8cd52e8a3acfd68d3aed38ee0a640177d2f9d797" + integrity sha512-+7prCSORpXNeR4/fUP3rL+TzqtiFfhMvTd7uEqMdgPvLPt4+uzFUeufx5RHjGTACCargg/DiEt/moMQmvnfkog== cssstyle@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.0.0.tgz#79b16d51ec5591faec60e688891f15d2a5705129" + version "1.1.1" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.1.1.tgz#18b038a9c44d65f7a8e428a653b9f6fe42faf5fb" + integrity sha512-364AI1l/M5TYcFH83JnOH/pSqgaNnKmYgKrm0didZMGKWjQB60dymwWy1rKUgL3J1ffdq9xVi2yGLHdSjjSNog== dependencies: cssom "0.3.x" currently-unhandled@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= dependencies: array-find-index "^1.0.1" cyclist@~0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" + integrity sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA= cz-conventional-changelog@2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cz-conventional-changelog/-/cz-conventional-changelog-2.1.0.tgz#2f4bc7390e3244e4df293e6ba351e4c740a7c764" + integrity sha1-L0vHOQ4yROTfKT5ro1Hkx0Cnx2Q= dependencies: conventional-commit-types "^2.0.0" lodash.map "^4.5.1" @@ -1976,130 +2223,158 @@ cz-conventional-changelog@2.1.0: dargs@^4.0.1: version "4.1.0" resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" + integrity sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc= dependencies: number-is-nan "^1.0.0" dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= dependencies: assert-plus "^1.0.0" data-urls@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.0.0.tgz#24802de4e81c298ea8a9388bb0d8e461c774684f" + version "1.1.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.1.0.tgz#15ee0582baa5e22bb59c77140da8f9c76963bbfe" + integrity sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ== dependencies: - abab "^1.0.4" - whatwg-mimetype "^2.0.0" - whatwg-url "^6.4.0" + abab "^2.0.0" + whatwg-mimetype "^2.2.0" + whatwg-url "^7.0.0" date-fns@^1.27.2: version "1.29.0" resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6" + integrity sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw== dateformat@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" + integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -debug@3.1.0, debug@^3.1.0: +debug@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== dependencies: ms "2.0.0" debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.0.1.tgz#f9bb36d439b8d1f0dd52d8fb6b46e4ebb8c1cd5b" +debug@^3.1.0: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +debug@^4.0.0, debug@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" + integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg== dependencies: ms "^2.1.1" -debuglog@^1.0.1: +debuglog@*, debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" + integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= decamelize-keys@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" + integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= dependencies: decamelize "^1.1.0" map-obj "^1.0.0" -decamelize@^1.0.0, decamelize@^1.1.0, decamelize@^1.1.1: +decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - -decamelize@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-2.0.0.tgz#656d7bbc8094c4c788ea53c5840908c9c7d063c7" - dependencies: - xregexp "4.0.0" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= decompress-response@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= dependencies: mimic-response "^1.0.0" dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" + integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" + integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -default-require-extensions@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-2.0.0.tgz#f5f8fbb18a7d6d50b21f641f649ebb522cfe24f7" +deepmerge@2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.2.1.tgz#5d3ff22a01c00f645405a2fbc17d0778a1801170" + integrity sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA== + +default-require-extensions@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8" + integrity sha1-836hXT4T/9m0N9M+GnW1+5eHTLg= dependencies: - strip-bom "^3.0.0" + strip-bom "^2.0.0" defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= dependencies: clone "^1.0.2" defer-to-connect@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.0.1.tgz#41ec1dd670dc4c6dcbe7e54c9e44d784d025fe63" + integrity sha512-2e0FJesseUqQj671gvZWfUyxpnFx/5n4xleamlpCD3U6Fm5dh5qzmmLNxNhtmHF06+SYVHH8QU6FACffYTnj0Q== define-properties@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94" + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== dependencies: - foreach "^2.0.5" - object-keys "^1.0.8" + object-keys "^1.0.12" define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" + integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= dependencies: is-descriptor "^0.1.0" define-property@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" + integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= dependencies: is-descriptor "^1.0.0" define-property@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" + integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== dependencies: is-descriptor "^1.0.2" isobject "^3.0.1" @@ -2107,32 +2382,39 @@ define-property@^2.0.2: delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= detect-indent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" + integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= dependencies: repeating "^2.0.0" -detect-indent@^5.0.0, detect-indent@~5.0.0: +detect-indent@~5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" + integrity sha1-OHHMCmoALow+Wzz38zYmRnXwa50= detect-libc@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" + integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= detect-newline@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= dezalgo@^1.0.0, dezalgo@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456" + integrity sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY= dependencies: asap "^2.0.0" wrappy "1" @@ -2140,10 +2422,12 @@ dezalgo@^1.0.0, dezalgo@~1.0.3: diff@^3.2.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== dir-glob@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.0.0.tgz#0b205d2b6aef98238ca286598a8204d29d0a0034" + integrity sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag== dependencies: arrify "^1.0.1" path-type "^3.0.0" @@ -2151,38 +2435,45 @@ dir-glob@^2.0.0: domexception@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" + integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== dependencies: webidl-conversions "^4.0.2" dot-prop@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177" + integrity sha1-G3CK8JSknJoOfbyteQq6U52sEXc= dependencies: is-obj "^1.0.0" dot-prop@^4.1.0: version "4.2.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57" + integrity sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ== dependencies: is-obj "^1.0.0" dotenv@^5.0.1: version "5.0.1" - resolved "http://registry.npmjs.org/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef" + integrity sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow== duplexer2@~0.1.0: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" + integrity sha1-ixLauHjA1p4+eJEFFmKjL8a93ME= dependencies: readable-stream "^2.0.2" duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= duplexify@^3.4.2, duplexify@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.0.tgz#592903f5d80b38d037220541264d69a198fb3410" + version "3.6.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.6.1.tgz#b1a7a29c4abfd639585efaecce80d666b1e34125" + integrity sha512-vM58DwdnKmty+FSPzT14K9JXb90H+j5emaR4KYbr2KTIz00WHGbWOe5ghQTx233ZCLZtrGDALzKwcjEtSt35mA== dependencies: end-of-stream "^1.0.0" inherits "^2.0.1" @@ -2192,6 +2483,7 @@ duplexify@^3.4.2, duplexify@^3.6.0: ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= dependencies: jsbn "~0.1.0" safer-buffer "^2.1.0" @@ -2199,30 +2491,36 @@ ecc-jsbn@~0.1.1: editor@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/editor/-/editor-1.0.0.tgz#60c7f87bd62bcc6a894fa8ccd6afb7823a24f742" + integrity sha1-YMf4e9YrzGqJT6jM1q+3gjok90I= -electron-to-chromium@^1.3.62: - version "1.3.70" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.70.tgz#ded377256d92d81b4257d36c65aa890274afcfd2" +electron-to-chromium@^1.3.82: + version "1.3.86" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.86.tgz#a45ea01da5b26500d12bca5e0f194ebb3e1fd14e" + integrity sha512-BcmXOu37FCPxrrh0wyKgKi5dAjIu2ohxN5ptapkLPKRC3IBK2NeIwh9n1x/8HzSRQiEKamJkDce1ZgOGgEX9iw== elegant-spinner@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e" + integrity sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4= encoding@^0.1.11: version "0.1.12" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" + integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= dependencies: iconv-lite "~0.4.13" end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.1" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" + integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== dependencies: once "^1.4.0" env-ci@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/env-ci/-/env-ci-3.0.0.tgz#16f022753562dee387e0bdca3dd629a497ed67b5" + version "3.1.2" + resolved "https://registry.yarnpkg.com/env-ci/-/env-ci-3.1.2.tgz#ee3c78cd24f61ee12aca8b69ecdf0a97ca3ceb5b" + integrity sha512-qJ+ug5OEHEK6HyjhEB0z2tPJCmdvemQE3WUUYEe7qj7teZIJGjZK9elWB4kxE8qRdVHWl4aBvyVmX0Y5xlMbBw== dependencies: execa "^1.0.0" java-properties "^0.2.9" @@ -2230,22 +2528,26 @@ env-ci@^3.0.0: err-code@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" + integrity sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA= errno@~0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" + integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== dependencies: prr "~1.0.1" error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" es-abstract@^1.5.1: version "1.12.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" + integrity sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA== dependencies: es-to-primitive "^1.1.1" function-bind "^1.1.1" @@ -2254,30 +2556,35 @@ es-abstract@^1.5.1: is-regex "^1.0.4" es-to-primitive@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" + version "1.2.0" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" + integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== dependencies: - is-callable "^1.1.1" + is-callable "^1.1.4" is-date-object "^1.0.1" - is-symbol "^1.0.1" + is-symbol "^1.0.2" es6-promise@^4.0.3: version "4.2.5" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.5.tgz#da6d0d5692efb461e082c14817fe2427d8f5d054" + integrity sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg== es6-promisify@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= dependencies: es6-promise "^4.0.3" escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= escodegen@^1.9.1: version "1.11.0" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.11.0.tgz#b27a9389481d5bfd5bec76f7bb1eb3f8f4556589" + integrity sha512-IeMV45ReixHS53K/OmfKAIztN/igDHzTJUhZM3k1jMhIZWjk45SMwAtBsEXiJp3vSPmTcu6CXn7mDvFHRN66fw== dependencies: esprima "^3.1.3" estraverse "^4.2.0" @@ -2289,28 +2596,34 @@ escodegen@^1.9.1: esprima@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" + integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= esprima@^4.0.0, esprima@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" + integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" + integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= exec-sh@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.2.tgz#2a5e7ffcbd7d0ba2755bdecb16e5a427dfbdec36" + integrity sha512-FIUCJz1RbuS0FKTdaAafAByGS0CPvU3R0MeHxgtl+djzCc//F8HakL8GzmVNZanasTbTAY/3DRFA0KpVqj/eAw== dependencies: merge "^1.2.0" execa@0.9.0, execa@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01" + integrity sha512-BbUMBiX4hqiHZUA5+JujIjNb6TyAlp2D5KLheMjMluwOuzcnylDL4AxZYLLn1n2AGB49eSWwyKvvEQoRpnAtmA== dependencies: cross-spawn "^5.0.1" get-stream "^3.0.0" @@ -2323,6 +2636,7 @@ execa@0.9.0, execa@^0.9.0: execa@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50" + integrity sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw== dependencies: cross-spawn "^6.0.0" get-stream "^3.0.0" @@ -2335,6 +2649,7 @@ execa@^0.10.0: execa@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= dependencies: cross-spawn "^5.0.1" get-stream "^3.0.0" @@ -2347,6 +2662,7 @@ execa@^0.7.0: execa@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== dependencies: cross-spawn "^6.0.0" get-stream "^4.0.0" @@ -2356,23 +2672,22 @@ execa@^1.0.0: signal-exit "^3.0.0" strip-eof "^1.0.0" -exit-hook@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" - exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" + integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= expand-brackets@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + integrity sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s= dependencies: is-posix-bracket "^0.1.0" expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" + integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= dependencies: debug "^2.3.3" define-property "^0.2.5" @@ -2385,46 +2700,53 @@ expand-brackets@^2.1.4: expand-range@^1.8.1: version "1.8.2" resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + integrity sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc= dependencies: fill-range "^2.1.0" -expect@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-23.4.0.tgz#6da4ecc99c1471253e7288338983ad1ebadb60c3" +expect@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-23.6.0.tgz#1e0c8d3ba9a581c87bd71fb9bc8862d443425f98" + integrity sha512-dgSoOHgmtn/aDGRVFWclQyPDKl2CQRq0hmIEoUAuQs/2rn2NcvCWcSCovm6BLeuB/7EZuLGu2QfnR+qRt5OM4w== dependencies: ansi-styles "^3.2.0" - jest-diff "^23.2.0" + jest-diff "^23.6.0" jest-get-type "^22.1.0" - jest-matcher-utils "^23.2.0" + jest-matcher-utils "^23.6.0" jest-message-util "^23.4.0" jest-regex-util "^23.3.0" extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= dependencies: is-extendable "^0.1.0" extend-shallow@^3.0.0, extend-shallow@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" + integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= dependencies: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@~3.0.1, extend@~3.0.2: +extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== extglob@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + integrity sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE= dependencies: is-extglob "^1.0.0" extglob@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" + integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== dependencies: array-unique "^0.3.2" define-property "^1.0.0" @@ -2438,47 +2760,56 @@ extglob@^2.0.4: extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= extsprintf@^1.2.0: version "1.4.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= -fast-deep-equal@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" +fast-deep-equal@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" + integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= fast-glob@^2.0.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.2.tgz#71723338ac9b4e0e2fff1d6748a2a13d5ed352bf" + version "2.2.4" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.4.tgz#e54f4b66d378040e0e4d6a68ec36bbc5b04363c0" + integrity sha512-FjK2nCGI/McyzgNtTESqaWP3trPvHyRyoyY70hxjc3oKPNmDe8taohLZpoVKoUjW85tbU5txaYUZCNtVzygl1g== dependencies: "@mrmlnc/readdir-enhanced" "^2.2.1" - "@nodelib/fs.stat" "^1.0.1" + "@nodelib/fs.stat" "^1.1.2" glob-parent "^3.1.0" is-glob "^4.0.0" - merge2 "^1.2.1" + merge2 "^1.2.3" micromatch "^3.1.10" fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" + integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= fb-watchman@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + integrity sha1-VOmr99+i8mzZsWNsWIwa/AXeXVg= dependencies: bser "^2.0.0" figgy-pudding@^3.0.0, figgy-pudding@^3.1.0, figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" + integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w== figures@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + integrity sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4= dependencies: escape-string-regexp "^1.0.5" object-assign "^4.1.0" @@ -2486,16 +2817,19 @@ figures@^1.7.0: figures@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= dependencies: escape-string-regexp "^1.0.5" filename-regex@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + integrity sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY= fileset@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + integrity sha1-jnVIqW08wjJ+5eZ0FocjozO7oqA= dependencies: glob "^7.0.3" minimatch "^3.0.3" @@ -2503,6 +2837,7 @@ fileset@^2.0.2: fill-range@^2.1.0: version "2.2.4" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.4.tgz#eb1e773abb056dcd8df2bfdf6af59b8b3a936565" + integrity sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q== dependencies: is-number "^2.1.0" isobject "^2.0.0" @@ -2513,6 +2848,7 @@ fill-range@^2.1.0: fill-range@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" + integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= dependencies: extend-shallow "^2.0.1" is-number "^3.0.0" @@ -2522,6 +2858,7 @@ fill-range@^4.0.0: find-cache-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f" + integrity sha1-kojj6ePMN0hxfTnq3hfPcfww7m8= dependencies: commondir "^1.0.1" make-dir "^1.0.0" @@ -2530,14 +2867,17 @@ find-cache-dir@^1.0.0: find-npm-prefix@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/find-npm-prefix/-/find-npm-prefix-1.0.2.tgz#8d8ce2c78b3b4b9e66c8acc6a37c231eb841cfdf" + integrity sha512-KEftzJ+H90x6pcKtdXZEPsQse8/y/UnvzRKrOSQFprnrGaFuJ62fVkP34Iu2IYuMvyauCyoLTNkJZgrrGA2wkA== find-parent-dir@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54" + integrity sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ= find-up@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= dependencies: path-exists "^2.0.0" pinkie-promise "^2.0.0" @@ -2545,25 +2885,29 @@ find-up@^1.0.0: find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= dependencies: locate-path "^2.0.0" find-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== dependencies: locate-path "^3.0.0" -find-versions@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-2.0.0.tgz#2ad90d490f6828c1aa40292cf709ac3318210c3c" +find-versions@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-3.0.0.tgz#2c05a86e839c249101910100b354196785a2c065" + integrity sha512-IUvtItVFNmTtKoB0PRfbkR0zR9XMG5rWNO3qI1S8L0zdv+v2gqzM0pAunloxqbqAfT8w7bg8n/5gHzTXte8H5A== dependencies: - array-uniq "^1.0.0" - semver-regex "^1.0.0" + array-uniq "^2.0.0" + semver-regex "^2.0.0" flush-write-stream@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd" + integrity sha512-calZMC10u0FMUqoiunI2AiGIIUtUIvifNwkHhNupZH4cbNnW1Itkoh/Nf5HFYmDrwWPjrUxpkZT0KhuCq0jmGw== dependencies: inherits "^2.0.1" readable-stream "^2.0.4" @@ -2571,38 +2915,40 @@ flush-write-stream@^1.0.0: for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= for-own@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + integrity sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4= dependencies: for-in "^1.0.1" -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= -form-data@~2.3.1, form-data@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== dependencies: asynckit "^0.4.0" - combined-stream "1.0.6" + combined-stream "^1.0.6" mime-types "^2.1.12" fragment-cache@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" + integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= dependencies: map-cache "^0.2.2" from2@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-1.3.0.tgz#88413baaa5f9a597cfde9221d86986cd3c061dfd" + integrity sha1-iEE7qqX5pZfP3pIh2GmGzTwGHf0= dependencies: inherits "~2.0.1" readable-stream "~1.1.10" @@ -2610,13 +2956,15 @@ from2@^1.3.0: from2@^2.1.0, from2@^2.1.1: version "2.3.0" resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" + integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= dependencies: inherits "^2.0.1" readable-stream "^2.0.0" fs-extra@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.0.tgz#8cc3f47ce07ef7b3593a11b9fb245f7e34c041d6" + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== dependencies: graceful-fs "^4.1.2" jsonfile "^4.0.0" @@ -2625,12 +2973,14 @@ fs-extra@^7.0.0: fs-minipass@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" + integrity sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ== dependencies: minipass "^2.2.1" fs-vacuum@^1.2.10, fs-vacuum@~1.2.10: version "1.2.10" resolved "https://registry.yarnpkg.com/fs-vacuum/-/fs-vacuum-1.2.10.tgz#b7629bec07a4031a2548fdf99f5ecf1cc8b31e36" + integrity sha1-t2Kb7AekAxolSP35n17PHMizHjY= dependencies: graceful-fs "^4.1.2" path-is-inside "^1.0.1" @@ -2639,6 +2989,7 @@ fs-vacuum@^1.2.10, fs-vacuum@~1.2.10: fs-write-stream-atomic@^1.0.8, fs-write-stream-atomic@~1.0.10: version "1.0.10" resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" + integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= dependencies: graceful-fs "^4.1.2" iferr "^0.1.5" @@ -2648,10 +2999,12 @@ fs-write-stream-atomic@^1.0.8, fs-write-stream-atomic@~1.0.10: fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@^1.2.3: version "1.2.4" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" + integrity sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg== dependencies: nan "^2.9.2" node-pre-gyp "^0.10.0" @@ -2659,6 +3012,7 @@ fsevents@^1.2.3: fstream@^1.0.0, fstream@^1.0.2: version "1.0.11" resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" + integrity sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE= dependencies: graceful-fs "^4.1.2" inherits "~2.0.0" @@ -2668,10 +3022,12 @@ fstream@^1.0.0, fstream@^1.0.2: function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" + integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= dependencies: aproba "^1.0.3" console-control-strings "^1.0.0" @@ -2682,13 +3038,15 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" -genfun@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/genfun/-/genfun-4.0.1.tgz#ed10041f2e4a7f1b0a38466d17a5c3e27df1dfc1" +genfun@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" + integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA== gentle-fs@^2.0.0, gentle-fs@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/gentle-fs/-/gentle-fs-2.0.1.tgz#585cfd612bfc5cd52471fdb42537f016a5ce3687" + integrity sha512-cEng5+3fuARewXktTEGbwsktcldA+YsnUEaXZwcK/3pjSE1X9ObnTs+/8rYf8s+RnIcQm2D5x3rwpN7Zom8Bew== dependencies: aproba "^1.1.2" fs-vacuum "^1.2.10" @@ -2702,38 +3060,46 @@ gentle-fs@^2.0.0, gentle-fs@^2.0.1: get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" + integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== -get-own-enumerable-property-symbols@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-2.0.1.tgz#5c4ad87f2834c4b9b4e84549dc1e0650fb38c24b" +get-own-enumerable-property-symbols@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz#b877b49a5c16aefac3655f2ed2ea5b684df8d203" + integrity sha512-CIJYJC4GGF06TakLg8z4GQKvDsx9EMspVxOYih7LerEL/WosUnFIww45CGfxfeKHqlg3twgUrYRT1O3WQqjGCg== get-stdin@5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" + integrity sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g= get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= -get-stream@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.0.0.tgz#9e074cb898bd2b9ebabb445a1766d7f43576d977" +get-stream@^4.0.0, get-stream@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== dependencies: pump "^3.0.0" get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" + integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= dependencies: assert-plus "^1.0.0" git-log-parser@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/git-log-parser/-/git-log-parser-1.2.0.tgz#2e6a4c1b13fc00028207ba795a7ac31667b9fd4a" + integrity sha1-LmpMGxP8AAKCB7p5WnrDFme5/Uo= dependencies: argv-formatter "~1.0.0" spawn-error-forwarder "~1.0.0" @@ -2745,6 +3111,7 @@ git-log-parser@^1.2.0: git-raw-commits@^1.3.0: version "1.3.6" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.3.6.tgz#27c35a32a67777c1ecd412a239a6c19d71b95aff" + integrity sha512-svsK26tQ8vEKnMshTDatSIQSMDdz8CxIIqKsvPqbtV23Etmw6VNaFAitu8zwZ0VrOne7FztwPyRLxK7/DIUTQg== dependencies: dargs "^4.0.1" lodash.template "^4.0.2" @@ -2752,22 +3119,10 @@ git-raw-commits@^1.3.0: split2 "^2.0.0" through2 "^2.0.0" -git-up@^2.0.0: - version "2.0.10" - resolved "https://registry.yarnpkg.com/git-up/-/git-up-2.0.10.tgz#20fe6bafbef4384cae253dc4f463c49a0c3bd2ec" - dependencies: - is-ssh "^1.3.0" - parse-url "^1.3.0" - -git-url-parse@^10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-10.0.1.tgz#75f153b24ac7297447fc583cf9fac23a5ae687c1" - dependencies: - git-up "^2.0.0" - glob-base@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + integrity sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q= dependencies: glob-parent "^2.0.0" is-glob "^2.0.0" @@ -2775,12 +3130,14 @@ glob-base@^0.3.0: glob-parent@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + integrity sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg= dependencies: is-glob "^2.0.0" glob-parent@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= dependencies: is-glob "^3.1.0" path-dirname "^1.0.0" @@ -2788,10 +3145,12 @@ glob-parent@^3.1.0: glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" + integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@7.1.2, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: +glob@7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + integrity sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -2800,9 +3159,10 @@ glob@7.1.2, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -glob@~7.1.2: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.2: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -2814,20 +3174,24 @@ glob@~7.1.2: global-dirs@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" + integrity sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU= dependencies: ini "^1.3.4" globals@^11.1.0: - version "11.7.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673" + version "11.9.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.9.0.tgz#bde236808e987f290768a93d065060d78e6ab249" + integrity sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg== globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== globby@^8.0.0: version "8.0.1" resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.1.tgz#b5ad48b8aa80b35b814fc1281ecc851f1d2b5b50" + integrity sha512-oMrYrJERnKBLXNLVTqhm3vPEdJ/b2ZE28xN4YARiix1NOIOBPEpOUnm844K1iu/BkphCaf2WNFwMszv8Soi1pw== dependencies: array-union "^1.0.1" dir-glob "^2.0.0" @@ -2839,7 +3203,8 @@ globby@^8.0.0: got@^6.7.1: version "6.7.1" - resolved "http://registry.npmjs.org/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" + resolved "https://registry.yarnpkg.com/got/-/got-6.7.1.tgz#240cd05785a9a18e561dc1b44b41c763ef1e8db0" + integrity sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA= dependencies: create-error-class "^3.0.0" duplexer3 "^0.1.4" @@ -2854,31 +3219,36 @@ got@^6.7.1: url-parse-lax "^1.0.0" got@^9.1.0: - version "9.2.2" - resolved "https://registry.yarnpkg.com/got/-/got-9.2.2.tgz#d6cb73f40d4cb512864c2f66f275f258ab43aa25" + version "9.3.2" + resolved "https://registry.yarnpkg.com/got/-/got-9.3.2.tgz#f6e3bd063aa8f461ccd924afa2ba2b61deab3989" + integrity sha512-OyKOUg71IKvwb8Uj0KP6EN3+qVVvXmYsFznU1fnwUnKtDbZnwSlAi7muNlu4HhBfN9dImtlgg9e7H0g5qVdaeQ== dependencies: - "@sindresorhus/is" "^0.11.0" + "@sindresorhus/is" "^0.12.0" "@szmarczak/http-timer" "^1.1.0" - cacheable-request "^5.0.0" + cacheable-request "^5.1.0" decompress-response "^3.3.0" duplexer3 "^0.1.4" - get-stream "^4.0.0" + get-stream "^4.1.0" + lowercase-keys "^1.0.1" mimic-response "^1.0.1" - p-cancelable "^0.5.0" + p-cancelable "^1.0.0" to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@~4.1.11: - version "4.1.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + version "4.1.15" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" + integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== growly@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= -handlebars@^4.0.2: +handlebars@^4.0.2, handlebars@^4.0.3: version "4.0.12" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.12.tgz#2c15c8a96d46da5e266700518ba8cb8d919d5bc5" + integrity sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA== dependencies: async "^2.5.0" optimist "^0.6.1" @@ -2886,55 +3256,50 @@ handlebars@^4.0.2: optionalDependencies: uglify-js "^3.1.4" -handlebars@^4.0.3: - version "4.0.11" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" - dependencies: - async "^1.4.0" - optimist "^0.6.1" - source-map "^0.4.4" - optionalDependencies: - uglify-js "^2.6" - har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - -har-validator@~5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" - dependencies: - ajv "^5.1.0" - har-schema "^2.0.0" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= har-validator@~5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.0.tgz#44657f5688a22cfd4b72486e81b3a3fb11742c29" + version "5.1.3" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" + integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== dependencies: - ajv "^5.3.0" + ajv "^6.5.5" har-schema "^2.0.0" has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= dependencies: ansi-regex "^2.0.0" has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-symbols@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" + integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= has-unicode@^2.0.0, has-unicode@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= has-value@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" + integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= dependencies: get-value "^2.0.3" has-values "^0.1.4" @@ -2943,6 +3308,7 @@ has-value@^0.3.1: has-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" + integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= dependencies: get-value "^2.0.6" has-values "^1.0.0" @@ -2951,10 +3317,12 @@ has-value@^1.0.0: has-values@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" + integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= has-values@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" + integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= dependencies: is-number "^3.0.0" kind-of "^4.0.0" @@ -2962,12 +3330,14 @@ has-values@^1.0.0: has@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== dependencies: function-bind "^1.1.1" home-or-tmp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" + integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= dependencies: os-homedir "^1.0.0" os-tmpdir "^1.0.1" @@ -2975,32 +3345,39 @@ home-or-tmp@^2.0.0: home-or-tmp@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-3.0.0.tgz#57a8fe24cf33cdd524860a15821ddc25c86671fb" + integrity sha1-V6j+JM8zzdUkhgoVgh3cJchmcfs= hook-std@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/hook-std/-/hook-std-1.1.0.tgz#7f76b74b6f96d3cd4106afb50a66bdb0af2d2a2d" + version "1.2.0" + resolved "https://registry.yarnpkg.com/hook-std/-/hook-std-1.2.0.tgz#b37d533ea5f40068fe368cb4d022ee1992588c27" + integrity sha512-yntre2dbOAjgQ5yoRykyON0D9T96BfshR8IuiL/r3celeHD8I/76w4qo8m3z99houR4Z678jakV3uXrQdSvW/w== hosted-git-info@^2.1.4, hosted-git-info@^2.6.0, hosted-git-info@^2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" + integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w== html-encoding-sniffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" + integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== dependencies: whatwg-encoding "^1.0.1" http-cache-semantics@^3.8.1: version "3.8.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" + integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== http-cache-semantics@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz#2d0069a73c36c80e3297bc3a0cadd669b78a69ce" + version "4.0.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#6c2ef57e22090b177828708a52eaeae9d1d63e1b" + integrity sha512-OO/9K7uFN30qwAKvslzmCTbimZ/uRjtdN5S50vvWLwUKqFuZj0n96XyCzF5tHRHEO/Q4JYC01hv41gkX06gmHA== http-proxy-agent@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== dependencies: agent-base "4" debug "3.1.0" @@ -3008,6 +3385,7 @@ http-proxy-agent@^2.1.0: http-signature@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= dependencies: assert-plus "^1.0.0" jsprim "^1.2.2" @@ -3016,6 +3394,7 @@ http-signature@~1.2.0: https-proxy-agent@^2.2.0, https-proxy-agent@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0" + integrity sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ== dependencies: agent-base "^4.1.0" debug "^3.1.0" @@ -3023,79 +3402,90 @@ https-proxy-agent@^2.2.0, https-proxy-agent@^2.2.1: humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" + integrity sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0= dependencies: ms "^2.0.0" husky@0.14.3: version "0.14.3" resolved "https://registry.yarnpkg.com/husky/-/husky-0.14.3.tgz#c69ed74e2d2779769a17ba8399b54ce0b63c12c3" + integrity sha512-e21wivqHpstpoiWA/Yi8eFti8E+sQDSS53cpJsPptPs295QTOQR0ZwnHo2TXy1XOpZFD9rPOd3NpmqTK6uMLJA== dependencies: is-ci "^1.0.10" normalize-path "^1.0.0" strip-indent "^2.0.0" -iconv-lite@0.4.19: - version "0.4.19" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" - -iconv-lite@^0.4.4: - version "0.4.23" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" - dependencies: - safer-buffer ">= 2.1.2 < 3" - -iconv-lite@~0.4.13: +iconv-lite@0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" iferr@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" + integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= iferr@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/iferr/-/iferr-1.0.2.tgz#e9fde49a9da06dc4a4194c6c9ed6d08305037a6d" + integrity sha512-9AfeLfji44r5TKInjhz3W9DyZI1zR1JAf2hVBMGhddAKPqBsupb89jGfbCTHIGZd6fGZl9WlHdn4AObygyMKwg== ignore-walk@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8" + integrity sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ== dependencies: minimatch "^3.0.4" ignore@^3.3.5: version "3.3.10" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" + integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== + +import-fresh@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" + integrity sha1-2BNVwVYS04bGH53dOSLUMEgipUY= + dependencies: + caller-path "^2.0.0" + resolve-from "^3.0.0" import-from@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-from/-/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1" + integrity sha1-M1238qev/VOqpHHUuAId7ja387E= dependencies: resolve-from "^3.0.0" import-lazy@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" + integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= import-local@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc" + integrity sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ== dependencies: pkg-dir "^2.0.0" resolve-cwd "^2.0.0" -imurmurhash@^0.1.4: +imurmurhash@*, imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= indent-string@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" + integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= inflight@^1.0.4, inflight@~1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= dependencies: once "^1.3.0" wrappy "1" @@ -3103,14 +3493,17 @@ inflight@^1.0.4, inflight@~1.0.6: inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" + integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== init-package-json@^1.10.3: version "1.10.3" resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-1.10.3.tgz#45ffe2f610a8ca134f2bd1db5637b235070f6cbe" + integrity sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw== dependencies: glob "^7.1.1" npm-package-arg "^4.0.0 || ^5.0.0 || ^6.0.0" @@ -3124,97 +3517,116 @@ init-package-json@^1.10.3: interpret@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" + integrity sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ= -into-stream@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-3.1.0.tgz#96fb0a936c12babd6ff1752a17d05616abd094c6" +into-stream@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/into-stream/-/into-stream-4.0.0.tgz#ef10ee2ffb6f78af34c93194bbdc36c35f7d8a9d" + integrity sha512-i29KNyE5r0Y/UQzcQ0IbZO1MYJ53Jn0EcFRZPj5FzWKYH17kDFEOwuA+3jroymOI06SW1dEDnly9A1CAreC5dg== dependencies: from2 "^2.1.1" - p-is-promise "^1.1.0" + p-is-promise "^2.0.0" -invariant@^2.2.2: +invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" + integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== dependencies: loose-envify "^1.0.0" invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= invert-kv@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== ip-regex@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" + integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= ip@^1.1.4, ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" + integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= is-accessor-descriptor@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" + integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= dependencies: kind-of "^3.0.2" is-accessor-descriptor@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" + integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== dependencies: kind-of "^6.0.0" is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= is-buffer@^1.1.5: version "1.1.6" resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" + integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== is-builtin-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + integrity sha1-VAVy0096wxGfj3bDDLwbHgN6/74= dependencies: builtin-modules "^1.0.0" -is-callable@^1.1.1, is-callable@^1.1.3: +is-callable@^1.1.3, is-callable@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" + integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== is-ci@^1.0.10: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5" + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.2.1.tgz#e3779c8ee17fccf428488f6e281187f2e632841c" + integrity sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg== dependencies: - ci-info "^1.0.0" + ci-info "^1.5.0" is-cidr@^2.0.6: version "2.0.7" resolved "https://registry.yarnpkg.com/is-cidr/-/is-cidr-2.0.7.tgz#0fd4b863c26b2eb2d157ed21060c4f3f8dd356ce" + integrity sha512-YfOm5liUO1RoYfFh+lhiGNYtbLzem7IXzFqvfjXh+zLCEuAiznTBlQ2QcMWxsgYeOFmjzljOxJfmZID4/cRBAQ== dependencies: cidr-regex "^2.0.10" is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" + integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= dependencies: kind-of "^3.0.2" is-data-descriptor@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" + integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== dependencies: kind-of "^6.0.0" is-date-object@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" + integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= is-descriptor@^0.1.0: version "0.1.6" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" + integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== dependencies: is-accessor-descriptor "^0.1.6" is-data-descriptor "^0.1.4" @@ -3223,6 +3635,7 @@ is-descriptor@^0.1.0: is-descriptor@^1.0.0, is-descriptor@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" + integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== dependencies: is-accessor-descriptor "^1.0.0" is-data-descriptor "^1.0.0" @@ -3231,76 +3644,91 @@ is-descriptor@^1.0.0, is-descriptor@^1.0.2: is-directory@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/is-directory/-/is-directory-0.3.1.tgz#61339b6f2475fc772fd9c9d83f5c8575dc154ae1" + integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= is-dotfile@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.3.tgz#a6a2f32ffd2dfb04f5ca25ecd0f6b83cf798a1e1" + integrity sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE= is-equal-shallow@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + integrity sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ= dependencies: is-primitive "^2.0.0" is-extendable@^0.1.0, is-extendable@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= is-extendable@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" + integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== dependencies: is-plain-object "^2.0.4" is-extglob@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + integrity sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA= is-extglob@^2.1.0, is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= is-finite@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= is-generator-fn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a" + integrity sha1-lp1J4bszKfa7fwkIm+JleLLd1Go= is-glob@^2.0.0, is-glob@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + integrity sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM= dependencies: is-extglob "^1.0.0" is-glob@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= dependencies: is-extglob "^2.1.0" is-glob@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.0.tgz#9521c76845cc2610a85203ddf080a958c2ffabc0" + integrity sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A= dependencies: is-extglob "^2.1.1" is-installed-globally@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80" + integrity sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA= dependencies: global-dirs "^0.1.0" is-path-inside "^1.0.0" @@ -3308,144 +3736,170 @@ is-installed-globally@^0.1.0: is-npm@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4" + integrity sha1-8vtjpl5JBbQGyGBydloaTceTufQ= is-number@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + integrity sha1-Afy7s5NGOlSPL0ZszhbezknbkI8= dependencies: kind-of "^3.0.2" is-number@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" + integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= dependencies: kind-of "^3.0.2" is-number@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" + integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== is-obj@^1.0.0, is-obj@^1.0.1: version "1.0.1" - resolved "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= is-observable@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-1.1.0.tgz#b3e986c8f44de950867cab5403f5a3465005975e" + integrity sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA== dependencies: symbol-observable "^1.1.0" is-path-inside@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" + integrity sha1-jvW33lBDej/cprToZe96pVy0gDY= dependencies: path-is-inside "^1.0.1" is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== dependencies: isobject "^3.0.1" is-posix-bracket@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + integrity sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q= is-primitive@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= is-redirect@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" + integrity sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ= is-regex@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= dependencies: has "^1.0.1" is-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-regexp/-/is-regexp-1.0.0.tgz#fd2d883545c46bac5a633e7b9a09e87fa2cb5069" + integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= is-retry-allowed@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" - -is-ssh@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.3.0.tgz#ebea1169a2614da392a63740366c3ce049d8dff6" - dependencies: - protocols "^1.1.0" + integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ= is-stream@^1.0.0, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= is-subset@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6" + integrity sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY= -is-symbol@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572" +is-symbol@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" + integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== + dependencies: + has-symbols "^1.0.0" is-text-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" + integrity sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4= dependencies: text-extensions "^1.0.0" is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= is-windows@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= isarray@1.0.0, isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= isobject@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= dependencies: isarray "1.0.0" isobject@^3.0.0, isobject@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= issue-parser@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/issue-parser/-/issue-parser-3.0.0.tgz#729d3fd5d6b86379cb0f513acc33b62f47ebd681" + version "3.0.1" + resolved "https://registry.yarnpkg.com/issue-parser/-/issue-parser-3.0.1.tgz#ee8dd677fdb5be64541f81fa5e7267baa271a7ee" + integrity sha512-5wdT3EE8Kq38x/hJD8QZCJ9scGoOZ5QnzwXyClkviSWTS+xOCE6hJ0qco3H5n5jCsFqpbofZCcMWqlXJzF72VQ== dependencies: lodash.capitalize "^4.2.1" lodash.escaperegexp "^4.1.2" @@ -3454,82 +3908,91 @@ issue-parser@^3.0.0: lodash.uniqby "^4.7.0" istanbul-api@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.1.tgz#4c3b05d18c0016d1022e079b98dc82c40f488954" + version "1.3.7" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.7.tgz#a86c770d2b03e11e3f778cd7aedd82d2722092aa" + integrity sha512-4/ApBnMVeEPG3EkSzcw25wDe4N66wxwn+KKn6b47vyek8Xb3NBAcg4xfuQbS7BqcZuTX4wxfD5lVagdggR3gyA== dependencies: async "^2.1.4" - compare-versions "^3.1.0" fileset "^2.0.2" - istanbul-lib-coverage "^1.2.0" - istanbul-lib-hook "^1.2.0" - istanbul-lib-instrument "^1.10.1" - istanbul-lib-report "^1.1.4" - istanbul-lib-source-maps "^1.2.4" - istanbul-reports "^1.3.0" + istanbul-lib-coverage "^1.2.1" + istanbul-lib-hook "^1.2.2" + istanbul-lib-instrument "^1.10.2" + istanbul-lib-report "^1.1.5" + istanbul-lib-source-maps "^1.2.6" + istanbul-reports "^1.5.1" js-yaml "^3.7.0" mkdirp "^0.5.1" once "^1.4.0" -istanbul-lib-coverage@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341" - -istanbul-lib-hook@^1.2.0: +istanbul-lib-coverage@^1.2.0, istanbul-lib-coverage@^1.2.1: version "1.2.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.1.tgz#f614ec45287b2a8fc4f07f5660af787575601805" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0" + integrity sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ== + +istanbul-lib-hook@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz#bc6bf07f12a641fbf1c85391d0daa8f0aea6bf86" + integrity sha512-/Jmq7Y1VeHnZEQ3TL10VHyb564mn6VrQXHchON9Jf/AEcmQ3ZIiyD1BVzNOKTZf/G3gE+kiGK6SmpF9y3qGPLw== dependencies: - append-transform "^1.0.0" + append-transform "^0.4.0" -istanbul-lib-instrument@^1.10.1: - version "1.10.1" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz#724b4b6caceba8692d3f1f9d0727e279c401af7b" +istanbul-lib-instrument@^1.10.1, istanbul-lib-instrument@^1.10.2: + version "1.10.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca" + integrity sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A== dependencies: babel-generator "^6.18.0" babel-template "^6.16.0" babel-traverse "^6.18.0" babel-types "^6.18.0" babylon "^6.18.0" - istanbul-lib-coverage "^1.2.0" + istanbul-lib-coverage "^1.2.1" semver "^5.3.0" -istanbul-lib-report@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.4.tgz#e886cdf505c4ebbd8e099e4396a90d0a28e2acb5" +istanbul-lib-report@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz#f2a657fc6282f96170aaf281eb30a458f7f4170c" + integrity sha512-UsYfRMoi6QO/doUshYNqcKJqVmFe9w51GZz8BS3WB0lYxAllQYklka2wP9+dGZeHYaWIdcXUx8JGdbqaoXRXzw== dependencies: - istanbul-lib-coverage "^1.2.0" + istanbul-lib-coverage "^1.2.1" mkdirp "^0.5.1" path-parse "^1.0.5" supports-color "^3.1.2" -istanbul-lib-source-maps@^1.2.4: - version "1.2.5" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.5.tgz#ffe6be4e7ab86d3603e4290d54990b14506fc9b1" +istanbul-lib-source-maps@^1.2.4, istanbul-lib-source-maps@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz#37b9ff661580f8fca11232752ee42e08c6675d8f" + integrity sha512-TtbsY5GIHgbMsMiRw35YBHGpZ1DVFEO19vxxeiDMYaeOFOCzfnYVxvl6pOUIZR4dtPhAGpSMup8OyF8ubsaqEg== dependencies: debug "^3.1.0" - istanbul-lib-coverage "^1.2.0" + istanbul-lib-coverage "^1.2.1" mkdirp "^0.5.1" rimraf "^2.6.1" source-map "^0.5.3" -istanbul-reports@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.3.0.tgz#2f322e81e1d9520767597dca3c20a0cce89a3554" +istanbul-reports@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a" + integrity sha512-+cfoZ0UXzWjhAdzosCPP3AN8vvef8XDkWtTfgaN+7L3YTpNYITnCaEkceo5SEYy644VkHka/P1FvkWvrG/rrJw== dependencies: handlebars "^4.0.3" java-properties@^0.2.9: version "0.2.10" resolved "https://registry.yarnpkg.com/java-properties/-/java-properties-0.2.10.tgz#2551560c25fa1ad94d998218178f233ad9b18f60" + integrity sha512-CpKJh9VRNhS+XqZtg1UMejETGEiqwCGDC/uwPEEQwc2nfdbSm73SIE29TplG2gLYuBOOTNDqxzG6A9NtEPLt0w== jest-changed-files@^23.4.2: version "23.4.2" resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.4.2.tgz#1eed688370cd5eebafe4ae93d34bb3b64968fe83" + integrity sha512-EyNhTAUWEfwnK0Is/09LxoqNDOn7mU7S3EHskG52djOFS/z+IT0jT3h3Ql61+dklcG7bJJitIWEMB4Sp1piHmA== dependencies: throat "^4.0.0" jest-cli@^23.1.0: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.4.2.tgz#49d56bcfe6cf01871bfcc4a0494e08edaf2b61d0" + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.6.0.tgz#61ab917744338f443ef2baa282ddffdd658a5da4" + integrity sha512-hgeD1zRUp1E1zsiyOXjEn4LzRLWdJBV//ukAHGlx6s5mfCNJTbhbHjgxnDUXA8fsKWN/HqFFF6X5XcCwC/IvYQ== dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" @@ -3543,18 +4006,18 @@ jest-cli@^23.1.0: istanbul-lib-instrument "^1.10.1" istanbul-lib-source-maps "^1.2.4" jest-changed-files "^23.4.2" - jest-config "^23.4.2" + jest-config "^23.6.0" jest-environment-jsdom "^23.4.0" jest-get-type "^22.1.0" - jest-haste-map "^23.4.1" + jest-haste-map "^23.6.0" jest-message-util "^23.4.0" jest-regex-util "^23.3.0" - jest-resolve-dependencies "^23.4.2" - jest-runner "^23.4.2" - jest-runtime "^23.4.2" - jest-snapshot "^23.4.2" + jest-resolve-dependencies "^23.6.0" + jest-runner "^23.6.0" + jest-runtime "^23.6.0" + jest-snapshot "^23.6.0" jest-util "^23.4.0" - jest-validate "^23.4.0" + jest-validate "^23.6.0" jest-watcher "^23.4.0" jest-worker "^23.2.0" micromatch "^2.3.11" @@ -3568,49 +4031,55 @@ jest-cli@^23.1.0: which "^1.2.12" yargs "^11.0.0" -jest-config@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.4.2.tgz#62a105e14b8266458f2bf4d32403b2c44418fa77" +jest-config@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.6.0.tgz#f82546a90ade2d8c7026fbf6ac5207fc22f8eb1d" + integrity sha512-i8V7z9BeDXab1+VNo78WM0AtWpBRXJLnkT+lyT+Slx/cbP5sZJ0+NDuLcmBE5hXAoK0aUp7vI+MOxR+R4d8SRQ== dependencies: babel-core "^6.0.0" - babel-jest "^23.4.2" + babel-jest "^23.6.0" chalk "^2.0.1" glob "^7.1.1" jest-environment-jsdom "^23.4.0" jest-environment-node "^23.4.0" jest-get-type "^22.1.0" - jest-jasmine2 "^23.4.2" + jest-jasmine2 "^23.6.0" jest-regex-util "^23.3.0" - jest-resolve "^23.4.1" + jest-resolve "^23.6.0" jest-util "^23.4.0" - jest-validate "^23.4.0" - pretty-format "^23.2.0" + jest-validate "^23.6.0" + micromatch "^2.3.11" + pretty-format "^23.6.0" -jest-diff@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.2.0.tgz#9f2cf4b51e12c791550200abc16b47130af1062a" +jest-diff@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.6.0.tgz#1500f3f16e850bb3d71233408089be099f610c7d" + integrity sha512-Gz9l5Ov+X3aL5L37IT+8hoCUsof1CVYBb2QEkOupK64XyRR3h+uRpYIm97K7sY8diFxowR8pIGEdyfMKTixo3g== dependencies: chalk "^2.0.1" diff "^3.2.0" jest-get-type "^22.1.0" - pretty-format "^23.2.0" + pretty-format "^23.6.0" jest-docblock@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.2.0.tgz#f085e1f18548d99fdd69b20207e6fd55d91383a7" + integrity sha1-8IXh8YVI2Z/dabICB+b9VdkTg6c= dependencies: detect-newline "^2.1.0" -jest-each@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.4.0.tgz#2fa9edd89daa1a4edc9ff9bf6062a36b71345143" +jest-each@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.6.0.tgz#ba0c3a82a8054387016139c733a05242d3d71575" + integrity sha512-x7V6M/WGJo6/kLoissORuvLIeAoyo2YqLOoCDkohgJ4XOXSqOtyvr8FbInlAWS77ojBsZrafbozWoKVRdtxFCg== dependencies: chalk "^2.0.1" - pretty-format "^23.2.0" + pretty-format "^23.6.0" jest-environment-jsdom@^23.4.0: version "23.4.0" resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz#056a7952b3fea513ac62a140a2c368c79d9e6023" + integrity sha1-BWp5UrP+pROsYqFAosNox52eYCM= dependencies: jest-mock "^23.2.0" jest-util "^23.4.0" @@ -3619,6 +4088,7 @@ jest-environment-jsdom@^23.4.0: jest-environment-node@^23.4.0: version "23.4.0" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.4.0.tgz#57e80ed0841dea303167cce8cd79521debafde10" + integrity sha1-V+gO0IQd6jAxZ8zozXlSHeuv3hA= dependencies: jest-mock "^23.2.0" jest-util "^23.4.0" @@ -3626,53 +4096,60 @@ jest-environment-node@^23.4.0: jest-get-type@^22.1.0: version "22.4.3" resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4" + integrity sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w== -jest-haste-map@^23.4.1: - version "23.4.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.4.1.tgz#43a174ba7ac079ae1dd74eaf5a5fe78989474dd2" +jest-haste-map@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.6.0.tgz#2e3eb997814ca696d62afdb3f2529f5bbc935e16" + integrity sha512-uyNhMyl6dr6HaXGHp8VF7cK6KpC6G9z9LiMNsst+rJIZ8l7wY0tk8qwjPmEghczojZ2/ZhtEdIabZ0OQRJSGGg== dependencies: fb-watchman "^2.0.0" graceful-fs "^4.1.11" + invariant "^2.2.4" jest-docblock "^23.2.0" jest-serializer "^23.0.1" jest-worker "^23.2.0" micromatch "^2.3.11" sane "^2.0.0" -jest-jasmine2@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.4.2.tgz#2fbf52f93e43ed4c5e7326a90bb1d785be4321ac" +jest-jasmine2@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz#840e937f848a6c8638df24360ab869cc718592e0" + integrity sha512-pe2Ytgs1nyCs8IvsEJRiRTPC0eVYd8L/dXJGU08GFuBwZ4sYH/lmFDdOL3ZmvJR8QKqV9MFuwlsAi/EWkFUbsQ== dependencies: babel-traverse "^6.0.0" chalk "^2.0.1" co "^4.6.0" - expect "^23.4.0" + expect "^23.6.0" is-generator-fn "^1.0.0" - jest-diff "^23.2.0" - jest-each "^23.4.0" - jest-matcher-utils "^23.2.0" + jest-diff "^23.6.0" + jest-each "^23.6.0" + jest-matcher-utils "^23.6.0" jest-message-util "^23.4.0" - jest-snapshot "^23.4.2" + jest-snapshot "^23.6.0" jest-util "^23.4.0" - pretty-format "^23.2.0" + pretty-format "^23.6.0" -jest-leak-detector@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.2.0.tgz#c289d961dc638f14357d4ef96e0431ecc1aa377d" +jest-leak-detector@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.6.0.tgz#e4230fd42cf381a1a1971237ad56897de7e171de" + integrity sha512-f/8zA04rsl1Nzj10HIyEsXvYlMpMPcy0QkQilVZDFOaPbv2ur71X5u2+C4ZQJGyV/xvVXtCCZ3wQ99IgQxftCg== dependencies: - pretty-format "^23.2.0" + pretty-format "^23.6.0" -jest-matcher-utils@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.2.0.tgz#4d4981f23213e939e3cedf23dc34c747b5ae1913" +jest-matcher-utils@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz#726bcea0c5294261a7417afb6da3186b4b8cac80" + integrity sha512-rosyCHQfBcol4NsckTn01cdelzWLU9Cq7aaigDf8VwwpIRvWE/9zLgX2bON+FkEW69/0UuYslUe22SOdEf2nog== dependencies: chalk "^2.0.1" jest-get-type "^22.1.0" - pretty-format "^23.2.0" + pretty-format "^23.6.0" jest-message-util@^23.4.0: version "23.4.0" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.4.0.tgz#17610c50942349508d01a3d1e0bda2c079086a9f" + integrity sha1-F2EMUJQjSVCNAaPR4L2iwHkIap8= dependencies: "@babel/code-frame" "^7.0.0-beta.35" chalk "^2.0.1" @@ -3683,47 +4160,53 @@ jest-message-util@^23.4.0: jest-mock@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.2.0.tgz#ad1c60f29e8719d47c26e1138098b6d18b261134" + integrity sha1-rRxg8p6HGdR8JuETgJi20YsmETQ= jest-regex-util@^23.3.0: version "23.3.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5" + integrity sha1-X4ZylUfCeFxAAs6qj4Sf6MpHG8U= -jest-resolve-dependencies@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.4.2.tgz#0675ba876a5b819deffc449ad72e9985c2592048" +jest-resolve-dependencies@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.6.0.tgz#b4526af24c8540d9a3fab102c15081cf509b723d" + integrity sha512-EkQWkFWjGKwRtRyIwRwI6rtPAEyPWlUC2MpzHissYnzJeHcyCn1Hc8j7Nn1xUVrS5C6W5+ZL37XTem4D4pLZdA== dependencies: jest-regex-util "^23.3.0" - jest-snapshot "^23.4.2" + jest-snapshot "^23.6.0" -jest-resolve@^23.4.1: - version "23.4.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.4.1.tgz#7f3c17104732a2c0c940a01256025ed745814982" +jest-resolve@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.6.0.tgz#cf1d1a24ce7ee7b23d661c33ba2150f3aebfa0ae" + integrity sha512-XyoRxNtO7YGpQDmtQCmZjum1MljDqUCob7XlZ6jy9gsMugHdN2hY4+Acz9Qvjz2mSsOnPSH7skBmDYCHXVZqkA== dependencies: browser-resolve "^1.11.3" chalk "^2.0.1" realpath-native "^1.0.0" -jest-runner@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.4.2.tgz#579a88524ac52c846075b0129a21c7b483e75a7e" +jest-runner@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.6.0.tgz#3894bd219ffc3f3cb94dc48a4170a2e6f23a5a38" + integrity sha512-kw0+uj710dzSJKU6ygri851CObtCD9cN8aNkg8jWJf4ewFyEa6kwmiH/r/M1Ec5IL/6VFa0wnAk6w+gzUtjJzA== dependencies: exit "^0.1.2" graceful-fs "^4.1.11" - jest-config "^23.4.2" + jest-config "^23.6.0" jest-docblock "^23.2.0" - jest-haste-map "^23.4.1" - jest-jasmine2 "^23.4.2" - jest-leak-detector "^23.2.0" + jest-haste-map "^23.6.0" + jest-jasmine2 "^23.6.0" + jest-leak-detector "^23.6.0" jest-message-util "^23.4.0" - jest-runtime "^23.4.2" + jest-runtime "^23.6.0" jest-util "^23.4.0" jest-worker "^23.2.0" source-map-support "^0.5.6" throat "^4.0.0" -jest-runtime@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.4.2.tgz#00c3bb8385253d401a394a27d1112d3615e5a65c" +jest-runtime@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.6.0.tgz#059e58c8ab445917cd0e0d84ac2ba68de8f23082" + integrity sha512-ycnLTNPT2Gv+TRhnAYAQ0B3SryEXhhRj1kA6hBPSeZaNQkJ7GbZsxOLUkwg6YmvWGdX3BB3PYKFLDQCAE1zNOw== dependencies: babel-core "^6.0.0" babel-plugin-istanbul "^4.1.6" @@ -3732,14 +4215,14 @@ jest-runtime@^23.4.2: exit "^0.1.2" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.1.11" - jest-config "^23.4.2" - jest-haste-map "^23.4.1" + jest-config "^23.6.0" + jest-haste-map "^23.6.0" jest-message-util "^23.4.0" jest-regex-util "^23.3.0" - jest-resolve "^23.4.1" - jest-snapshot "^23.4.2" + jest-resolve "^23.6.0" + jest-snapshot "^23.6.0" jest-util "^23.4.0" - jest-validate "^23.4.0" + jest-validate "^23.6.0" micromatch "^2.3.11" realpath-native "^1.0.0" slash "^1.0.0" @@ -3750,25 +4233,28 @@ jest-runtime@^23.4.2: jest-serializer@^23.0.1: version "23.0.1" resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-23.0.1.tgz#a3776aeb311e90fe83fab9e533e85102bd164165" + integrity sha1-o3dq6zEekP6D+rnlM+hRAr0WQWU= -jest-snapshot@^23.4.2: - version "23.4.2" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.4.2.tgz#8fa6130feb5a527dac73e5fa80d86f29f7c42ab6" +jest-snapshot@^23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.6.0.tgz#f9c2625d1b18acda01ec2d2b826c0ce58a5aa17a" + integrity sha512-tM7/Bprftun6Cvj2Awh/ikS7zV3pVwjRYU2qNYS51VZHgaAMBs5l4o/69AiDHhQrj5+LA2Lq4VIvK7zYk/bswg== dependencies: babel-types "^6.0.0" chalk "^2.0.1" - jest-diff "^23.2.0" - jest-matcher-utils "^23.2.0" + jest-diff "^23.6.0" + jest-matcher-utils "^23.6.0" jest-message-util "^23.4.0" - jest-resolve "^23.4.1" + jest-resolve "^23.6.0" mkdirp "^0.5.1" natural-compare "^1.4.0" - pretty-format "^23.2.0" + pretty-format "^23.6.0" semver "^5.5.0" jest-util@^23.4.0: version "23.4.0" resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.4.0.tgz#4d063cb927baf0a23831ff61bec2cbbf49793561" + integrity sha1-TQY8uSe68KI4Mf9hvsLLv0l5NWE= dependencies: callsites "^2.0.0" chalk "^2.0.1" @@ -3779,18 +4265,10 @@ jest-util@^23.4.0: slash "^1.0.0" source-map "^0.6.0" -jest-validate@^23.4.0: - version "23.4.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.4.0.tgz#d96eede01ef03ac909c009e9c8e455197d48c201" - dependencies: - chalk "^2.0.1" - jest-get-type "^22.1.0" - leven "^2.1.0" - pretty-format "^23.2.0" - -jest-validate@^23.5.0: +jest-validate@^23.5.0, jest-validate@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474" + integrity sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A== dependencies: chalk "^2.0.1" jest-get-type "^22.1.0" @@ -3800,6 +4278,7 @@ jest-validate@^23.5.0: jest-watcher@^23.4.0: version "23.4.0" resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.4.0.tgz#d2e28ce74f8dad6c6afc922b92cabef6ed05c91c" + integrity sha1-0uKM50+NrWxq/JIrksq+9u0FyRw= dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" @@ -3808,31 +4287,37 @@ jest-watcher@^23.4.0: jest-worker@^23.2.0: version "23.2.0" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.2.0.tgz#faf706a8da36fae60eb26957257fa7b5d8ea02b9" + integrity sha1-+vcGqNo2+uYOsmlXJX+ntdjqArk= dependencies: merge-stream "^1.0.1" jest@23.1.0: version "23.1.0" resolved "https://registry.yarnpkg.com/jest/-/jest-23.1.0.tgz#bbb7f893100a11a742dd8bd0d047a54b0968ad1a" + integrity sha1-u7f4kxAKEadC3YvQ0EelSwlorRo= dependencies: import-local "^1.0.0" jest-cli "^23.1.0" js-levenshtein@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.3.tgz#3ef627df48ec8cf24bacf05c0f184ff30ef413c5" - -js-tokens@^3.0.0, js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + version "1.1.4" + resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.4.tgz#3a56e3cbf589ca0081eb22cd9ba0b1290a16d26e" + integrity sha512-PxfGzSs0ztShKrUYPIn5r0MtyAhYcCwmndozzpz8YObbPnD1jFxzlBGbRnX2mIu6Z13xN6+PTu05TQFnZFlzow== "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-tokens@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" + integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= js-yaml@^3.7.0, js-yaml@^3.9.0: version "3.12.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" + integrity sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -3840,10 +4325,12 @@ js-yaml@^3.7.0, js-yaml@^3.9.0: jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= jsdom@^11.5.1: version "11.12.0" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8" + integrity sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw== dependencies: abab "^2.0.0" acorn "^5.5.3" @@ -3875,58 +4362,71 @@ jsdom@^11.5.1: jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" + integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= jsesc@^2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.1.tgz#e421a2a8e20d6b0819df28908f782526b96dd1fe" + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= json-buffer@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" + integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== -json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= -json5@2.x: +json5@2.x, json5@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850" + integrity sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ== dependencies: minimist "^1.2.0" -json5@^0.5.0, json5@^0.5.1: +json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" + integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= optionalDependencies: graceful-fs "^4.1.6" jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" + integrity sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA= jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= dependencies: assert-plus "1.0.0" extsprintf "1.3.0" @@ -3936,70 +4436,79 @@ jsprim@^1.2.2: keyv@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" + integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== dependencies: json-buffer "3.0.0" kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= dependencies: is-buffer "^1.1.5" kind-of@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" + integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= dependencies: is-buffer "^1.1.5" kind-of@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" + integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" + integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== kleur@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-2.0.1.tgz#7cc64b0d188d0dcbc98bdcdfdda2cc10619ddce8" + version "2.0.2" + resolved "https://registry.yarnpkg.com/kleur/-/kleur-2.0.2.tgz#b704f4944d95e255d038f0cb05fb8a602c55a300" + integrity sha512-77XF9iTllATmG9lSlIv0qdQ2BQ/h9t0bJllHlbvsQ0zUWfU7Yi0S8L5JXzPZgkefIiajLmBJJ4BsMJmqcf7oxQ== latest-version@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15" + integrity sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU= dependencies: package-json "^4.0.0" -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - lazy-property@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazy-property/-/lazy-property-1.0.0.tgz#84ddc4b370679ba8bd4cdcfa4c06b43d57111147" + integrity sha1-hN3Es3Bnm6i9TNz6TAa0PVcREUc= lcid@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= dependencies: invert-kv "^1.0.0" lcid@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== dependencies: invert-kv "^2.0.0" left-pad@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" + integrity sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA== leven@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" + integrity sha1-wuep93IJTe6dNCAq6KzORoeHVYA= levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= dependencies: prelude-ls "~1.1.2" type-check "~0.3.2" @@ -4007,6 +4516,7 @@ levn@~0.3.0: libcipm@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/libcipm/-/libcipm-2.0.2.tgz#4f38c2b37acf2ec156936cef1cbf74636568fc7b" + integrity sha512-9uZ6/LAflVEijksTRq/RX0e+pGA4mr8tND9Cmk2JMg7j2fFUBrs8PpFX2DOAJR/XoxPzz+5h8bkWmtIYLunKAg== dependencies: bin-links "^1.1.2" bluebird "^3.5.1" @@ -4026,6 +4536,7 @@ libcipm@^2.0.2: libnpmhook@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/libnpmhook/-/libnpmhook-4.0.1.tgz#63641654de772cbeb96a88527a7fd5456ec3c2d7" + integrity sha512-3qqpfqvBD1712WA6iGe0stkG40WwAeoWcujA6BlC0Be1JArQbqwabnEnZ0CRcD05Tf1fPYJYdCbSfcfedEJCOg== dependencies: figgy-pudding "^3.1.0" npm-registry-fetch "^3.0.0" @@ -4033,6 +4544,7 @@ libnpmhook@^4.0.1: libnpx@^10.2.0: version "10.2.0" resolved "https://registry.yarnpkg.com/libnpx/-/libnpx-10.2.0.tgz#1bf4a1c9f36081f64935eb014041da10855e3102" + integrity sha512-X28coei8/XRCt15cYStbLBph+KGhFra4VQhRBPuH/HHMkC5dxM8v24RVgUsvODKCrUZ0eTgiTqJp6zbl0sskQQ== dependencies: dotenv "^5.0.1" npm-package-arg "^6.0.0" @@ -4046,6 +4558,7 @@ libnpx@^10.2.0: lint-staged@7.3.0: version "7.3.0" resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-7.3.0.tgz#90ff33e5ca61ed3dbac35b6f6502dbefdc0db58d" + integrity sha512-AXk40M9DAiPi7f4tdJggwuKIViUplYtVj1os1MVEteW7qOkU50EOehayCfO9TsoGK24o/EsWb41yrEgfJDDjCw== dependencies: chalk "^2.3.1" commander "^2.14.1" @@ -4073,10 +4586,12 @@ lint-staged@7.3.0: listr-silent-renderer@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" + integrity sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4= -listr-update-renderer@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz#344d980da2ca2e8b145ba305908f32ae3f4cc8a7" +listr-update-renderer@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.5.0.tgz#4ea8368548a7b8aecb7e06d8c95cb45ae2ede6a2" + integrity sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA== dependencies: chalk "^1.1.3" cli-truncate "^0.2.1" @@ -4084,35 +4599,38 @@ listr-update-renderer@^0.4.0: figures "^1.7.0" indent-string "^3.0.0" log-symbols "^1.0.2" - log-update "^1.0.2" + log-update "^2.3.0" strip-ansi "^3.0.1" -listr-verbose-renderer@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#8206f4cf6d52ddc5827e5fd14989e0e965933a35" +listr-verbose-renderer@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.5.0.tgz#f1132167535ea4c1261102b9f28dac7cba1e03db" + integrity sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw== dependencies: - chalk "^1.1.3" - cli-cursor "^1.0.2" + chalk "^2.4.1" + cli-cursor "^2.1.0" date-fns "^1.27.2" - figures "^1.7.0" + figures "^2.0.0" listr@^0.14.1: - version "0.14.2" - resolved "https://registry.yarnpkg.com/listr/-/listr-0.14.2.tgz#cbe44b021100a15376addfc2d79349ee430bfe14" + version "0.14.3" + resolved "https://registry.yarnpkg.com/listr/-/listr-0.14.3.tgz#2fea909604e434be464c50bddba0d496928fa586" + integrity sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA== dependencies: "@samverschueren/stream-to-observable" "^0.3.0" is-observable "^1.1.0" is-promise "^2.1.0" is-stream "^1.1.0" listr-silent-renderer "^1.1.1" - listr-update-renderer "^0.4.0" - listr-verbose-renderer "^0.4.0" - p-map "^1.1.1" - rxjs "^6.1.0" + listr-update-renderer "^0.5.0" + listr-verbose-renderer "^0.5.0" + p-map "^2.0.0" + rxjs "^6.3.3" load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= dependencies: graceful-fs "^4.1.2" parse-json "^2.2.0" @@ -4123,6 +4641,7 @@ load-json-file@^1.0.0: load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= dependencies: graceful-fs "^4.1.2" parse-json "^4.0.0" @@ -4132,6 +4651,7 @@ load-json-file@^4.0.0: locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= dependencies: p-locate "^2.0.0" path-exists "^3.0.0" @@ -4139,6 +4659,7 @@ locate-path@^2.0.0: locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== dependencies: p-locate "^3.0.0" path-exists "^3.0.0" @@ -4146,6 +4667,7 @@ locate-path@^3.0.0: lock-verify@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/lock-verify/-/lock-verify-2.0.2.tgz#148e4f85974915c9e3c34d694b7de9ecb18ee7a8" + integrity sha512-QNVwK0EGZBS4R3YQ7F1Ox8p41Po9VGl2QG/2GsuvTbkJZYSsPeWHKMbbH6iZMCHWSMww5nrJroZYnGzI4cePuw== dependencies: npm-package-arg "^5.1.2 || 6" semver "^5.4.1" @@ -4153,95 +4675,159 @@ lock-verify@^2.0.2: lockfile@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/lockfile/-/lockfile-1.0.4.tgz#07f819d25ae48f87e538e6578b6964a4981a5609" + integrity sha512-cvbTwETRfsFh4nHsL1eGWapU1XFi5Ot9E85sWAwia7Y7EgB7vfqcZhTKZ+l7hCGxSPoushMv5GKhT5PdLv03WA== dependencies: signal-exit "^3.0.2" +lodash._baseindexof@*: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c" + integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw= + lodash._baseuniq@~4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8" + integrity sha1-DrtE5FaBSveQXGIS+iybLVG4Qeg= dependencies: lodash._createset "~4.0.0" lodash._root "~3.0.0" +lodash._bindcallback@*: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" + integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4= + +lodash._cacheindexof@*: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92" + integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI= + +lodash._createcache@*: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093" + integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM= + dependencies: + lodash._getnative "^3.0.0" + lodash._createset@~4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" + integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY= + +lodash._getnative@*, lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U= lodash._reinterpolate@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= lodash._root@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" + integrity sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI= lodash.assign@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + integrity sha1-DZnzzNem0mHRm9rrkkUAXShYCOc= lodash.camelcase@4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= lodash.capitalize@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/lodash.capitalize/-/lodash.capitalize-4.2.1.tgz#f826c9b4e2a8511d84e3aca29db05e1a4f3b72a9" + integrity sha1-+CbJtOKoUR2E46yinbBeGk87cqk= lodash.clonedeep@~4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= lodash.escaperegexp@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz#64762c48618082518ac3df4ccf5d5886dae20347" + integrity sha1-ZHYsSGGAglGKw99Mz11YhtriA0c= + +lodash.get@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" + integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= lodash.isplainobject@4.0.6, lodash.isplainobject@^4.0.6: version "4.0.6" resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= lodash.isstring@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" + integrity sha1-1SfftUVuynzJu5XV2ur4i6VKVFE= lodash.kebabcase@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz#8489b1cb0d29ff88195cceca448ff6d6cc295c36" + integrity sha1-hImxyw0p/4gZXM7KRI/21swpXDY= lodash.map@^4.5.1: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.map/-/lodash.map-4.6.0.tgz#771ec7839e3473d9c4cde28b19394c3562f4f6d3" + integrity sha1-dx7Hg540c9nEzeKLGTlMNWL09tM= lodash.merge@4.6.1: version "4.6.1" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.1.tgz#adc25d9cb99b9391c59624f379fbba60d7111d54" + integrity sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ== lodash.mergewith@4.6.1: version "4.6.1" resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927" + integrity sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ== lodash.omit@4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.omit/-/lodash.omit-4.5.0.tgz#6eb19ae5a1ee1dd9df0b969e66ce0b7fa30b5e60" + integrity sha1-brGa5aHuHdnfC5aeZs4Lf6MLXmA= -lodash.pick@4.4.0: +lodash.pick@4.4.0, lodash.pick@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" + integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM= + +lodash.restparam@*: + version "3.6.1" + resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" + integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU= + +lodash.set@^4.3.2: + version "4.3.2" + resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" + integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM= lodash.snakecase@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" + integrity sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40= lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" + integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= lodash.startcase@4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.startcase/-/lodash.startcase-4.4.0.tgz#9436e34ed26093ed7ffae1936144350915d9add8" + integrity sha1-lDbjTtJgk+1/+uGTYUQ1CRXZrdg= lodash.template@^4.0.2: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" + integrity sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A= dependencies: lodash._reinterpolate "~3.0.0" lodash.templatesettings "^4.0.0" @@ -4249,81 +4835,94 @@ lodash.template@^4.0.2: lodash.templatesettings@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" + integrity sha1-K01OlbpEDZFf8IvImeRVNmZxMxY= dependencies: lodash._reinterpolate "~3.0.0" lodash.toarray@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561" + integrity sha1-JMS/zWsvuji/0FlNsRedjptlZWE= lodash.topairs@4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.topairs/-/lodash.topairs-4.3.0.tgz#3b6deaa37d60fb116713c46c5f17ea190ec48d64" + integrity sha1-O23qo31g+xFnE8RsXxfqGQ7EjWQ= lodash.unescape@4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" + integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw= lodash.union@~4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" + integrity sha1-SLtQiECfFvGCFmZkHETdGqrjzYg= -lodash.uniq@~4.5.0: +lodash.uniq@^4.5.0, lodash.uniq@~4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= lodash.uniqby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302" + integrity sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI= lodash.upperfirst@4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce" + integrity sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984= lodash.without@~4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" + integrity sha1-PNRXSgC2e643OpS3SHcmQFB7eqw= -lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4: - version "4.17.10" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" - -lodash@^4.17.5, lodash@^4.2.1: +lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" + integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== log-symbols@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" + integrity sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg= dependencies: chalk "^1.0.0" log-symbols@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" + integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== dependencies: chalk "^2.0.1" -log-update@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1" +log-update@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-2.3.0.tgz#88328fd7d1ce7938b29283746f0b1bc126b24708" + integrity sha1-iDKP19HOeTiykoN0bwsbwSayRwg= dependencies: - ansi-escapes "^1.0.0" - cli-cursor "^1.0.2" + ansi-escapes "^3.0.0" + cli-cursor "^2.0.0" + wrap-ansi "^3.0.1" longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= loose-envify@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" + integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== dependencies: js-tokens "^3.0.0 || ^4.0.0" loud-rejection@^1.0.0: version "1.6.0" resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= dependencies: currently-unhandled "^0.4.1" signal-exit "^3.0.0" @@ -4331,31 +4930,37 @@ loud-rejection@^1.0.0: lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== lru-cache@^4.0.1, lru-cache@^4.1.1, lru-cache@^4.1.2, lru-cache@^4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" + version "4.1.5" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== dependencies: pseudomap "^1.0.2" yallist "^2.1.2" -macos-release@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-1.1.0.tgz#831945e29365b470aa8724b0ab36c8f8959d10fb" +macos-release@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.0.0.tgz#7dddf4caf79001a851eb4fba7fb6034f251276ab" + integrity sha512-iCM3ZGeqIzlrH7KxYK+fphlJpCCczyHXc+HhRVbEu9uNTCrzYJjvvtefzeKTCVHd5AP/aD/fzC80JZ4ZP+dQ/A== make-dir@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" + integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== dependencies: pify "^3.0.0" make-error@1.x: version "1.3.5" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" + integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== "make-fetch-happen@^2.5.0 || 3 || 4", make-fetch-happen@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz#141497cb878f243ba93136c83d8aba12c216c083" + integrity sha512-7R5ivfy9ilRJ1EMKIOziwrns9fGeAD4bAha8EB7BIiBBLHm2KeTUGCrICFt2rbHfzheTLynv50GnNTK1zDTrcQ== dependencies: agentkeepalive "^3.4.1" cacache "^11.0.1" @@ -4372,6 +4977,7 @@ make-error@1.x: make-fetch-happen@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-3.0.0.tgz#7b661d2372fc4710ab5cc8e1fa3c290eea69a961" + integrity sha512-FmWY7gC0mL6Z4N86vE14+m719JKE4H0A+pyiOH18B025gF/C113pyfb4gHDDYP5cqnRMHOz06JGdmffC/SES+w== dependencies: agentkeepalive "^3.4.1" cacache "^10.0.4" @@ -4388,36 +4994,43 @@ make-fetch-happen@^3.0.0: makeerror@1.0.x: version "1.0.11" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + integrity sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw= dependencies: tmpl "1.0.x" map-age-cleaner@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.2.tgz#098fb15538fd3dbe461f12745b0ca8568d4e3f74" + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== dependencies: p-defer "^1.0.0" map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" + integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= map-obj@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= map-obj@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9" + integrity sha1-plzSkIepJZi4eRJXpSPgISIqwfk= map-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" + integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= dependencies: object-visit "^1.0.0" marked-terminal@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-3.1.1.tgz#1e726816ddc4552a83393228ff0952b6cd4e5e04" + integrity sha512-7UBFww1rdx0w9HehLMCVYa8/AxXaiDigDfMsJcj82/wgLQG9cj+oiMAVlJpeWD57VFJY2OYY+bKeEVIjIlxi+w== dependencies: cardinal "^2.1.1" chalk "^2.4.1" @@ -4426,26 +5039,31 @@ marked-terminal@^3.0.0: node-emoji "^1.4.1" marked@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.5.0.tgz#9e590bad31584a48ff405b33ab1c0dd25172288e" + version "0.5.2" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.5.2.tgz#3efdb27b1fd0ecec4f5aba362bddcd18120e5ba9" + integrity sha512-fdZvBa7/vSQIZCi4uuwo2N3q+7jJURpMVCcbaX0S1Mg65WZ5ilXvC67MviJAsdjqqgD+CEq4RKo5AYGgINkVAA== math-random@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac" + integrity sha1-izqsWIuKZuSXXjzepn97sylgH6w= meant@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/meant/-/meant-1.0.1.tgz#66044fea2f23230ec806fb515efea29c44d2115d" + integrity sha512-UakVLFjKkbbUwNWJ2frVLnnAtbb7D7DsloxRd3s/gDpI8rdv8W5Hp3NaDb+POBI1fQdeussER6NB8vpcRURvlg== mem@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" + integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= dependencies: mimic-fn "^1.0.0" mem@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/mem/-/mem-4.0.0.tgz#6437690d9471678f6cc83659c00cbafcd6b0cdaf" + integrity sha512-WQxG/5xYc3tMbYLXoXPm81ET2WDULiU5FxbuIoNbJqLOOI8zehXFdZuiUEgfdrU2mVB1pxBZUGlYORSrpuJreA== dependencies: map-age-cleaner "^0.1.1" mimic-fn "^1.0.0" @@ -4454,6 +5072,7 @@ mem@^4.0.0: meow@5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4" + integrity sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig== dependencies: camelcase-keys "^4.0.0" decamelize-keys "^1.0.0" @@ -4468,6 +5087,7 @@ meow@5.0.0: meow@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/meow/-/meow-4.0.1.tgz#d48598f6f4b1472f35bf6317a95945ace347f975" + integrity sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A== dependencies: camelcase-keys "^4.0.0" decamelize-keys "^1.0.0" @@ -4482,20 +5102,24 @@ meow@^4.0.0: merge-stream@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" + integrity sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE= dependencies: readable-stream "^2.0.1" -merge2@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.2.tgz#03212e3da8d86c4d8523cebd6318193414f94e34" +merge2@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5" + integrity sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA== merge@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + version "1.2.1" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145" + integrity sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ== micromatch@^2.3.11: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + integrity sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU= dependencies: arr-diff "^2.0.0" array-unique "^0.2.1" @@ -4514,6 +5138,7 @@ micromatch@^2.3.11: micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" + integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" @@ -4529,47 +5154,44 @@ micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: snapdragon "^0.8.1" to-regex "^3.0.2" -mime-db@~1.35.0: - version "1.35.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.35.0.tgz#0569d657466491283709663ad379a99b90d9ab47" - -mime-db@~1.36.0: - version "1.36.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.36.0.tgz#5020478db3c7fe93aad7bbcc4dcf869c43363397" - -mime-types@^2.1.12, mime-types@~2.1.17: - version "2.1.19" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.19.tgz#71e464537a7ef81c15f2db9d97e913fc0ff606f0" - dependencies: - mime-db "~1.35.0" +mime-db@~1.37.0: + version "1.37.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8" + integrity sha512-R3C4db6bgQhlIhPU48fUtdVmKnflq+hRdad7IyKhtFj06VPNVdk2RhiYL3UjQIlso8L+YxAtFkobT0VK+S/ybg== -mime-types@~2.1.19: - version "2.1.20" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.20.tgz#930cb719d571e903738520f8470911548ca2cc19" +mime-types@^2.1.12, mime-types@~2.1.19: + version "2.1.21" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.21.tgz#28995aa1ecb770742fe6ae7e58f9181c744b3f96" + integrity sha512-3iL6DbwpyLzjR3xHSFNFeb9Nz/M8WDkX33t1GFQnFOllWk8pOrh/LSrB5OXlnlW5P9LH73X6loW/eogc+F5lJg== dependencies: - mime-db "~1.36.0" + mime-db "~1.37.0" mime@^2.0.3: - version "2.3.1" - resolved "https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369" + version "2.4.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.0.tgz#e051fd881358585f3279df333fe694da0bcffdd6" + integrity sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w== mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" + integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== mimic-response@^1.0.0, mimic-response@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== dependencies: brace-expansion "^1.1.7" minimist-options@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" + integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ== dependencies: arrify "^1.0.1" is-plain-obj "^1.1.0" @@ -4577,31 +5199,37 @@ minimist-options@^3.0.1: minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= -minipass@^2.2.1, minipass@^2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.3.tgz#a7dcc8b7b833f5d368759cce544dccb55f50f233" +minipass@^2.2.1, minipass@^2.3.3, minipass@^2.3.4: + version "2.3.5" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848" + integrity sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA== dependencies: safe-buffer "^5.1.2" yallist "^3.0.0" -minizlib@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb" +minizlib@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.1.tgz#6734acc045a46e61d596a43bb9d9cd326e19cc42" + integrity sha512-TrfjCjk4jLhcJyGMYymBH6oTXcWjYbUAXTHDbtnWHjZC25h0cdajHuPE1zxb4DVmu8crfh+HwH/WMuyLG0nHBg== dependencies: minipass "^2.2.1" mississippi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f" + integrity sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw== dependencies: concat-stream "^1.5.0" duplexify "^3.4.2" @@ -4617,6 +5245,7 @@ mississippi@^2.0.0: mississippi@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" + integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== dependencies: concat-stream "^1.5.0" duplexify "^3.4.2" @@ -4632,6 +5261,7 @@ mississippi@^3.0.0: mixin-deep@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" + integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== dependencies: for-in "^1.0.2" is-extendable "^1.0.1" @@ -4639,16 +5269,19 @@ mixin-deep@^1.2.0: mkdirp@0.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= dependencies: minimist "0.0.8" modify-values@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" + integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" + integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= dependencies: aproba "^1.1.1" copy-concurrently "^1.0.0" @@ -4660,22 +5293,27 @@ move-concurrently@^1.0.1: ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= ms@^2.0.0, ms@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== mute-stream@~0.0.4: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= nan@^2.9.2: - version "2.10.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" + version "2.11.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766" + integrity sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA== nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" + integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" @@ -4692,10 +5330,12 @@ nanomatch@^1.2.9: natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= needle@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d" + version "2.2.4" + resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.4.tgz#51931bff82533b1928b7d1d69e01f1b00ffd2a4e" + integrity sha512-HyoqEb4wr/rsoaIDfTH2aVL9nWtQqba2/HvMv+++m8u0dz808MaagKILxtfeSN7QU7nvbQ79zk3vYOJp9zsNEA== dependencies: debug "^2.1.2" iconv-lite "^0.4.4" @@ -4704,32 +5344,38 @@ needle@^2.2.1: nerf-dart@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/nerf-dart/-/nerf-dart-1.0.0.tgz#e6dab7febf5ad816ea81cf5c629c5a0ebde72c1a" + integrity sha1-5tq3/r9a2Bbqgc9cYpxaDr3nLBo= nice-try@^1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== node-emoji@^1.4.1: version "1.8.1" resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.8.1.tgz#6eec6bfb07421e2148c75c6bba72421f8530a826" + integrity sha512-+ktMAh1Jwas+TnGodfCfjUbJKoANqPaJFN0z0iqh41eqD8dvguNzcitVSBSVK1pidz0AqGbLKcoVuVLRVZ/aVg== dependencies: lodash.toarray "^4.4.0" node-fetch-npm@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz#7258c9046182dca345b4208eda918daf33697ff7" + integrity sha512-nJIxm1QmAj4v3nfCvEeCrYSoVwXyxLnaPBK5W1W5DGEJwjlKuC2VEUycGw5oxk+4zZahRrB84PUJJgEmhFTDFw== dependencies: encoding "^0.1.11" json-parse-better-errors "^1.0.0" safe-buffer "^5.1.1" -node-fetch@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.2.0.tgz#4ee79bde909262f9775f731e3656d0db55ced5b5" +node-fetch@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.3.0.tgz#1a1d940bbfb916a1d3e0219f037e89e71f8c5fa5" + integrity sha512-MOd8pV3fxENbryESLgVIeaGKrdl+uaYhCSSVkjeOb/31/njTpcis5aWfdqgNlHIrKOLRbMnfPINPOML2CIFeXA== node-gyp@^3.8.0: version "3.8.0" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.8.0.tgz#540304261c330e80d0d5edce253a68cb3964218c" + integrity sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA== dependencies: fstream "^1.0.0" glob "^7.0.3" @@ -4747,23 +5393,27 @@ node-gyp@^3.8.0: node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= node-modules-regexp@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" + integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= node-notifier@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea" + version "5.3.0" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.3.0.tgz#c77a4a7b84038733d5fb351aafd8a268bfe19a01" + integrity sha512-AhENzCSGZnZJgBARsUjnQ7DnZbzyP+HxlVXuD0xqAnvL8q+OqtSX7lGg9e8nHzwXkMMXNdVeqq4E2M3EUAqX6Q== dependencies: growly "^1.3.0" - semver "^5.4.1" + semver "^5.5.0" shellwords "^0.1.1" which "^1.3.0" node-pre-gyp@^0.10.0: version "0.10.3" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" + integrity sha512-d1xFs+C/IPS8Id0qPTZ4bUT8wWryfR/OzzAFxweG+uLN85oPzyo2Iw6bVlLQ/JOdgNonXLCoRyqDzDWq4iw72A== dependencies: detect-libc "^1.0.2" mkdirp "^0.5.1" @@ -4776,21 +5426,24 @@ node-pre-gyp@^0.10.0: semver "^5.3.0" tar "^4" -node-releases@^1.0.0-alpha.11: - version "1.0.0-alpha.11" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.0-alpha.11.tgz#73c810acc2e5b741a17ddfbb39dfca9ab9359d8a" +node-releases@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.5.tgz#a641adcc968b039a27345d92ef10b093e5cbd41d" + integrity sha512-Ky7q0BO1BBkG/rQz6PkEZ59rwo+aSfhczHP1wwq8IowoVdN/FpiP7qp0XW0P2+BVCWe5fQUBozdbVd54q1RbCQ== dependencies: semver "^5.3.0" "nopt@2 || 3": version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= dependencies: abbrev "1" nopt@^4.0.1, nopt@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" + integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= dependencies: abbrev "1" osenv "^0.1.4" @@ -4798,6 +5451,7 @@ nopt@^4.0.1, nopt@~4.0.1: normalize-package-data@^2.0.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.4.0, "normalize-package-data@~1.0.1 || ^2.0.0", normalize-package-data@~2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" + integrity sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw== dependencies: hosted-git-info "^2.1.4" is-builtin-module "^1.0.0" @@ -4807,41 +5461,54 @@ normalize-package-data@^2.0.0, normalize-package-data@^2.3.2, normalize-package- normalize-path@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-1.0.0.tgz#32d0e472f91ff345701c15a8311018d3b0a90379" + integrity sha1-MtDkcvkf80VwHBWoMRAY07CpA3k= normalize-path@^2.0.1, normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= dependencies: remove-trailing-separator "^1.0.1" -normalize-url@^3.0.0, normalize-url@^3.1.0: +normalize-url@^3.1.0: version "3.3.0" resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" + integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== + +normalize-url@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.0.0.tgz#6c2214dde2fc8ea88509ec79774ccbd1d426c1ea" + integrity sha512-OrtNzJOeI9+UaF8KfvPoqh8ZVjLiun+fggtLzrpPsmdOU01eIp3vYXDfeFv4KwqJxcmmrW/ubNCN+9iIQRVtfw== npm-audit-report@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/npm-audit-report/-/npm-audit-report-1.3.1.tgz#e79ea1fcb5ffaf3031102b389d5222c2b0459632" + integrity sha512-SjTF8ZP4rOu3JiFrTMi4M1CmVo2tni2sP4TzhyCMHwnMGf6XkdGLZKt9cdZ12esKf0mbQqFyU9LtY0SoeahL7g== dependencies: cli-table3 "^0.5.0" console-control-strings "^1.1.0" npm-bundled@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308" + version "1.0.5" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" + integrity sha512-m/e6jgWu8/v5niCUKQi9qQl8QdeEduFA96xHDDzFGqly0OOjI7c+60KM/2sppfnUU9JJagf+zs+yGhqSOFj71g== npm-cache-filename@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/npm-cache-filename/-/npm-cache-filename-1.0.2.tgz#ded306c5b0bfc870a9e9faf823bc5f283e05ae11" + integrity sha1-3tMGxbC/yHCp6fr4I7xfKD4FrhE= npm-install-checks@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-3.0.0.tgz#d4aecdfd51a53e3723b7b2f93b2ee28e307bc0d7" + integrity sha1-1K7N/VGlPjcjt7L5Oy7ijjB7wNc= dependencies: semver "^2.3.0 || 3.x || 4 || 5" npm-lifecycle@^2.0.3, npm-lifecycle@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-2.1.0.tgz#1eda2eedb82db929e3a0c50341ab0aad140ed569" + integrity sha512-QbBfLlGBKsktwBZLj6AviHC6Q9Y3R/AY4a2PYSIRhSKSS0/CxRyD/PfxEX6tPeOCXQgMSNdwGeECacstgptc+g== dependencies: byline "^5.0.0" graceful-fs "^4.1.11" @@ -4855,10 +5522,12 @@ npm-lifecycle@^2.0.3, npm-lifecycle@^2.1.0: npm-logical-tree@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/npm-logical-tree/-/npm-logical-tree-1.2.1.tgz#44610141ca24664cad35d1e607176193fd8f5b88" + integrity sha512-AJI/qxDB2PWI4LG1CYN579AY1vCiNyWfkiquCsJWqntRu/WwimVrC8yXeILBFHDwxfOejxewlmnvW9XXjMlYIg== "npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", "npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", "npm-package-arg@^5.1.2 || 6", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.0.tgz#15ae1e2758a5027efb4c250554b85a737db7fcc1" + integrity sha512-zYbhP2k9DbJhA0Z3HKUePUgdB1x7MfIfKssC+WLPFMKTBZKpZh5m13PgexJjCq6KW7j17r0jHWcCpxEqnnncSA== dependencies: hosted-git-info "^2.6.0" osenv "^0.1.5" @@ -4866,8 +5535,9 @@ npm-logical-tree@^1.2.1: validate-npm-package-name "^3.0.0" npm-packlist@^1.1.10, npm-packlist@^1.1.11, npm-packlist@^1.1.6: - version "1.1.11" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.11.tgz#84e8c683cbe7867d34b1d357d893ce29e28a02de" + version "1.1.12" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.12.tgz#22bde2ebc12e72ca482abd67afc51eb49377243a" + integrity sha512-WJKFOVMeAlsU/pjXuqVdzU0WfgtIBCupkEVwn+1Y0ERAbUfWw8R4GjgVbaKnUjRoD2FoQbHOCbOyT5Mbs9Lw4g== dependencies: ignore-walk "^3.0.1" npm-bundled "^1.0.1" @@ -4875,19 +5545,23 @@ npm-packlist@^1.1.10, npm-packlist@^1.1.11, npm-packlist@^1.1.6: npm-path@^2.0.2: version "2.0.4" resolved "https://registry.yarnpkg.com/npm-path/-/npm-path-2.0.4.tgz#c641347a5ff9d6a09e4d9bce5580c4f505278e64" + integrity sha512-IFsj0R9C7ZdR5cP+ET342q77uSRdtWOlWpih5eC+lu29tIDbNEgDbzgVJ5UFvYHWhxDZ5TFkJafFioO0pPQjCw== dependencies: which "^1.2.10" npm-pick-manifest@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-2.1.0.tgz#dc381bdd670c35d81655e1d5a94aa3dd4d87fce5" + version "2.2.3" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz#32111d2a9562638bb2c8f2bf27f7f3092c8fae40" + integrity sha512-+IluBC5K201+gRU85vFlUwX3PFShZAbAgDNp2ewJdWMVSppdo/Zih0ul2Ecky/X7b51J7LrrUAP+XOmOCvYZqA== dependencies: + figgy-pudding "^3.5.1" npm-package-arg "^6.0.0" semver "^5.4.1" npm-profile@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/npm-profile/-/npm-profile-3.0.2.tgz#58d568f1b56ef769602fd0aed8c43fa0e0de0f57" + integrity sha512-rEJOFR6PbwOvvhGa2YTNOJQKNuc6RovJ6T50xPU7pS9h/zKPNCJ+VHZY2OFXyZvEi+UQYtHRTp8O/YM3tUD20A== dependencies: aproba "^1.1.2 || 2" make-fetch-happen "^2.5.0 || 3 || 4" @@ -4895,6 +5569,7 @@ npm-profile@^3.0.2: npm-registry-client@^8.6.0: version "8.6.0" resolved "https://registry.yarnpkg.com/npm-registry-client/-/npm-registry-client-8.6.0.tgz#7f1529f91450732e89f8518e0f21459deea3e4c4" + integrity sha512-Qs6P6nnopig+Y8gbzpeN/dkt+n7IyVd8f45NTMotGk6Qo7GfBmzwYx6jRLoOOgKiMnaQfYxsuyQlD8Mc3guBhg== dependencies: concat-stream "^1.5.2" graceful-fs "^4.1.6" @@ -4913,6 +5588,7 @@ npm-registry-client@^8.6.0: npm-registry-fetch@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-1.1.1.tgz#710bc5947d9ee2c549375072dab6d5d17baf2eb2" + integrity sha512-ev+zxOXsgAqRsR8Rk+ErjgWOlbrXcqGdme94/VNdjDo1q8TSy10Pp8xgDv/ZmMk2jG/KvGtXUNG4GS3+l6xbDw== dependencies: bluebird "^3.5.1" figgy-pudding "^3.0.0" @@ -4924,6 +5600,7 @@ npm-registry-fetch@^1.1.0: npm-registry-fetch@^3.0.0: version "3.8.0" resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-3.8.0.tgz#aa7d9a7c92aff94f48dba0984bdef4bd131c88cc" + integrity sha512-hrw8UMD+Nob3Kl3h8Z/YjmKamb1gf7D1ZZch2otrIXM3uFLB5vjEY6DhMlq80z/zZet6eETLbOXcuQudCB3Zpw== dependencies: JSONStream "^1.3.4" bluebird "^3.5.1" @@ -4935,16 +5612,19 @@ npm-registry-fetch@^3.0.0: npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= dependencies: path-key "^2.0.0" npm-user-validate@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/npm-user-validate/-/npm-user-validate-1.0.0.tgz#8ceca0f5cea04d4e93519ef72d0557a75122e951" + integrity sha1-jOyg9c6gTU6TUZ73LQVXp1Ei6VE= npm-which@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/npm-which/-/npm-which-3.0.1.tgz#9225f26ec3a285c209cae67c3b11a6b4ab7140aa" + integrity sha1-kiXybsOihcIJyuZ8OxGmtKtxQKo= dependencies: commander "^2.9.0" npm-path "^2.0.2" @@ -4953,6 +5633,7 @@ npm-which@^3.0.1: npm@^6.3.0: version "6.4.1" resolved "https://registry.yarnpkg.com/npm/-/npm-6.4.1.tgz#4f39f9337b557a28faed4a771d5c8802d6b4288b" + integrity sha512-mXJL1NTVU136PtuopXCUQaNWuHlXCTp4McwlSW8S9/Aj8OEPAlSBgo8og7kJ01MjCDrkmqFQTvN5tTEhBMhXQg== dependencies: JSONStream "^1.3.4" abbrev "~1.1.1" @@ -5067,6 +5748,7 @@ npm@^6.3.0: "npmlog@0 || 1 || 2 || 3 || 4", "npmlog@2 || ^3.1.0 || ^4.0.0", npmlog@^4.0.2, npmlog@~4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" + integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== dependencies: are-we-there-yet "~1.1.2" console-control-strings "~1.1.0" @@ -5076,44 +5758,48 @@ npm@^6.3.0: number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= nwsapi@^2.0.7: - version "2.0.8" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.8.tgz#e3603579b7e162b3dbedae4fb24e46f771d8fa24" - -oauth-sign@~0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" + version "2.0.9" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.9.tgz#77ac0cdfdcad52b6a1151a84e73254edc33ed016" + integrity sha512-nlWFSCTYQcHk/6A9FFnfhKc14c3aFhfdNBXgo8Qgi9QTBu/qg3Ww+Uiz9wMzXd1T8GFxPc2QIHB6Qtf2XFryFQ== oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== object-assign@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= object-copy@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" + integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= dependencies: copy-descriptor "^0.1.0" define-property "^0.2.5" kind-of "^3.0.3" -object-keys@^1.0.8: +object-keys@^1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.12.tgz#09c53855377575310cca62f55bb334abff7b3ed2" + integrity sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag== object-visit@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" + integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= dependencies: isobject "^3.0.0" object.getownpropertydescriptors@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" + integrity sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY= dependencies: define-properties "^1.1.2" es-abstract "^1.5.1" @@ -5121,6 +5807,7 @@ object.getownpropertydescriptors@^2.0.3: object.omit@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + integrity sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo= dependencies: for-own "^0.1.4" is-extendable "^0.1.1" @@ -5128,26 +5815,38 @@ object.omit@^2.0.0: object.pick@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" + integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= dependencies: isobject "^3.0.1" +octokit-pagination-methods@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz#cf472edc9d551055f9ef73f6e42b4dbb4c80bea4" + integrity sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ== + once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0, once@~1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" -onetime@^1.0.0: - version "1.1.0" - resolved "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + integrity sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= + dependencies: + mimic-fn "^1.0.0" opener@^1.5.0: version "1.5.1" resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" + integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA== optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" + integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= dependencies: minimist "~0.0.1" wordwrap "~0.0.2" @@ -5155,6 +5854,7 @@ optimist@^0.6.1: optionator@^0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" + integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= dependencies: deep-is "~0.1.3" fast-levenshtein "~2.0.4" @@ -5166,10 +5866,12 @@ optionator@^0.8.1: os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= os-locale@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" + integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== dependencies: execa "^0.7.0" lcid "^1.0.0" @@ -5178,100 +5880,129 @@ os-locale@^2.0.0: os-locale@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.0.1.tgz#3b014fbf01d87f60a1e5348d80fe870dc82c4620" + integrity sha512-7g5e7dmXPtzcP4bgsZ8ixDVqA7oWYuEz4lOSujeWyliPai4gfVDiFIcwBg3aGCPnmSGfzOKTK3ccPn0CKv3DBw== dependencies: execa "^0.10.0" lcid "^2.0.0" mem "^4.0.0" -os-name@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/os-name/-/os-name-2.0.1.tgz#b9a386361c17ae3a21736ef0599405c9a8c5dc5e" +os-name@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.0.0.tgz#e1434dbfddb8e74b44c98b56797d951b7648a5d9" + integrity sha512-7c74tib2FsdFbQ3W+qj8Tyd1R3Z6tuVRNNxXjJcZ4NgjIEQU9N/prVMqcW29XZPXGACqaXN3jq58/6hoaoXH6g== dependencies: - macos-release "^1.0.0" - win-release "^1.0.0" + macos-release "^2.0.0" + windows-release "^3.1.0" os-tmpdir@^1.0.0, os-tmpdir@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= osenv@0, osenv@^0.1.4, osenv@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" + integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== dependencies: os-homedir "^1.0.0" os-tmpdir "^1.0.0" -p-cancelable@^0.5.0: - version "0.5.1" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.5.1.tgz#b797a33c43c645cd70d5a838b1d25352b9e29e75" +p-cancelable@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.0.0.tgz#07e9c6d22c31f9c6784cb4f1e1454a79b6d9e2d6" + integrity sha512-USgPoaC6tkTGlS831CxsVdmZmyb8tR1D+hStI84MyckLOzfJlYQUweomrwE3D8T7u5u5GVuW064LT501wHTYYA== p-defer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= p-filter@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-filter/-/p-filter-1.0.0.tgz#629d317150209c8fd508ba137713ef4bb920e9db" + integrity sha1-Yp0xcVAgnI/VCLoTdxPvS7kg6ds= dependencies: p-map "^1.0.0" p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= p-is-promise@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e" + integrity sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4= + +p-is-promise@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.0.0.tgz#7554e3d572109a87e1f3f53f6a7d85d1b194f4c5" + integrity sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg== p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== dependencies: p-try "^1.0.0" p-limit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.0.0.tgz#e624ed54ee8c460a778b3c9f3670496ff8a57aec" + integrity sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A== dependencies: p-try "^2.0.0" p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= dependencies: p-limit "^1.1.0" p-locate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== dependencies: p-limit "^2.0.0" p-map@^1.0.0, p-map@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" + integrity sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA== + +p-map@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.0.0.tgz#be18c5a5adeb8e156460651421aceca56c213a50" + integrity sha512-GO107XdrSUmtHxVoi60qc9tUl/KkNKm+X2CF4P9amalpGxv5YqVPJNfSb0wcA+syCopkZvYYIzW8OVTQW59x/w== p-reduce@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" + integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo= p-retry@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-2.0.0.tgz#b97f1f4d6d81a3c065b2b40107b811e995c1bfba" + integrity sha512-ZbCuzAmiwJ45q4evp/IG9D+5MUllGSUeCWwPt3j/tdYSi1KPkSD+46uqmAA1LhccDhOXv8kYZKNb8x78VflzfA== dependencies: retry "^0.12.0" p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= p-try@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1" + integrity sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ== package-json@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed" + integrity sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0= dependencies: got "^6.7.1" registry-auth-token "^3.0.1" @@ -5281,6 +6012,7 @@ package-json@^4.0.0: pacote@^8.1.6: version "8.1.6" resolved "https://registry.yarnpkg.com/pacote/-/pacote-8.1.6.tgz#8e647564d38156367e7a9dc47a79ca1ab278d46e" + integrity sha512-wTOOfpaAQNEQNtPEx92x9Y9kRWVu45v583XT8x2oEV2xRB74+xdqMZIeGW4uFvAyZdmSBtye+wKdyyLaT8pcmw== dependencies: bluebird "^3.5.1" cacache "^11.0.2" @@ -5311,6 +6043,7 @@ pacote@^8.1.6: parallel-transform@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.1.0.tgz#d410f065b05da23081fcd10f28854c29bda33b06" + integrity sha1-1BDwZbBdojCB/NEPKIVMKb2jOwY= dependencies: cyclist "~0.2.2" inherits "^2.0.3" @@ -5319,10 +6052,12 @@ parallel-transform@^1.1.0: parse-github-url@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/parse-github-url/-/parse-github-url-1.0.2.tgz#242d3b65cbcdda14bb50439e3242acf6971db395" + integrity sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw== parse-glob@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + integrity sha1-ssN2z7EfNVE7rdFz7wu246OIORw= dependencies: glob-base "^0.3.0" is-dotfile "^1.0.0" @@ -5332,64 +6067,69 @@ parse-glob@^3.0.4: parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= dependencies: error-ex "^1.2.0" parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= dependencies: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -parse-url@^1.3.0: - version "1.3.11" - resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-1.3.11.tgz#57c15428ab8a892b1f43869645c711d0e144b554" - dependencies: - is-ssh "^1.3.0" - protocols "^1.4.0" - parse5@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" + integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" + integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= path-exists@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= dependencies: pinkie-promise "^2.0.0" path-exists@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= path-is-inside@^1.0.1, path-is-inside@^1.0.2, path-is-inside@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= path-parse@^1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== path-type@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= dependencies: graceful-fs "^4.1.2" pify "^2.0.0" @@ -5398,40 +6138,48 @@ path-type@^1.0.0: path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== dependencies: pify "^3.0.0" performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= dependencies: pinkie "^2.0.0" pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= pirates@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.0.tgz#850b18781b4ac6ec58a43c9ed9ec5fe6796addbd" + integrity sha512-8t5BsXy1LUIjn3WWOlOuFDuKswhQb/tkak641lvBgmPOBUQHXveORtlMCp6OdPV1dtuTaEahKA8VNz6uLfKBtA== dependencies: node-modules-regexp "^1.0.0" pkg-conf@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-2.1.0.tgz#2126514ca6f2abfebd168596df18ba57867f0058" + integrity sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg= dependencies: find-up "^2.0.0" load-json-file "^4.0.0" @@ -5439,53 +6187,56 @@ pkg-conf@^2.1.0: pkg-dir@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= dependencies: find-up "^2.1.0" please-upgrade-node@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/please-upgrade-node/-/please-upgrade-node-3.1.1.tgz#ed320051dfcc5024fae696712c8288993595e8ac" + integrity sha512-KY1uHnQ2NlQHqIJQpnh/i54rKkuxCEBx+voJIS/Mvb+L2iYd2NMotwduhKTMjfC1uKoX3VXOxLjIYG66dfJTVQ== dependencies: semver-compare "^1.0.0" pn@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" + integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" + integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= prepend-http@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= prepend-http@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= prettier@^1.14.3: - version "1.14.3" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.3.tgz#90238dd4c0684b7edce5f83b0fb7328e48bd0895" - -pretty-format@^23.2.0: - version "23.2.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.2.0.tgz#3b0aaa63c018a53583373c1cb3a5d96cc5e83017" - dependencies: - ansi-regex "^3.0.0" - ansi-styles "^3.2.0" + version "1.15.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.15.3.tgz#1feaac5bdd181237b54dbe65d874e02a1472786a" + integrity sha512-gAU9AGAPMaKb3NNSUUuhhFAS7SCO4ALTN4nRIn6PJ075Qd28Yn2Ig2ahEJWdJwJmlEBTUfC7mMUSFy8MwsOCfg== pretty-format@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760" + integrity sha512-zf9NV1NSlDLDjycnwm6hpFATCGl/K1lt0R/GdkAK2O5LN/rwJoB+Mh93gGJjut4YbmecbfgLWVGSTCr0Ewvvbw== dependencies: ansi-regex "^3.0.0" ansi-styles "^3.2.0" @@ -5493,18 +6244,22 @@ pretty-format@^23.6.0: private@^0.1.6, private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== process-nextick-args@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" + integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== promise-inflight@^1.0.1, promise-inflight@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= promise-retry@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-1.1.1.tgz#6739e968e3051da20ce6497fb2b50f6911df3d6d" + integrity sha1-ZznpaOMFHaIM5kl/srUPaRHfPW0= dependencies: err-code "^1.0.0" retry "^0.10.0" @@ -5512,6 +6267,7 @@ promise-retry@^1.1.1: prompts@^0.1.9: version "0.1.14" resolved "https://registry.yarnpkg.com/prompts/-/prompts-0.1.14.tgz#a8e15c612c5c9ec8f8111847df3337c9cbd443b2" + integrity sha512-rxkyiE9YH6zAz/rZpywySLKkpaj0NMVyNw1qhsubdbjjSgcayjTShDreZGlFMcGSu5sab3bAKPfFk78PB90+8w== dependencies: kleur "^2.0.1" sisteransi "^0.1.1" @@ -5519,38 +6275,41 @@ prompts@^0.1.9: promzard@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/promzard/-/promzard-0.3.0.tgz#26a5d6ee8c7dee4cb12208305acfb93ba382a9ee" + integrity sha1-JqXW7ox97kyxIggwWs+5O6OCqe4= dependencies: read "1" proto-list@~1.2.1: version "1.2.4" resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" - -protocols@^1.1.0, protocols@^1.4.0: - version "1.4.6" - resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.6.tgz#f8bb263ea1b5fd7a7604d26b8be39bd77678bf8a" + integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= protoduck@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.0.tgz#752145e6be0ad834cb25716f670a713c860dce70" + version "5.0.1" + resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f" + integrity sha512-WxoCeDCoCBY55BMvj4cAEjdVUFGRWed9ZxPlqTKYyw1nDDTQ4pqmnIMAGfJlg7Dx35uB/M+PHJPTmGOvaCaPTg== dependencies: - genfun "^4.0.1" + genfun "^5.0.0" prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= -psl@^1.1.24: +psl@^1.1.24, psl@^1.1.28: version "1.1.29" resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" + integrity sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ== pump@^2.0.0, pump@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" + integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== dependencies: end-of-stream "^1.1.0" once "^1.3.1" @@ -5558,6 +6317,7 @@ pump@^2.0.0, pump@^2.0.1: pump@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== dependencies: end-of-stream "^1.1.0" once "^1.3.1" @@ -5565,6 +6325,7 @@ pump@^3.0.0: pumpify@^1.3.3: version "1.5.1" resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" + integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== dependencies: duplexify "^3.6.0" inherits "^2.0.3" @@ -5573,26 +6334,32 @@ pumpify@^1.3.3: punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= -punycode@^2.1.0: +punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" + integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= qrcode-terminal@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz#bb5b699ef7f9f0505092a3748be4464fe71b5819" + integrity sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ== -qs@~6.5.1, qs@~6.5.2: +qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== query-string@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.1.0.tgz#01e7d69f6a0940dac67a937d6c6325647aa4532a" + version "6.2.0" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.2.0.tgz#468edeb542b7e0538f9f9b1aeb26f034f19c86e1" + integrity sha512-5wupExkIt8RYL4h/FE+WTg3JHk62e6fFPWtAZA9J5IWK1PfTfKkMS93HBUHcFpeYi9KsY5pFbh+ldvEyaz5MyA== dependencies: decode-uri-component "^0.2.0" strict-uri-encode "^2.0.0" @@ -5600,14 +6367,17 @@ query-string@^6.1.0: quick-lru@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" + integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= qw@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/qw/-/qw-1.0.1.tgz#efbfdc740f9ad054304426acb183412cc8b996d4" + integrity sha1-77/cdA+a0FQwRCassYNBLMi5ltQ= randomatic@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.0.0.tgz#d35490030eb4f7578de292ce6dfb04a91a128923" + version "3.1.1" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-3.1.1.tgz#b776efc59375984e36c537b2f51a1f0aff0da1ed" + integrity sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw== dependencies: is-number "^4.0.0" kind-of "^6.0.0" @@ -5616,6 +6386,7 @@ randomatic@^3.0.0: rc@^1.0.1, rc@^1.1.6, rc@^1.2.7, rc@^1.2.8: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" + integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== dependencies: deep-extend "^0.6.0" ini "~1.3.0" @@ -5625,12 +6396,14 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.7, rc@^1.2.8: read-cmd-shim@^1.0.1, read-cmd-shim@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz#2d5d157786a37c055d22077c32c53f8329e91c7b" + integrity sha1-LV0Vd4ajfAVdIgd8MsU/gynpHHs= dependencies: graceful-fs "^4.1.2" read-installed@~4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/read-installed/-/read-installed-4.0.3.tgz#ff9b8b67f187d1e4c29b9feb31f6b223acd19067" + integrity sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc= dependencies: debuglog "^1.0.1" read-package-json "^2.0.0" @@ -5644,6 +6417,7 @@ read-installed@~4.0.3: "read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@^2.0.13: version "2.0.13" resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.0.13.tgz#2e82ebd9f613baa6d2ebe3aa72cefe3f68e41f4a" + integrity sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg== dependencies: glob "^7.1.1" json-parse-better-errors "^1.0.1" @@ -5655,6 +6429,7 @@ read-installed@~4.0.3: read-package-tree@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.2.1.tgz#6218b187d6fac82289ce4387bbbaf8eef536ad63" + integrity sha512-2CNoRoh95LxY47LvqrehIAfUVda2JbuFE/HaGYs42bNrGG+ojbw1h3zOcPcQ+1GQ3+rkzNndZn85u1XyZ3UsIA== dependencies: debuglog "^1.0.1" dezalgo "^1.0.0" @@ -5665,6 +6440,7 @@ read-package-tree@^5.2.1: read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= dependencies: find-up "^1.0.0" read-pkg "^1.0.0" @@ -5672,6 +6448,7 @@ read-pkg-up@^1.0.1: read-pkg-up@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" + integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc= dependencies: find-up "^2.0.0" read-pkg "^3.0.0" @@ -5679,6 +6456,7 @@ read-pkg-up@^3.0.0: read-pkg-up@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978" + integrity sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA== dependencies: find-up "^3.0.0" read-pkg "^3.0.0" @@ -5686,6 +6464,7 @@ read-pkg-up@^4.0.0: read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= dependencies: load-json-file "^1.0.0" normalize-package-data "^2.3.2" @@ -5694,6 +6473,7 @@ read-pkg@^1.0.0: read-pkg@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= dependencies: load-json-file "^4.0.0" normalize-package-data "^2.3.2" @@ -5702,6 +6482,7 @@ read-pkg@^3.0.0: read-pkg@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-4.0.1.tgz#963625378f3e1c4d48c85872b5a6ec7d5d093237" + integrity sha1-ljYlN48+HE1IyFhytabsfV0JMjc= dependencies: normalize-package-data "^2.3.2" parse-json "^4.0.0" @@ -5710,12 +6491,14 @@ read-pkg@^4.0.0: read@1, read@~1.0.1, read@~1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" + integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ= dependencies: mute-stream "~0.0.4" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" + integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== dependencies: core-util-is "~1.0.0" inherits "~2.0.3" @@ -5727,16 +6510,18 @@ read@1, read@~1.0.1, read@~1.0.7: readable-stream@~1.1.10: version "1.1.14" - resolved "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= dependencies: core-util-is "~1.0.0" inherits "~2.0.1" isarray "0.0.1" string_decoder "~0.10.x" -readdir-scoped-modules@^1.0.0: +readdir-scoped-modules@*, readdir-scoped-modules@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747" + integrity sha1-n6+jfShr5dksuuve4DDcm19AZ0c= dependencies: debuglog "^1.0.1" dezalgo "^1.0.0" @@ -5744,20 +6529,23 @@ readdir-scoped-modules@^1.0.0: once "^1.3.0" realpath-native@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.1.tgz#07f40a0cce8f8261e2e8b7ebebf5c95965d7b633" + version "1.0.2" + resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.0.2.tgz#cd51ce089b513b45cf9b1516c82989b51ccc6560" + integrity sha512-+S3zTvVt9yTntFrBpm7TQmQ3tzpCrnA1a/y+3cUHAc9ZR6aIjG0WNLR+Rj79QpJktY+VeW/TQtFlQ1bzsehI8g== dependencies: util.promisify "^1.0.0" rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" + integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= dependencies: resolve "^1.1.6" redent@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa" + integrity sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo= dependencies: indent-string "^3.0.0" strip-indent "^2.0.0" @@ -5765,42 +6553,50 @@ redent@^2.0.0: redeyed@~2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-2.1.1.tgz#8984b5815d99cb220469c99eeeffe38913e6cc0b" + integrity sha1-iYS1gV2ZyyIEacme7v/jiRPmzAs= dependencies: esprima "~4.0.0" regenerate-unicode-properties@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-7.0.0.tgz#107405afcc4a190ec5ed450ecaa00ed0cafa7a4c" + integrity sha512-s5NGghCE4itSlUS+0WUj88G6cfMVMmH8boTPNvABf8od+2dhT9WDlWu8n01raQAJZMOK8Ch6jSexaRO7swd6aw== dependencies: regenerate "^1.4.0" regenerate@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" + integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== regenerator-runtime@^0.10.5: version "0.10.5" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" + integrity sha1-M2w+/BIgrc7dosn6tntaeVWjNlg= regenerator-runtime@^0.11.0, regenerator-runtime@^0.11.1: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" + integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== regenerator-transform@^0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" + integrity sha512-5ipTrZFSq5vU2YoGoww4uaRVAK4wyYC4TSICibbfEPOruUu8FFP7ErV0BjmbIOEpn3O/k9na9UEdYR/3m7N6uA== dependencies: private "^0.1.6" regex-cache@^0.4.2: version "0.4.4" resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" + integrity sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ== dependencies: is-equal-shallow "^0.1.3" regex-not@^1.0.0, regex-not@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" + integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== dependencies: extend-shallow "^3.0.2" safe-regex "^1.1.0" @@ -5808,6 +6604,7 @@ regex-not@^1.0.0, regex-not@^1.0.2: regexpu-core@^4.1.3, regexpu-core@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.2.0.tgz#a3744fa03806cffe146dea4421a3e73bdcc47b1d" + integrity sha512-Z835VSnJJ46CNBttalHD/dB+Sj2ezmY6Xp38npwU87peK6mqOzOpV8eYktdkLTEkzzD+JsTcxd84ozd8I14+rw== dependencies: regenerate "^1.4.0" regenerate-unicode-properties "^7.0.0" @@ -5819,6 +6616,7 @@ regexpu-core@^4.1.3, regexpu-core@^4.2.0: registry-auth-token@^3.0.1, registry-auth-token@^3.3.1: version "3.3.2" resolved "https://registry.yarnpkg.com/registry-auth-token/-/registry-auth-token-3.3.2.tgz#851fd49038eecb586911115af845260eec983f20" + integrity sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ== dependencies: rc "^1.1.6" safe-buffer "^5.0.1" @@ -5826,54 +6624,64 @@ registry-auth-token@^3.0.1, registry-auth-token@^3.3.1: registry-url@^3.0.3: version "3.1.0" resolved "https://registry.yarnpkg.com/registry-url/-/registry-url-3.1.0.tgz#3d4ef870f73dde1d77f0cf9a381432444e174942" + integrity sha1-PU74cPc93h138M+aOBQyRE4XSUI= dependencies: rc "^1.0.1" regjsgen@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.4.0.tgz#c1eb4c89a209263f8717c782591523913ede2561" + integrity sha512-X51Lte1gCYUdlwhF28+2YMO0U6WeN0GLpgpA7LK7mbdDnkQYiwvEpmpe0F/cv5L14EbxgrdayAG3JETBv0dbXA== regjsparser@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.3.0.tgz#3c326da7fcfd69fa0d332575a41c8c0cdf588c96" + integrity sha512-zza72oZBBHzt64G7DxdqrOo/30bhHkwMUoT0WqfGu98XLd7N+1tsy5MJ96Bk4MD0y74n629RhmrGW6XlnLLwCA== dependencies: jsesc "~0.5.0" remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" + integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= repeat-element@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" + integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== repeat-string@^1.5.2, repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= repeating@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= dependencies: is-finite "^1.0.0" request-promise-core@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" + integrity sha1-Pu4AssWqgyOc+wTFcA2jb4HNCLY= dependencies: lodash "^4.13.1" request-promise-native@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5" + integrity sha1-UoF3D2jgyXGeUWP9P6tIIhX0/aU= dependencies: request-promise-core "1.1.1" stealthy-require "^1.1.0" tough-cookie ">=2.3.3" -request@^2.74.0, request@^2.88.0: +request@^2.74.0, request@^2.87.0, request@^2.88.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" + integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== dependencies: aws-sign2 "~0.7.0" aws4 "^1.8.0" @@ -5896,46 +6704,25 @@ request@^2.74.0, request@^2.88.0: tunnel-agent "^0.6.0" uuid "^3.3.2" -request@^2.87.0: - version "2.87.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.87.0.tgz#32f00235cd08d482b4d0d68db93a829c0ed5756e" - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.6.0" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.1" - forever-agent "~0.6.1" - form-data "~2.3.1" - har-validator "~5.0.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.17" - oauth-sign "~0.8.2" - performance-now "^2.1.0" - qs "~6.5.1" - safe-buffer "^5.1.1" - tough-cookie "~2.3.3" - tunnel-agent "^0.6.0" - uuid "^3.1.0" - require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= require-from-string@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= require-uncached@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" + integrity sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM= dependencies: caller-path "^0.1.0" resolve-from "^1.0.0" @@ -5943,115 +6730,131 @@ require-uncached@^1.0.3: resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" + integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= dependencies: resolve-from "^3.0.0" resolve-from@4.0.0, resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== resolve-from@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" + integrity sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY= resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" + integrity sha1-six699nWiBvItuZTM17rywoYh0g= resolve-global@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/resolve-global/-/resolve-global-0.1.0.tgz#8fb02cfd5b7db20118e886311f15af95bd15fbd9" + integrity sha1-j7As/Vt9sgEY6IYxHxWvlb0V+9k= dependencies: global-dirs "^0.1.0" resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" + integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@^1.1.6, resolve@^1.3.2: +resolve@1.x, resolve@^1.1.6, resolve@^1.3.2: version "1.8.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" + integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== dependencies: path-parse "^1.0.5" responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" + integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= dependencies: lowercase-keys "^1.0.0" -restore-cursor@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" + integrity sha1-n37ih/gv0ybU/RYpI9YhKe7g368= dependencies: - exit-hook "^1.0.0" - onetime "^1.0.0" + onetime "^2.0.0" + signal-exit "^3.0.2" ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" + integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== retry@^0.10.0: version "0.10.1" resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" + integrity sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q= retry@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" - -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - dependencies: - align-text "^0.1.1" + integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= right-pad@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/right-pad/-/right-pad-1.0.1.tgz#8ca08c2cbb5b55e74dafa96bf7fd1a27d568c8d0" + integrity sha1-jKCMLLtbVedNr6lr9/0aJ9VoyNA= rimraf@2, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@~2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" + integrity sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w== dependencies: glob "^7.0.5" rsvp@^3.3.3: version "3.6.2" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" + integrity sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw== run-queue@^1.0.0, run-queue@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" + integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= dependencies: aproba "^1.1.1" -rxjs@^6.1.0: - version "6.3.2" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.2.tgz#6a688b16c4e6e980e62ea805ec30648e1c60907f" +rxjs@^6.3.3: + version "6.3.3" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz#3c6a7fa420e844a81390fb1158a9ec614f4bad55" + integrity sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw== dependencies: tslib "^1.9.0" safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" + integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= dependencies: ret "~0.1.10" "safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== sane@^2.0.0: version "2.5.2" resolved "https://registry.yarnpkg.com/sane/-/sane-2.5.2.tgz#b4dc1861c21b427e929507a3e751e2a2cb8ab3fa" + integrity sha1-tNwYYcIbQn6SlQej51HiosuKs/o= dependencies: anymatch "^2.0.0" capture-exit "^1.2.0" @@ -6067,26 +6870,27 @@ sane@^2.0.0: sax@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== semantic-release@^15.9.16: - version "15.9.16" - resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-15.9.16.tgz#70391ef6a9246253f54061ecd06634994e305b1e" + version "15.12.3" + resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-15.12.3.tgz#9f7c5a8ac55624a6418e0bf95bf53c2030487c12" + integrity sha512-3HCKD2ORxi6jItIoP9WeYJjjHsZqozSf6WUGcLClnRH553OVNKf4mLdOwo9UHJe6dVNSk5z7oDfGWKGwVy63BA== dependencies: - "@semantic-release/commit-analyzer" "^6.0.0" + "@semantic-release/commit-analyzer" "^6.1.0" "@semantic-release/error" "^2.2.0" - "@semantic-release/github" "^5.0.0" - "@semantic-release/npm" "^5.0.1" - "@semantic-release/release-notes-generator" "^7.0.0" + "@semantic-release/github" "^5.1.0" + "@semantic-release/npm" "^5.0.5" + "@semantic-release/release-notes-generator" "^7.1.2" aggregate-error "^1.0.0" cosmiconfig "^5.0.1" debug "^4.0.0" env-ci "^3.0.0" execa "^1.0.0" figures "^2.0.0" - find-versions "^2.0.0" + find-versions "^3.0.0" get-stream "^4.0.0" git-log-parser "^1.2.0" - git-url-parse "^10.0.1" hook-std "^1.1.0" hosted-git-info "^2.7.1" lodash "^4.17.4" @@ -6103,40 +6907,44 @@ semantic-release@^15.9.16: semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" + integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= semver-diff@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36" + integrity sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY= dependencies: semver "^5.0.3" -semver-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-1.0.0.tgz#92a4969065f9c70c694753d55248fc68f8f652c9" +semver-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" + integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw== -"semver@2 >=2.2.1 || 3.x || 4 || 5", "semver@2.x || 3.x || 4 || 5", "semver@^2.3.0 || 3.x || 4 || 5", semver@^5.0.1, semver@^5.0.3, semver@^5.1.0: - version "5.5.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" +"semver@2 >=2.2.1 || 3.x || 4 || 5", "semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@5.6.0, "semver@^2.3.0 || 3.x || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5, semver@^5.5.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" + integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== -"semver@2 || 3 || 4 || 5", semver@5.5.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0: +semver@5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - -semver@^5.5: - version "5.6.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" + integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + integrity sha1-myzl094C0XxgEq0yaqa00M9U+U8= set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= set-value@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" + integrity sha1-fbCPnT0i3H945Trzw79GZuzfzPE= dependencies: extend-shallow "^2.0.1" is-extendable "^0.1.1" @@ -6146,6 +6954,7 @@ set-value@^0.4.3: set-value@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274" + integrity sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg== dependencies: extend-shallow "^2.0.1" is-extendable "^0.1.1" @@ -6155,6 +6964,7 @@ set-value@^2.0.0: sha@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/sha/-/sha-2.0.1.tgz#6030822fbd2c9823949f8f72ed6411ee5cf25aae" + integrity sha1-YDCCL70smCOUn49y7WQR7lzyWq4= dependencies: graceful-fs "^4.1.2" readable-stream "^2.0.2" @@ -6162,16 +6972,19 @@ sha@~2.0.1: shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= dependencies: shebang-regex "^1.0.0" shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= shelljs@0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.2.tgz#345b7df7763f4c2340d584abb532c5f752ca9e35" + integrity sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ== dependencies: glob "^7.0.0" interpret "^1.0.0" @@ -6180,14 +6993,17 @@ shelljs@0.8.2: shellwords@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" + integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= signale@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/signale/-/signale-1.3.0.tgz#1b4917c2c7a8691550adca0ad1da750a662b4497" + integrity sha512-TyFhsQ9wZDYDfsPqWMyjCxsDoMwfpsT0130Mce7wDiVCSDdtWSg83dOqoj8aGpGCs3n1YPcam6sT1OFPuGT/OQ== dependencies: chalk "^2.3.2" figures "^2.0.0" @@ -6196,30 +7012,37 @@ signale@^1.2.1: sisteransi@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-0.1.1.tgz#5431447d5f7d1675aac667ccd0b865a4994cb3ce" + integrity sha512-PmGOd02bM9YO5ifxpw36nrNMBTptEtfRl4qUYl9SndkolplkrZZOW7PGHjrZL53QvMVj9nQ+TKqUnRsw4tJa4g== slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" + integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= slice-ansi@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" + integrity sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU= slide@^1.1.3, slide@^1.1.6, slide@~1.1.3, slide@~1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" + integrity sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= smart-buffer@^1.0.13: version "1.1.15" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-1.1.15.tgz#7f114b5b65fab3e2a35aa775bb12f0d1c649bf16" + integrity sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY= smart-buffer@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.1.tgz#07ea1ca8d4db24eb4cac86537d7d18995221ace3" + integrity sha512-RFqinRVJVcCAL9Uh1oVqE6FZkqsyLiVOYEZ20TqIOjuX7iFVJ+zsbs4RIghnw/pTs7mZvt8ZHhvm1ZUrR4fykg== snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" + integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== dependencies: define-property "^1.0.0" isobject "^3.0.0" @@ -6228,12 +7051,14 @@ snapdragon-node@^2.0.1: snapdragon-util@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" + integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== dependencies: kind-of "^3.2.0" snapdragon@^0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" + integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== dependencies: base "^0.11.1" debug "^2.2.0" @@ -6247,6 +7072,7 @@ snapdragon@^0.8.1: socks-proxy-agent@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz#2eae7cf8e2a82d34565761539a7f9718c5617659" + integrity sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA== dependencies: agent-base "^4.1.0" socks "^1.1.10" @@ -6254,6 +7080,7 @@ socks-proxy-agent@^3.0.1: socks-proxy-agent@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz#5936bf8b707a993079c6f37db2091821bffa6473" + integrity sha512-Kezx6/VBguXOsEe5oU3lXYyKMi4+gva72TwJ7pQY5JfqUx2nMk7NXA6z/mpNqIlfQjWYVfeuNvQjexiTaTn6Nw== dependencies: agent-base "~4.2.0" socks "~2.2.0" @@ -6261,13 +7088,15 @@ socks-proxy-agent@^4.0.0: socks@^1.1.10: version "1.1.10" resolved "https://registry.yarnpkg.com/socks/-/socks-1.1.10.tgz#5b8b7fc7c8f341c53ed056e929b7bf4de8ba7b5a" + integrity sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o= dependencies: ip "^1.1.4" smart-buffer "^1.0.13" socks@~2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.2.1.tgz#68ad678b3642fbc5d99c64c165bc561eab0215f9" + version "2.2.2" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.2.2.tgz#f061219fc2d4d332afb4af93e865c84d3fa26e2b" + integrity sha512-g6wjBnnMOZpE0ym6e0uHSddz9p3a+WsBaaYQaBaSCJYvrC4IXykQR9MNGjLQf38e9iIIhp3b1/Zk8YZI3KGJ0Q== dependencies: ip "^1.1.5" smart-buffer "^4.0.1" @@ -6275,10 +7104,12 @@ socks@~2.2.0: sorted-object@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/sorted-object/-/sorted-object-2.0.1.tgz#7d631f4bd3a798a24af1dffcfbfe83337a5df5fc" + integrity sha1-fWMfS9OnmKJK8d/8+/6DM3pd9fw= sorted-union-stream@~2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/sorted-union-stream/-/sorted-union-stream-2.1.3.tgz#c7794c7e077880052ff71a8d4a2dbb4a9a638ac7" + integrity sha1-x3lMfgd4gAUv9xqNSi27Sppjisc= dependencies: from2 "^1.3.0" stream-iterate "^1.1.0" @@ -6286,6 +7117,7 @@ sorted-union-stream@~2.1.3: source-map-resolve@^0.5.0: version "0.5.2" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" + integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== dependencies: atob "^2.1.1" decode-uri-component "^0.2.0" @@ -6296,19 +7128,14 @@ source-map-resolve@^0.5.0: source-map-support@^0.4.15: version "0.4.18" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" + integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== dependencies: source-map "^0.5.6" -source-map-support@^0.5.6: - version "0.5.6" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13" - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-support@^0.5.9: +source-map-support@^0.5.6, source-map-support@^0.5.9: version "0.5.9" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f" + integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" @@ -6316,113 +7143,125 @@ source-map-support@^0.5.9: source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" + integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= -source-map@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" - dependencies: - amdefine ">=0.0.4" - -source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: +source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== spawn-error-forwarder@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/spawn-error-forwarder/-/spawn-error-forwarder-1.0.0.tgz#1afd94738e999b0346d7b9fc373be55e07577029" + integrity sha1-Gv2Uc46ZmwNG17n8NzvlXgdXcCk= spdx-correct@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82" + version "3.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.2.tgz#19bb409e91b47b1ad54159243f7312a858db3c2e" + integrity sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ== dependencies: spdx-expression-parse "^3.0.0" spdx-license-ids "^3.0.0" spdx-exceptions@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz#2c7ae61056c714a5b9b9b2b2af7d311ef5c78fe9" + version "2.2.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" + integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== spdx-expression-parse@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== dependencies: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" + version "3.0.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz#a59efc09784c2a5bada13cfeaf5c75dd214044d2" + integrity sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg== split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" + integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== dependencies: extend-shallow "^3.0.0" split2@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493" + integrity sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw== dependencies: through2 "^2.0.2" split2@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/split2/-/split2-1.0.0.tgz#52e2e221d88c75f9a73f90556e263ff96772b314" + integrity sha1-UuLiIdiMdfmnP5BVbiY/+WdysxQ= dependencies: through2 "~2.0.0" split@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" + integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg== dependencies: through "2" sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= sshpk@^1.7.0: - version "1.14.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98" + version "1.15.2" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.15.2.tgz#c946d6bd9b1a39d0e8635763f5242d6ed6dcb629" + integrity sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA== dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" - dashdash "^1.12.0" - getpass "^0.1.1" - safer-buffer "^2.0.2" - optionalDependencies: bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" ecc-jsbn "~0.1.1" + getpass "^0.1.1" jsbn "~0.1.0" + safer-buffer "^2.0.2" tweetnacl "~0.14.0" ssri@^5.2.4: version "5.3.0" resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.3.0.tgz#ba3872c9c6d33a0704a7d71ff045e5ec48999d06" + integrity sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ== dependencies: safe-buffer "^5.1.1" ssri@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" + integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== dependencies: figgy-pudding "^3.5.1" stack-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620" + version "1.0.2" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" + integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA== staged-git-files@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-1.1.1.tgz#37c2218ef0d6d26178b1310719309a16a59f8f7b" + integrity sha512-H89UNKr1rQJvI1c/PIR3kiAMBV23yvR7LItZiV74HWZwzt7f3YHuujJ9nJZlt58WlFox7XQsOahexwk7nTe69A== static-extend@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" + integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= dependencies: define-property "^0.2.5" object-copy "^0.1.0" @@ -6430,10 +7269,12 @@ static-extend@^0.1.1: stealthy-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" + integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= stream-combiner2@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe" + integrity sha1-+02KFCDqNidk4hrUeAOXvry0HL4= dependencies: duplexer2 "~0.1.0" readable-stream "^2.0.2" @@ -6441,6 +7282,7 @@ stream-combiner2@~1.1.1: stream-each@^1.1.0: version "1.2.3" resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" + integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== dependencies: end-of-stream "^1.1.0" stream-shift "^1.0.0" @@ -6448,6 +7290,7 @@ stream-each@^1.1.0: stream-iterate@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/stream-iterate/-/stream-iterate-1.2.0.tgz#2bd7c77296c1702a46488b8ad41f79865eecd4e1" + integrity sha1-K9fHcpbBcCpGSIuK1B95hl7s1OE= dependencies: readable-stream "^2.1.5" stream-shift "^1.0.0" @@ -6455,18 +7298,22 @@ stream-iterate@^1.1.0: stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= strict-uri-encode@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= string-argv@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.0.2.tgz#dac30408690c21f3c3630a3ff3a05877bdcbd736" + integrity sha1-2sMECGkMIfPDYwo/86BYd73L1zY= string-length@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" + integrity sha1-1A27aGo6zpYMHP/KVivyxF+DY+0= dependencies: astral-regex "^1.0.0" strip-ansi "^4.0.0" @@ -6474,6 +7321,7 @@ string-length@^2.0.0: string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= dependencies: code-point-at "^1.0.0" is-fullwidth-code-point "^1.0.0" @@ -6482,6 +7330,7 @@ string-width@^1.0.1: "string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== dependencies: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" @@ -6489,105 +7338,117 @@ string-width@^1.0.1: string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== dependencies: safe-buffer "~5.1.0" stringify-object@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.2.2.tgz#9853052e5a88fb605a44cd27445aa257ad7ffbcd" + version "3.3.0" + resolved "https://registry.yarnpkg.com/stringify-object/-/stringify-object-3.3.0.tgz#703065aefca19300d3ce88af4f5b3956d7556629" + integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw== dependencies: - get-own-enumerable-property-symbols "^2.0.1" + get-own-enumerable-property-symbols "^3.0.0" is-obj "^1.0.1" is-regexp "^1.0.0" stringify-package@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stringify-package/-/stringify-package-1.0.0.tgz#e02828089333d7d45cd8c287c30aa9a13375081b" + integrity sha512-JIQqiWmLiEozOC0b0BtxZ/AOUtdUZHCBPgqIZ2kSJJqGwgb9neo44XdTHUC4HZSGqi03hOeB7W/E8rAlKnGe9g== strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= dependencies: ansi-regex "^2.0.0" strip-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= dependencies: ansi-regex "^3.0.0" strip-bom@3.0.0, strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= dependencies: is-utf8 "^0.2.0" strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= strip-indent@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= supports-color@^3.1.2: version "3.2.3" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= dependencies: has-flag "^1.0.0" -supports-color@^5.2.0: +supports-color@^5.2.0, supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - dependencies: - has-flag "^3.0.0" - -supports-color@^5.3.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== dependencies: has-flag "^3.0.0" symbol-observable@^1.1.0, symbol-observable@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" + integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== symbol-tree@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" + integrity sha1-rifbOPZgp64uHDt9G8KQgZuFGeY= tar@^2.0.0: version "2.2.1" resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + integrity sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE= dependencies: block-stream "*" fstream "^1.0.2" inherits "2" tar@^4, tar@^4.4.3, tar@^4.4.6: - version "4.4.6" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.6.tgz#63110f09c00b4e60ac8bcfe1bf3c8660235fbc9b" + version "4.4.8" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" + integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== dependencies: - chownr "^1.0.1" + chownr "^1.1.1" fs-minipass "^1.2.5" - minipass "^2.3.3" - minizlib "^1.1.0" + minipass "^2.3.4" + minizlib "^1.1.1" mkdirp "^0.5.0" safe-buffer "^5.1.2" yallist "^3.0.2" @@ -6595,75 +7456,90 @@ tar@^4, tar@^4.4.3, tar@^4.4.6: term-size@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" + integrity sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk= dependencies: execa "^0.7.0" test-exclude@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.1.tgz#dfa222f03480bca69207ca728b37d74b45f724fa" + version "4.2.3" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.3.tgz#a9a5e64474e4398339245a0a769ad7c2f4a97c20" + integrity sha512-SYbXgY64PT+4GAL2ocI3HwPa4Q4TBKm0cwAVeKOt/Aoc0gSpNRjJX8w0pA1LMKZ3LBmd8pYBqApFNQLII9kavA== dependencies: arrify "^1.0.1" - micromatch "^3.1.8" + micromatch "^2.3.11" object-assign "^4.1.0" read-pkg-up "^1.0.1" require-main-filename "^1.0.1" text-extensions@^1.0.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.8.0.tgz#6f343c62268843019b21a616a003557bdb952d2b" + version "1.9.0" + resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" + integrity sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ== text-table@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= throat@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" + integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= through2@^2.0.0, through2@^2.0.2, through2@~2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== dependencies: - readable-stream "^2.1.5" + readable-stream "~2.3.6" xtend "~4.0.1" through@2, "through@>=2.2.7 <3": version "2.3.8" - resolved "http://registry.npmjs.org/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= timed-out@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= tiny-relative-date@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz#fa08aad501ed730f31cc043181d995c39a935e07" + integrity sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A== tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" + integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= to-object-path@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" + integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= dependencies: kind-of "^3.0.2" to-readable-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" + integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== to-regex-range@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" + integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= dependencies: is-number "^3.0.0" repeat-string "^1.6.1" @@ -6671,38 +7547,45 @@ to-regex-range@^2.1.0: to-regex@^3.0.1, to-regex@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" + integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== dependencies: define-property "^2.0.2" extend-shallow "^3.0.2" regex-not "^1.0.2" safe-regex "^1.1.0" -tough-cookie@>=2.3.3, tough-cookie@^2.3.4, tough-cookie@~2.4.3: +tough-cookie@>=2.3.3, tough-cookie@^2.3.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tough-cookie@~2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" + integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== dependencies: psl "^1.1.24" punycode "^1.4.1" -tough-cookie@~2.3.3: - version "2.3.4" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" - dependencies: - punycode "^1.4.1" - tr46@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" + integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= dependencies: punycode "^2.1.0" traverse@~0.6.6: version "0.6.6" resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137" + integrity sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc= travis-deploy-once@^5.0.8: - version "5.0.8" - resolved "https://registry.yarnpkg.com/travis-deploy-once/-/travis-deploy-once-5.0.8.tgz#ba5aee81a20e4c56898f8a3dd9ae07ba8e3bf378" + version "5.0.9" + resolved "https://registry.yarnpkg.com/travis-deploy-once/-/travis-deploy-once-5.0.9.tgz#c5a2f639e17d8fd542f66d25ade126179d5e8acf" + integrity sha512-cyHFErzq0HTEGY29RAq1clqFdt/IkCrlcOmyM1cGoGnEyukrrFi1fpy6JH3Mlf+88XsFwvluqKVWzj2bdz3k8A== dependencies: "@babel/core" "^7.0.0" "@babel/polyfill" "^7.0.0" @@ -6720,18 +7603,22 @@ travis-deploy-once@^5.0.8: trim-newlines@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" + integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= trim-off-newlines@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" + integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= trim-right@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" + integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= ts-jest@^23.10.4: - version "23.10.4" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-23.10.4.tgz#a7a953f55c9165bcaa90ff91014a178e87fe0df8" + version "23.10.5" + resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-23.10.5.tgz#cdb550df4466a30489bf70ba867615799f388dd5" + integrity sha512-MRCs9qnGoyKgFc8adDEntAOP64fWK1vZKnOYU1o2HxaqjdJvGqmkLCPCnVq1/If4zkUmEjKPnCiUisTrlX2p2A== dependencies: bs-logger "0.x" buffer-from "1.x" @@ -6739,72 +7626,71 @@ ts-jest@^23.10.4: json5 "2.x" make-error "1.x" mkdirp "0.x" + resolve "1.x" semver "^5.5" yargs-parser "10.x" tslib@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" + integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= dependencies: safe-buffer "^5.0.1" tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= type-check@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= dependencies: prelude-ls "~1.1.2" typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= typescript@~3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.1.tgz#0b7a04b8cf3868188de914d9568bd030f0c56192" - -uglify-js@^2.6: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" + integrity sha512-jw7P2z/h6aPT4AENXDGjcfHTu5CSqzsbZc6YlUIebTyBAq8XaKp78x7VcSh30xwSCcsu5irZkYZUSFP1MrAMbg== uglify-js@^3.1.4: version "3.4.9" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3" + integrity sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q== dependencies: commander "~2.17.1" source-map "~0.6.1" -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - uid-number@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + integrity sha1-DqEOgDXo61uOREnwbaHHMGY7qoE= umask@^1.1.0, umask@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/umask/-/umask-1.1.0.tgz#f29cebf01df517912bb58ff9c4e50fde8e33320d" + integrity sha1-8pzr8B31F5ErtY/5xOUP3o4zMg0= unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" + integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== unicode-match-property-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" + integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== dependencies: unicode-canonical-property-names-ecmascript "^1.0.4" unicode-property-aliases-ecmascript "^1.0.4" @@ -6812,14 +7698,17 @@ unicode-match-property-ecmascript@^1.0.4: unicode-match-property-value-ecmascript@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.0.2.tgz#9f1dc76926d6ccf452310564fd834ace059663d4" + integrity sha512-Rx7yODZC1L/T8XKo/2kNzVAQaRE88AaMvI1EF/Xnj3GW2wzN6fop9DDWuFAKUVFH7vozkz26DzP0qyWLKLIVPQ== unicode-property-aliases-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.4.tgz#5a533f31b4317ea76f17d807fa0d116546111dd0" + integrity sha512-2WSLa6OdYd2ng8oqiGIWnJqyFArvhn+5vgx5GTxMbUYjCYKUcuKS62YLFF0R/BDGlB1yzXjQOLtPAfHsgirEpg== union-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" + integrity sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ= dependencies: arr-union "^3.1.0" get-value "^2.0.6" @@ -6829,38 +7718,45 @@ union-value@^1.0.0: unique-filename@^1.1.0, unique-filename@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" + integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== dependencies: unique-slug "^2.0.0" unique-slug@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.1.tgz#5e9edc6d1ce8fb264db18a507ef9bd8544451ca6" + integrity sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg== dependencies: imurmurhash "^0.1.4" unique-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" + integrity sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo= dependencies: crypto-random-string "^1.0.0" -universal-user-agent@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-2.0.1.tgz#18e591ca52b1cb804f6b9cbc4c336cf8191f80e1" +universal-user-agent@^2.0.0, universal-user-agent@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-2.0.2.tgz#b0322da546100c658adcf4965110a56ed238aee6" + integrity sha512-nOwvHWLH3dBazyuzbECPA5uVFNd7AlgviXRHgR4yf48QqitIvpdncRrxMbZNMpPPEfgz30I9ubd1XmiJiqsTrg== dependencies: - os-name "^2.0.1" + os-name "^3.0.0" universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= unset-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" + integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= dependencies: has-value "^0.3.1" isobject "^3.0.0" @@ -6868,10 +7764,12 @@ unset-value@^1.0.0: unzip-response@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-2.0.1.tgz#d2f0f737d16b0615e72a6935ed04214572d56f97" + integrity sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c= update-notifier@^2.3.0, update-notifier@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6" + integrity sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw== dependencies: boxen "^1.2.1" chalk "^2.0.1" @@ -6884,56 +7782,74 @@ update-notifier@^2.3.0, update-notifier@^2.5.0: semver-diff "^2.0.0" xdg-basedir "^3.0.0" +uri-js@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" + integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== + dependencies: + punycode "^2.1.0" + urix@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= url-join@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.0.tgz#4d3340e807d3773bda9991f8305acdcc2a665d2a" + integrity sha1-TTNA6AfTdzvamZH4MFrNzCpmXSo= url-parse-lax@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= dependencies: prepend-http "^1.0.1" url-parse-lax@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" + integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= dependencies: prepend-http "^2.0.0" url-template@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" + integrity sha1-/FZaPMy/93MMd19WQflVV5FDnyE= use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" + integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= util-extend@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/util-extend/-/util-extend-1.0.3.tgz#a7c216d267545169637b3b6edc6ca9119e2ff93f" + integrity sha1-p8IW0mdUUWljeztu3GypEZ4v+T8= util.promisify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" + integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== dependencies: define-properties "^1.1.2" object.getownpropertydescriptors "^2.0.3" -uuid@^3.1.0, uuid@^3.3.2: +uuid@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== dependencies: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" @@ -6941,12 +7857,14 @@ validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: validate-npm-package-name@^3.0.0, validate-npm-package-name@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" + integrity sha1-X6kS2B630MdK/BQN5zF/DKffQ34= dependencies: builtins "^1.0.3" verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= dependencies: assert-plus "^1.0.0" core-util-is "1.0.2" @@ -6955,18 +7873,21 @@ verror@1.10.0: w3c-hr-time@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" + integrity sha1-gqwr/2PZUOqeMYmlimViX+3xkEU= dependencies: browser-process-hrtime "^0.1.2" walker@~1.0.5: version "1.0.7" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= dependencies: makeerror "1.0.x" watch@~0.18.0: version "0.18.0" resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" + integrity sha1-KAlUdsbffJDJYxOJkMClQj60uYY= dependencies: exec-sh "^0.2.0" minimist "^1.2.0" @@ -6974,26 +7895,40 @@ watch@~0.18.0: wcwidth@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= dependencies: defaults "^1.0.3" webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" + integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.3.tgz#57c235bc8657e914d24e1a397d3c82daee0a6ba3" + version "1.0.5" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" + integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== dependencies: - iconv-lite "0.4.19" + iconv-lite "0.4.24" -whatwg-mimetype@^2.0.0, whatwg-mimetype@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.1.0.tgz#f0f21d76cbba72362eb609dbed2a30cd17fcc7d4" +whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" + integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== -whatwg-url@^6.4.0, whatwg-url@^6.4.1: +whatwg-url@^6.4.1: version "6.5.0" resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" + integrity sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ== + dependencies: + lodash.sortby "^4.7.0" + tr46 "^1.0.1" + webidl-conversions "^4.0.2" + +whatwg-url@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.0.0.tgz#fde926fa54a599f3adf82dff25a9f7be02dc6edd" + integrity sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ== dependencies: lodash.sortby "^4.7.0" tr46 "^1.0.1" @@ -7002,71 +7937,83 @@ whatwg-url@^6.4.0, whatwg-url@^6.4.1: which-module@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= which@1, which@^1.2.10, which@^1.2.12, which@^1.2.9, which@^1.3.0, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" wide-align@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== dependencies: string-width "^1.0.2 || 2" widest-line@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.0.tgz#0142a4e8a243f8882c0233aa0e0281aa76152273" + version "2.0.1" + resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.1.tgz#7438764730ec7ef4381ce4df82fb98a53142a3fc" + integrity sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA== dependencies: string-width "^2.1.1" -win-release@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/win-release/-/win-release-1.1.1.tgz#5fa55e02be7ca934edfc12665632e849b72e5209" +windows-release@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.1.0.tgz#8d4a7e266cbf5a233f6c717dac19ce00af36e12e" + integrity sha512-hBb7m7acFgQPQc222uEQTmdcGLeBmQLNLFIh0rDk3CwFOBrfjefLzEfEfmpMq8Af/n/GnFf3eYf203FY1PmudA== dependencies: - semver "^5.0.1" - -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + execa "^0.10.0" word-wrap@^1.0.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" + integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" + integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= worker-farm@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.6.0.tgz#aecc405976fab5a95526180846f0dba288f3a4a0" + integrity sha512-6w+3tHbM87WnSWnENBUvA2pxJPLhQUg5LKwUQHq3r+XPhIM+Gh2R5ycbwPCyuGbNg+lPgdcnQUhuC02kJCvffQ== dependencies: errno "~0.1.7" wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" +wrap-ansi@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-3.0.1.tgz#288a04d87eda5c286e060dfe8f135ce8d007f8ba" + integrity sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo= + dependencies: + string-width "^2.1.1" + strip-ansi "^4.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= write-file-atomic@^2.0.0, write-file-atomic@^2.1.0, write-file-atomic@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab" + integrity sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA== dependencies: graceful-fs "^4.1.11" imurmurhash "^0.1.4" @@ -7075,56 +8022,71 @@ write-file-atomic@^2.0.0, write-file-atomic@^2.1.0, write-file-atomic@^2.3.0: ws@^5.2.0: version "5.2.2" resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" + integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== dependencies: async-limiter "~1.0.0" xdg-basedir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4" + integrity sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ= xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" - -xregexp@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.0.0.tgz#e698189de49dd2a18cc5687b05e17c8e43943020" + integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= y18n@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= "y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" + integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= yallist@^3.0.0, yallist@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" + version "3.0.3" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" + integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== -yargs-parser@10.x, yargs-parser@^10.0.0, yargs-parser@^10.1.0: +yargs-parser@10.x, yargs-parser@^10.0.0: version "10.1.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" + integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== dependencies: camelcase "^4.1.0" +yargs-parser@^11.1.1: + version "11.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" + integrity sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-parser@^9.0.2: version "9.0.2" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" + integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc= dependencies: camelcase "^4.1.0" yargs@^11.0.0: version "11.1.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" + integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A== dependencies: cliui "^4.0.0" decamelize "^1.1.1" @@ -7140,11 +8102,12 @@ yargs@^11.0.0: yargs-parser "^9.0.2" yargs@^12.0.0, yargs@^12.0.1: - version "12.0.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.2.tgz#fe58234369392af33ecbef53819171eff0f5aadc" + version "12.0.5" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" + integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== dependencies: cliui "^4.0.0" - decamelize "^2.0.0" + decamelize "^1.2.0" find-up "^3.0.0" get-caller-file "^1.0.1" os-locale "^3.0.0" @@ -7154,13 +8117,4 @@ yargs@^12.0.0, yargs@^12.0.1: string-width "^2.0.0" which-module "^2.0.0" y18n "^3.2.1 || ^4.0.0" - yargs-parser "^10.1.0" - -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" + yargs-parser "^11.1.1" From f5dcd5d6e1c6034b423a39775aeb92323f3ba4c1 Mon Sep 17 00:00:00 2001 From: Armano Date: Thu, 13 Dec 2018 23:22:47 +0100 Subject: [PATCH 04/30] refactor: improve type checking in parser (#43) --- src/convert.ts | 721 ++++++++++++++++++++++------------------------ src/node-utils.ts | 7 +- src/ts-nodes.ts | 178 ++++++++++++ 3 files changed, 532 insertions(+), 374 deletions(-) create mode 100644 src/ts-nodes.ts diff --git a/src/convert.ts b/src/convert.ts index efa2ab7..c405886 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -9,6 +9,7 @@ import ts from 'typescript'; import nodeUtils from './node-utils'; import { AST_NODE_TYPES } from './ast-node-types'; import { ESTreeNode } from './temp-types-based-on-js-source'; +import { TSNode } from './ts-nodes'; const SyntaxKind = ts.SyntaxKind; @@ -40,14 +41,14 @@ interface ConvertConfig { /** * Converts a TypeScript node into an ESTree node * @param {Object} config configuration options for the conversion - * @param {ts.Node} config.node the ts.Node + * @param {TSNode} config.node the ts.Node * @param {ts.Node} config.parent the parent ts.Node * @param {ts.SourceFile} config.ast the full TypeScript AST * @param {Object} config.additionalOptions additional options for the conversion * @returns {ESTreeNode|null} the converted ESTreeNode */ export default function convert(config: ConvertConfig): ESTreeNode | null { - const node = config.node as ts.Node; + const node: TSNode = config.node as TSNode; const parent = config.parent; const ast = config.ast; const additionalOptions = config.additionalOptions || {}; @@ -62,7 +63,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { /** * Create a new ESTree node */ - let result: Partial = { + let result: ESTreeNode = { type: '', range: [node.getStart(ast), node.end], loc: nodeUtils.getLoc(node, ast) @@ -84,7 +85,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { * @param {ts.Node} child the child ts.Node * @returns {ESTreeNode|null} the converted ESTree node */ - function convertChild(child: ts.Node): ESTreeNode | null { + function convertChild(child?: ts.Node): ESTreeNode | null { + if (!child) { + return null; + } return convert({ node: child, parent: node, ast, additionalOptions }); } @@ -108,7 +112,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { /** * Converts a ts.Node's typeArguments ts.NodeArray to a flow-like typeParameters node - * @param {ts.NodeArray} typeArguments ts.Node typeArguments + * @param {ts.NodeArray} typeArguments ts.Node typeArguments * @returns {ESTreeNode} TypeParameterInstantiation node */ function convertTypeArgumentsToTypeParameters( @@ -235,10 +239,12 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { /** * Converts a child into a class implements node. This creates an intermediary * ClassImplements node to match what Flow does. - * @param {ts.Node} child The TypeScript AST node to convert. + * @param {ts.ExpressionWithTypeArguments} child The TypeScript AST node to convert. * @returns {ESTreeNode} The type annotation node. */ - function convertClassImplements(child: any): ESTreeNode { + function convertClassImplements( + child: ts.ExpressionWithTypeArguments + ): ESTreeNode { const id = convertChild(child.expression) as ESTreeNode; const classImplementsNode: ESTreeNode = { type: AST_NODE_TYPES.ClassImplements, @@ -256,10 +262,12 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { /** * Converts a child into a interface heritage node. - * @param {ts.Node} child The TypeScript AST node to convert. + * @param {ts.ExpressionWithTypeArguments} child The TypeScript AST node to convert. * @returns {ESTreeNode} The type annotation node. */ - function convertInterfaceHeritageClause(child: any): ESTreeNode { + function convertInterfaceHeritageClause( + child: ts.ExpressionWithTypeArguments + ): ESTreeNode { const id = convertChild(child.expression) as ESTreeNode; const classImplementsNode: ESTreeNode = { type: AST_NODE_TYPES.TSInterfaceHeritage, @@ -303,7 +311,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { * @param {ts.Node[]} parameters An array of ts.Node params to be converted * @returns {ESTreeNode[]} an array of converted ESTreeNode params */ - function convertParameters(parameters: ts.Node[]): ESTreeNode[] { + function convertParameters(parameters: ts.NodeArray): ESTreeNode[] { if (!parameters || !parameters.length) { return []; } @@ -328,7 +336,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { const customType = `TS${SyntaxKind[node.kind]}`; /** * If the "errorOnUnknownASTType" option is set to true, throw an error, - * otherwise fallback to just inlcuding the unknown type as-is. + * otherwise fallback to just including the unknown type as-is. */ if ( additionalOptions.errorOnUnknownASTType && @@ -383,10 +391,12 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { /** * Converts a TypeScript JSX node.tagName into an ESTree node.name - * @param {Object} tagName the tagName object from a JSX ts.Node + * @param {ts.JsxTagNameExpression} tagName the tagName object from a JSX ts.Node * @returns {Object} the converted ESTree name object */ - function convertTypeScriptJSXTagNameToESTreeName(tagName: any): any { + function convertTypeScriptJSXTagNameToESTreeName( + tagName: ts.JsxTagNameExpression + ): ESTreeNode { const tagNameToken = nodeUtils.convertToken(tagName, ast); if (tagNameToken.type === AST_NODE_TYPES.JSXMemberExpression) { @@ -419,10 +429,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { /** * Applies the given TS modifiers to the given result object. - * @param {ts.Node[]} modifiers original ts.Nodes from the node.modifiers array + * @param {ts.ModifiersArray} modifiers original ts.Nodes from the node.modifiers array * @returns {void} (the current result object will be mutated) */ - function applyModifiersToResult(modifiers: ts.Node[]): void { + function applyModifiersToResult(modifiers?: ts.ModifiersArray): void { if (!modifiers || !modifiers.length) { return; } @@ -497,18 +507,19 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { Object.assign(result, { type: AST_NODE_TYPES.Program, body: [], + // externalModuleIndicator is internal field in TSC sourceType: (node as any).externalModuleIndicator ? 'module' : 'script' }); // filter out unknown nodes for now - (node as any).statements.forEach((statement: any) => { + node.statements.forEach((statement: any) => { const convertedStatement = convertChild(statement); if (convertedStatement) { result.body.push(convertedStatement); } }); - (result as any).range[1] = (node as any).endOfFileToken.end; + (result as any).range[1] = node.endOfFileToken.end; result.loc = nodeUtils.getLocFor( node.getStart(ast), (result as any).range[1], @@ -519,22 +530,22 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.Block: Object.assign(result, { type: AST_NODE_TYPES.BlockStatement, - body: (node as any).statements.map(convertChild) + body: node.statements.map(convertChild) }); break; case SyntaxKind.Identifier: Object.assign(result, { type: AST_NODE_TYPES.Identifier, - name: (node as any).text + name: node.text }); break; case SyntaxKind.WithStatement: Object.assign(result, { type: AST_NODE_TYPES.WithStatement, - object: convertChild((node as any).expression), - body: convertChild((node as any).statement) + object: convertChild(node.expression), + body: convertChild(node.statement) }); break; @@ -543,15 +554,15 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.ReturnStatement: Object.assign(result, { type: AST_NODE_TYPES.ReturnStatement, - argument: convertChild((node as any).expression) + argument: convertChild(node.expression) }); break; case SyntaxKind.LabeledStatement: Object.assign(result, { type: AST_NODE_TYPES.LabeledStatement, - label: convertChild((node as any).label), - body: convertChild((node as any).statement) + label: convertChild(node.label), + body: convertChild(node.statement) }); break; @@ -559,7 +570,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.ContinueStatement: Object.assign(result, { type: SyntaxKind[node.kind], - label: convertChild((node as any).label) + label: convertChild(node.label) }); break; @@ -568,17 +579,17 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.IfStatement: Object.assign(result, { type: AST_NODE_TYPES.IfStatement, - test: convertChild((node as any).expression), - consequent: convertChild((node as any).thenStatement), - alternate: convertChild((node as any).elseStatement) + test: convertChild(node.expression), + consequent: convertChild(node.thenStatement), + alternate: convertChild(node.elseStatement) }); break; case SyntaxKind.SwitchStatement: Object.assign(result, { type: AST_NODE_TYPES.SwitchStatement, - discriminant: convertChild((node as any).expression), - cases: (node as any).caseBlock.clauses.map(convertChild) + discriminant: convertChild(node.expression), + cases: node.caseBlock.clauses.map(convertChild) }); break; @@ -586,8 +597,12 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.DefaultClause: Object.assign(result, { type: AST_NODE_TYPES.SwitchCase, - test: convertChild((node as any).expression), - consequent: (node as any).statements.map(convertChild) + // expression is present in case only + test: + node.kind === SyntaxKind.CaseClause + ? convertChild(node.expression) + : null, + consequent: node.statements.map(convertChild) }); break; @@ -596,7 +611,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.ThrowStatement: Object.assign(result, { type: AST_NODE_TYPES.ThrowStatement, - argument: convertChild((node as any).expression) + argument: convertChild(node.expression) }); break; @@ -604,23 +619,23 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { Object.assign(result, { type: AST_NODE_TYPES.TryStatement, block: convert({ - node: (node as any).tryBlock, + node: node.tryBlock, parent: null, ast, additionalOptions }), - handler: convertChild((node as any).catchClause), - finalizer: convertChild((node as any).finallyBlock) + handler: convertChild(node.catchClause), + finalizer: convertChild(node.finallyBlock) }); break; case SyntaxKind.CatchClause: Object.assign(result, { type: AST_NODE_TYPES.CatchClause, - param: (node as any).variableDeclaration - ? convertChild((node as any).variableDeclaration.name) + param: node.variableDeclaration + ? convertChild(node.variableDeclaration.name) : null, - body: convertChild((node as any).block) + body: convertChild(node.block) }); break; @@ -629,8 +644,8 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.WhileStatement: Object.assign(result, { type: AST_NODE_TYPES.WhileStatement, - test: convertChild((node as any).expression), - body: convertChild((node as any).statement) + test: convertChild(node.expression), + body: convertChild(node.statement) }); break; @@ -641,34 +656,37 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.DoStatement: Object.assign(result, { type: AST_NODE_TYPES.DoWhileStatement, - test: convertChild((node as any).expression), - body: convertChild((node as any).statement) + test: convertChild(node.expression), + body: convertChild(node.statement) }); break; case SyntaxKind.ForStatement: Object.assign(result, { type: AST_NODE_TYPES.ForStatement, - init: convertChild((node as any).initializer), - test: convertChild((node as any).condition), - update: convertChild((node as any).incrementor), - body: convertChild((node as any).statement) + init: convertChild(node.initializer), + test: convertChild(node.condition), + update: convertChild(node.incrementor), + body: convertChild(node.statement) }); break; case SyntaxKind.ForInStatement: case SyntaxKind.ForOfStatement: { - const isAwait = !!( - (node as any).awaitModifier && - (node as any).awaitModifier.kind === SyntaxKind.AwaitKeyword - ); Object.assign(result, { type: SyntaxKind[node.kind], - left: convertChild((node as any).initializer), - right: convertChild((node as any).expression), - body: convertChild((node as any).statement), - await: isAwait + left: convertChild(node.initializer), + right: convertChild(node.expression), + body: convertChild(node.statement) }); + + // await is only available in for of statement + if (node.kind === SyntaxKind.ForOfStatement) { + (result as any).await = Boolean( + node.awaitModifier && + node.awaitModifier.kind === SyntaxKind.AwaitKeyword + ); + } break; } @@ -689,23 +707,23 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { Object.assign(result, { type: functionDeclarationType, - id: convertChild((node as any).name), - generator: !!(node as any).asteriskToken, + id: convertChild(node.name), + generator: !!node.asteriskToken, expression: false, async: nodeUtils.hasModifier(SyntaxKind.AsyncKeyword, node), - params: convertParameters((node as any).parameters), - body: convertChild((node as any).body) + params: convertParameters(node.parameters), + body: convertChild(node.body) }); // Process returnType - if ((node as any).type) { - (result as any).returnType = convertTypeAnnotation((node as any).type); + if (node.type) { + (result as any).returnType = convertTypeAnnotation(node.type); } // Process typeParameters - if ((node as any).typeParameters && (node as any).typeParameters.length) { + if (node.typeParameters && node.typeParameters.length) { result.typeParameters = convertTSTypeParametersToTypeParametersDeclaration( - (node as any).typeParameters + node.typeParameters ); } @@ -718,18 +736,16 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.VariableDeclaration: { Object.assign(result, { type: AST_NODE_TYPES.VariableDeclarator, - id: convertChild((node as any).name), - init: convertChild((node as any).initializer) + id: convertChild(node.name), + init: convertChild(node.initializer) }); - if ((node as any).exclamationToken) { + if (node.exclamationToken) { (result as any).definite = true; } - if ((node as any).type) { - (result as any).id.typeAnnotation = convertTypeAnnotation( - (node as any).type - ); + if (node.type) { + (result as any).id.typeAnnotation = convertTypeAnnotation(node.type); fixTypeAnnotationParentLocation((result as any).id); } break; @@ -738,10 +754,8 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.VariableStatement: Object.assign(result, { type: AST_NODE_TYPES.VariableDeclaration, - declarations: (node as any).declarationList.declarations.map( - convertChild - ), - kind: nodeUtils.getDeclarationKind((node as any).declarationList) + declarations: node.declarationList.declarations.map(convertChild), + kind: nodeUtils.getDeclarationKind(node.declarationList) }); // check for exports @@ -752,7 +766,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.VariableDeclarationList: Object.assign(result, { type: AST_NODE_TYPES.VariableDeclaration, - declarations: (node as any).declarations.map(convertChild), + declarations: node.declarations.map(convertChild), kind: nodeUtils.getDeclarationKind(node) }); break; @@ -762,7 +776,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.ExpressionStatement: Object.assign(result, { type: AST_NODE_TYPES.ExpressionStatement, - expression: convertChild((node as any).expression) + expression: convertChild(node.expression) }); break; @@ -806,12 +820,12 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { if (arrayIsInAssignment || arrayIsInForOf || arrayIsInForIn) { Object.assign(result, { type: AST_NODE_TYPES.ArrayPattern, - elements: (node as any).elements.map(convertChild) + elements: node.elements.map(convertChild) }); } else { Object.assign(result, { type: AST_NODE_TYPES.ArrayExpression, - elements: (node as any).elements.map(convertChild) + elements: node.elements.map(convertChild) }); } break; @@ -852,12 +866,12 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { if (objectIsInAssignment) { Object.assign(result, { type: AST_NODE_TYPES.ObjectPattern, - properties: (node as any).properties.map(convertChild) + properties: node.properties.map(convertChild) }); } else { Object.assign(result, { type: AST_NODE_TYPES.ObjectExpression, - properties: (node as any).properties.map(convertChild) + properties: node.properties.map(convertChild) }); } @@ -867,9 +881,9 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.PropertyAssignment: Object.assign(result, { type: AST_NODE_TYPES.Property, - key: convertChild((node as any).name), - value: convertChild((node as any).initializer), - computed: nodeUtils.isComputedProperty((node as any).name), + key: convertChild(node.name), + value: convertChild(node.initializer), + computed: nodeUtils.isComputedProperty(node.name), method: false, shorthand: false, kind: 'init' @@ -877,14 +891,14 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { break; case SyntaxKind.ShorthandPropertyAssignment: { - if ((node as any).objectAssignmentInitializer) { + if (node.objectAssignmentInitializer) { Object.assign(result, { type: AST_NODE_TYPES.Property, - key: convertChild((node as any).name), + key: convertChild(node.name), value: { type: AST_NODE_TYPES.AssignmentPattern, - left: convertChild((node as any).name), - right: convertChild((node as any).objectAssignmentInitializer), + left: convertChild(node.name), + right: convertChild(node.objectAssignmentInitializer), loc: result.loc, range: result.range }, @@ -894,10 +908,11 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { kind: 'init' }); } else { + // TODO: this node has no initializer field Object.assign(result, { type: AST_NODE_TYPES.Property, - key: convertChild((node as any).name), - value: convertChild((node as any).initializer || (node as any).name), + key: convertChild(node.name), + value: convertChild((node as any).initializer || node.name), computed: false, method: false, shorthand: true, @@ -909,6 +924,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.ComputedPropertyName: if (parent!.kind === SyntaxKind.ObjectLiteralExpression) { + // TODO: ComputedPropertyName has no name field Object.assign(result, { type: AST_NODE_TYPES.Property, key: convertChild((node as any).name), @@ -919,7 +935,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { kind: 'init' }); } else { - return convertChild((node as any).expression); + return convertChild(node.expression); } break; @@ -932,16 +948,16 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { type: isAbstract ? AST_NODE_TYPES.TSAbstractClassProperty : AST_NODE_TYPES.ClassProperty, - key: convertChild((node as any).name), - value: convertChild((node as any).initializer), - computed: nodeUtils.isComputedProperty((node as any).name), + key: convertChild(node.name), + value: convertChild(node.initializer), + computed: nodeUtils.isComputedProperty(node.name), static: nodeUtils.hasStaticModifierFlag(node), readonly: nodeUtils.hasModifier(SyntaxKind.ReadonlyKeyword, node) || undefined }); - if ((node as any).type) { - result.typeAnnotation = convertTypeAnnotation((node as any).type); + if (node.type) { + result.typeAnnotation = convertTypeAnnotation(node.type); } if (node.decorators) { @@ -953,20 +969,17 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { (result as any).accessibility = accessibility; } - if ( - (node as any).name.kind === SyntaxKind.Identifier && - (node as any).questionToken - ) { + if (node.name.kind === SyntaxKind.Identifier && node.questionToken) { (result as any).optional = true; } - if ((node as any).exclamationToken) { + if (node.exclamationToken) { (result as any).definite = true; } if ( (result as any).key.type === AST_NODE_TYPES.Literal && - (node as any).questionToken + node.questionToken ) { (result as any).optional = true; } @@ -977,7 +990,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.SetAccessor: case SyntaxKind.MethodDeclaration: { const openingParen = nodeUtils.findFirstMatchingToken( - (node as any).name, + node.name, ast, (token: any) => { if (!token || !token.kind) { @@ -995,11 +1008,11 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { method = { type: AST_NODE_TYPES.FunctionExpression, id: null, - generator: !!(node as any).asteriskToken, + generator: !!node.asteriskToken, expression: false, async: nodeUtils.hasModifier(SyntaxKind.AsyncKeyword, node), - body: convertChild((node as any).body), - range: [(node as any).parameters.pos - 1, (result as any).range[1]], + body: convertChild(node.body), + range: [node.parameters.pos - 1, (result as any).range[1]], loc: { start: { line: methodLoc.line + 1, @@ -1009,18 +1022,18 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { } }; - if ((node as any).type) { - (method as any).returnType = convertTypeAnnotation((node as any).type); + if (node.type) { + (method as any).returnType = convertTypeAnnotation(node.type); } if (parent!.kind === SyntaxKind.ObjectLiteralExpression) { - (method as any).params = (node as any).parameters.map(convertChild); + (method as any).params = node.parameters.map(convertChild); Object.assign(result, { type: AST_NODE_TYPES.Property, - key: convertChild((node as any).name), + key: convertChild(node.name), value: method, - computed: nodeUtils.isComputedProperty((node as any).name), + computed: nodeUtils.isComputedProperty(node.name), method: nodeIsMethod, shorthand: false, kind: 'init' @@ -1031,7 +1044,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { /** * Unlike in object literal methods, class method params can have decorators */ - (method as any).params = convertParameters((node as any).parameters); + (method as any).params = convertParameters(node.parameters); /** * TypeScript class methods can be defined as "abstract" @@ -1045,9 +1058,9 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { Object.assign(result, { type: methodDefinitionType, - key: convertChild((node as any).name), + key: convertChild(node.name), value: method, - computed: nodeUtils.isComputedProperty((node as any).name), + computed: nodeUtils.isComputedProperty(node.name), static: nodeUtils.hasStaticModifierFlag(node), kind: 'method' }); @@ -1064,7 +1077,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { if ( (result as any).key.type === AST_NODE_TYPES.Identifier && - (node as any).questionToken + node.questionToken ) { (result as any).key.optional = true; } @@ -1075,16 +1088,16 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { (result as any).kind = 'set'; } else if ( !(result as any).static && - (node as any).name.kind === SyntaxKind.StringLiteral && - (node as any).name.text === 'constructor' + node.name.kind === SyntaxKind.StringLiteral && + node.name.text === 'constructor' ) { (result as any).kind = 'constructor'; } // Process typeParameters - if ((node as any).typeParameters && (node as any).typeParameters.length) { + if (node.typeParameters && node.typeParameters.length) { (method as any).typeParameters = convertTSTypeParametersToTypeParametersDeclaration( - (node as any).typeParameters + node.typeParameters ); } @@ -1099,20 +1112,20 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { node ), firstConstructorToken = constructorIsStatic - ? nodeUtils.findNextToken((node as any).getFirstToken(), ast, ast) + ? nodeUtils.findNextToken(node.getFirstToken()!, ast, ast) : node.getFirstToken(), constructorLoc = ast.getLineAndCharacterOfPosition( - (node as any).parameters.pos - 1 + node.parameters.pos - 1 ), constructor = { type: AST_NODE_TYPES.FunctionExpression, id: null, - params: convertParameters((node as any).parameters), + params: convertParameters(node.parameters), generator: false, expression: false, async: false, - body: convertChild((node as any).body), - range: [(node as any).parameters.pos - 1, (result as any).range[1]], + body: convertChild(node.body), + range: [node.parameters.pos - 1, (result as any).range[1]], loc: { start: { line: constructorLoc.line + 1, @@ -1129,8 +1142,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { (firstConstructorToken as any).getEnd(ast) ), constructorIsComputed = - !!(node as any).name && - nodeUtils.isComputedProperty((node as any).name); + !!node.name && nodeUtils.isComputedProperty(node.name); let constructorKey; @@ -1138,7 +1150,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { constructorKey = { type: AST_NODE_TYPES.Literal, value: 'constructor', - raw: (node as any).name.getText(), + raw: node.name!.getText(), range: [ (firstConstructorToken as any).getStart(ast), (firstConstructorToken as any).end @@ -1200,23 +1212,23 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.FunctionExpression: Object.assign(result, { type: AST_NODE_TYPES.FunctionExpression, - id: convertChild((node as any).name), - generator: !!(node as any).asteriskToken, - params: convertParameters((node as any).parameters), - body: convertChild((node as any).body), + id: convertChild(node.name), + generator: !!node.asteriskToken, + params: convertParameters(node.parameters), + body: convertChild(node.body), async: nodeUtils.hasModifier(SyntaxKind.AsyncKeyword, node), expression: false }); // Process returnType - if ((node as any).type) { - (result as any).returnType = convertTypeAnnotation((node as any).type); + if (node.type) { + (result as any).returnType = convertTypeAnnotation(node.type); } // Process typeParameters - if ((node as any).typeParameters && (node as any).typeParameters.length) { + if (node.typeParameters && node.typeParameters.length) { result.typeParameters = convertTSTypeParametersToTypeParametersDeclaration( - (node as any).typeParameters + node.typeParameters ); } break; @@ -1230,7 +1242,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.ArrayBindingPattern: Object.assign(result, { type: AST_NODE_TYPES.ArrayPattern, - elements: (node as any).elements.map(convertChild) + elements: node.elements.map(convertChild) }); break; @@ -1241,26 +1253,26 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.ObjectBindingPattern: Object.assign(result, { type: AST_NODE_TYPES.ObjectPattern, - properties: (node as any).elements.map(convertChild) + properties: node.elements.map(convertChild) }); break; case SyntaxKind.BindingElement: if (parent!.kind === SyntaxKind.ArrayBindingPattern) { const arrayItem = convert({ - node: (node as any).name, + node: node.name, parent, ast, additionalOptions }); - if ((node as any).initializer) { + if (node.initializer) { Object.assign(result, { type: AST_NODE_TYPES.AssignmentPattern, left: arrayItem, - right: convertChild((node as any).initializer) + right: convertChild(node.initializer) }); - } else if ((node as any).dotDotDotToken) { + } else if (node.dotDotDotToken) { Object.assign(result, { type: AST_NODE_TYPES.RestElement, argument: arrayItem @@ -1269,41 +1281,35 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { return arrayItem; } } else if (parent!.kind === SyntaxKind.ObjectBindingPattern) { - if ((node as any).dotDotDotToken) { + if (node.dotDotDotToken) { Object.assign(result, { type: AST_NODE_TYPES.RestElement, - argument: convertChild( - (node as any).propertyName || (node as any).name - ) + argument: convertChild(node.propertyName || node.name) }); } else { Object.assign(result, { type: AST_NODE_TYPES.Property, - key: convertChild((node as any).propertyName || (node as any).name), - value: convertChild((node as any).name), + key: convertChild(node.propertyName || node.name), + value: convertChild(node.name), computed: Boolean( - (node as any).propertyName && - (node as any).propertyName.kind === - SyntaxKind.ComputedPropertyName + node.propertyName && + node.propertyName.kind === SyntaxKind.ComputedPropertyName ), method: false, - shorthand: !(node as any).propertyName, + shorthand: !node.propertyName, kind: 'init' }); } - if ((node as any).initializer) { + if (node.initializer) { (result as any).value = { type: AST_NODE_TYPES.AssignmentPattern, - left: convertChild((node as any).name), - right: convertChild((node as any).initializer), - range: [ - (node as any).name.getStart(ast), - (node as any).initializer.end - ], + left: convertChild(node.name), + right: convertChild(node.initializer), + range: [node.name.getStart(ast), node.initializer.end], loc: nodeUtils.getLocFor( - (node as any).name.getStart(ast), - (node as any).initializer.end, + node.name.getStart(ast), + node.initializer.end, ast ) }; @@ -1316,21 +1322,21 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { type: AST_NODE_TYPES.ArrowFunctionExpression, generator: false, id: null, - params: convertParameters((node as any).parameters), - body: convertChild((node as any).body), + params: convertParameters(node.parameters), + body: convertChild(node.body), async: nodeUtils.hasModifier(SyntaxKind.AsyncKeyword, node), - expression: (node as any).body.kind !== SyntaxKind.Block + expression: node.body.kind !== SyntaxKind.Block }); // Process returnType - if ((node as any).type) { - (result as any).returnType = convertTypeAnnotation((node as any).type); + if (node.type) { + (result as any).returnType = convertTypeAnnotation(node.type); } // Process typeParameters - if ((node as any).typeParameters && (node as any).typeParameters.length) { + if (node.typeParameters && node.typeParameters.length) { result.typeParameters = convertTSTypeParametersToTypeParametersDeclaration( - (node as any).typeParameters + node.typeParameters ); } break; @@ -1338,15 +1344,15 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.YieldExpression: Object.assign(result, { type: AST_NODE_TYPES.YieldExpression, - delegate: !!(node as any).asteriskToken, - argument: convertChild((node as any).expression) + delegate: !!node.asteriskToken, + argument: convertChild(node.expression) }); break; case SyntaxKind.AwaitExpression: Object.assign(result, { type: AST_NODE_TYPES.AwaitExpression, - argument: convertChild((node as any).expression) + argument: convertChild(node.expression) }); break; @@ -1360,7 +1366,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { type: AST_NODE_TYPES.TemplateElement, value: { raw: ast.text.slice(node.getStart(ast) + 1, node.end - 1), - cooked: (node as any).text + cooked: node.text }, tail: true, range: result.range, @@ -1374,11 +1380,11 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.TemplateExpression: Object.assign(result, { type: AST_NODE_TYPES.TemplateLiteral, - quasis: [convertChild((node as any).head)], + quasis: [convertChild(node.head)], expressions: [] }); - (node as any).templateSpans.forEach((templateSpan: any) => { + node.templateSpans.forEach((templateSpan: any) => { (result as any).expressions.push(convertChild(templateSpan.expression)); (result as any).quasis.push(convertChild(templateSpan.literal)); }); @@ -1387,11 +1393,11 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.TaggedTemplateExpression: Object.assign(result, { type: AST_NODE_TYPES.TaggedTemplateExpression, - typeParameters: (node as any).typeArguments - ? convertTypeArgumentsToTypeParameters((node as any).typeArguments) + typeParameters: node.typeArguments + ? convertTypeArgumentsToTypeParameters(node.typeArguments) : undefined, - tag: convertChild((node as any).tag), - quasi: convertChild((node as any).template) + tag: convertChild(node.tag), + quasi: convertChild(node.template) }); break; @@ -1406,7 +1412,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { node.getStart(ast) + 1, node.end - (tail ? 1 : 2) ), - cooked: (node as any).text + cooked: node.text }, tail }); @@ -1423,16 +1429,18 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { node.parent.parent && node.parent.parent.kind === SyntaxKind.BinaryExpression ) { - if ((node as any).parent.parent.left === node.parent) { + if ((node.parent.parent as ts.BinaryExpression).left === node.parent) { type = AST_NODE_TYPES.RestElement; - } else if ((node as any).parent.parent.right === node.parent) { + } else if ( + (node.parent.parent as ts.BinaryExpression).right === node.parent + ) { type = AST_NODE_TYPES.SpreadElement; } } Object.assign(result, { type, - argument: convertChild((node as any).expression) + argument: convertChild(node.expression) }); break; } @@ -1444,16 +1452,18 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { node.parent.parent && node.parent.parent.kind === SyntaxKind.BinaryExpression ) { - if ((node as any).parent.parent.right === node.parent) { + if ((node.parent.parent as ts.BinaryExpression).right === node.parent) { type = AST_NODE_TYPES.SpreadElement; - } else if ((node as any).parent.parent.left === node.parent) { + } else if ( + (node.parent.parent as ts.BinaryExpression).left === node.parent + ) { type = AST_NODE_TYPES.RestElement; } } Object.assign(result, { type, - argument: convertChild((node as any).expression) + argument: convertChild(node.expression) }); break; } @@ -1461,22 +1471,22 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.Parameter: { let parameter; - if ((node as any).dotDotDotToken) { - parameter = convertChild((node as any).name); + if (node.dotDotDotToken) { + parameter = convertChild(node.name); Object.assign(result, { type: AST_NODE_TYPES.RestElement, argument: parameter }); - } else if ((node as any).initializer) { - parameter = convertChild((node as any).name); + } else if (node.initializer) { + parameter = convertChild(node.name); Object.assign(result, { type: AST_NODE_TYPES.AssignmentPattern, left: parameter, - right: convertChild((node as any).initializer) + right: convertChild(node.initializer) }); } else { parameter = convert({ - node: (node as any).name, + node: node.name, parent, ast, additionalOptions @@ -1484,14 +1494,12 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { (result as any) = parameter; } - if ((node as any).type) { - (parameter as any).typeAnnotation = convertTypeAnnotation( - (node as any).type - ); + if (node.type) { + (parameter as any).typeAnnotation = convertTypeAnnotation(node.type); fixTypeAnnotationParentLocation(parameter as any); } - if ((node as any).questionToken) { + if (node.questionToken) { (parameter as any).optional = true; } @@ -1519,23 +1527,22 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.ClassDeclaration: case SyntaxKind.ClassExpression: { - const heritageClauses = (node as any).heritageClauses || []; + const heritageClauses = node.heritageClauses || []; let classNodeType = SyntaxKind[node.kind]; - let lastClassToken = heritageClauses.length + let lastClassToken: any = heritageClauses.length ? heritageClauses[heritageClauses.length - 1] - : (node as any).name; + : node.name; - if ((node as any).typeParameters && (node as any).typeParameters.length) { - const lastTypeParameter = (node as any).typeParameters[ - (node as any).typeParameters.length - 1 - ]; + if (node.typeParameters && node.typeParameters.length) { + const lastTypeParameter = + node.typeParameters[node.typeParameters.length - 1]; if (!lastClassToken || lastTypeParameter.pos > lastClassToken.pos) { lastClassToken = nodeUtils.findNextToken(lastTypeParameter, ast, ast); } result.typeParameters = convertTSTypeParametersToTypeParametersDeclaration( - (node as any).typeParameters + node.typeParameters ); } @@ -1553,7 +1560,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { * We need check for modifiers, and use the last one, as there * could be multiple before the open brace */ - const lastModifier = node.modifiers[node.modifiers.length - 1]; + const lastModifier = node.modifiers![node.modifiers!.length - 1]; if (!lastClassToken || lastModifier.pos > lastClassToken.pos) { lastClassToken = nodeUtils.findNextToken(lastModifier, ast, ast); @@ -1590,7 +1597,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { Object.assign(result, { type: classNodeType, - id: convertChild((node as any).name), + id: convertChild(node.name), body: { type: AST_NODE_TYPES.ClassBody, body: [], @@ -1615,7 +1622,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { result.decorators = convertDecorators(node.decorators); } - const filteredMembers = (node as any).members.filter( + const filteredMembers = node.members.filter( nodeUtils.isESTreeClassMember ); @@ -1633,37 +1640,32 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.ModuleBlock: Object.assign(result, { type: AST_NODE_TYPES.TSModuleBlock, - body: (node as any).statements.map(convertChild) + body: node.statements.map(convertChild) }); break; case SyntaxKind.ImportDeclaration: Object.assign(result, { type: AST_NODE_TYPES.ImportDeclaration, - source: convertChild((node as any).moduleSpecifier), + source: convertChild(node.moduleSpecifier), specifiers: [] }); - if ((node as any).importClause) { - if ((node as any).importClause.name) { - (result as any).specifiers.push( - convertChild((node as any).importClause) - ); + if (node.importClause) { + if (node.importClause.name) { + (result as any).specifiers.push(convertChild(node.importClause)); } - if ((node as any).importClause.namedBindings) { + if (node.importClause.namedBindings) { if ( - (node as any).importClause.namedBindings.kind === - SyntaxKind.NamespaceImport + node.importClause.namedBindings.kind === SyntaxKind.NamespaceImport ) { (result as any).specifiers.push( - convertChild((node as any).importClause.namedBindings) + convertChild(node.importClause.namedBindings) ); } else { result.specifiers = (result as any).specifiers.concat( - (node as any).importClause.namedBindings.elements.map( - convertChild - ) + node.importClause.namedBindings.elements.map(convertChild) ); } } @@ -1674,26 +1676,26 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.NamespaceImport: Object.assign(result, { type: AST_NODE_TYPES.ImportNamespaceSpecifier, - local: convertChild((node as any).name) + local: convertChild(node.name) }); break; case SyntaxKind.ImportSpecifier: Object.assign(result, { type: AST_NODE_TYPES.ImportSpecifier, - local: convertChild((node as any).name), - imported: convertChild((node as any).propertyName || (node as any).name) + local: convertChild(node.name), + imported: convertChild(node.propertyName || node.name) }); break; case SyntaxKind.ImportClause: Object.assign(result, { type: AST_NODE_TYPES.ImportDefaultSpecifier, - local: convertChild((node as any).name) + local: convertChild(node.name) }); // have to adjust location information due to tree differences - (result as any).range[1] = (node as any).name.end; + (result as any).range[1] = node.name!.end; result.loc = nodeUtils.getLocFor( (result as any).range[0], (result as any).range[1], @@ -1702,6 +1704,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { break; case SyntaxKind.NamedImports: + // TODO: node has no name field Object.assign(result, { type: AST_NODE_TYPES.ImportDefaultSpecifier, local: convertChild((node as any).name) @@ -1709,17 +1712,17 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { break; case SyntaxKind.ExportDeclaration: - if ((node as any).exportClause) { + if (node.exportClause) { Object.assign(result, { type: AST_NODE_TYPES.ExportNamedDeclaration, - source: convertChild((node as any).moduleSpecifier), - specifiers: (node as any).exportClause.elements.map(convertChild), + source: convertChild(node.moduleSpecifier), + specifiers: node.exportClause.elements.map(convertChild), declaration: null }); } else { Object.assign(result, { type: AST_NODE_TYPES.ExportAllDeclaration, - source: convertChild((node as any).moduleSpecifier) + source: convertChild(node.moduleSpecifier) }); } break; @@ -1727,21 +1730,21 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.ExportSpecifier: Object.assign(result, { type: AST_NODE_TYPES.ExportSpecifier, - local: convertChild((node as any).propertyName || (node as any).name), - exported: convertChild((node as any).name) + local: convertChild(node.propertyName || node.name), + exported: convertChild(node.name) }); break; case SyntaxKind.ExportAssignment: - if ((node as any).isExportEquals) { + if (node.isExportEquals) { Object.assign(result, { type: AST_NODE_TYPES.TSExportAssignment, - expression: convertChild((node as any).expression) + expression: convertChild(node.expression) }); } else { Object.assign(result, { type: AST_NODE_TYPES.ExportDefaultDeclaration, - declaration: convertChild((node as any).expression) + declaration: convertChild(node.expression) }); } break; @@ -1750,7 +1753,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.PrefixUnaryExpression: case SyntaxKind.PostfixUnaryExpression: { - const operator = nodeUtils.getTextForTokenKind((node as any).operator); + const operator = nodeUtils.getTextForTokenKind(node.operator); Object.assign(result, { /** * ESTree uses UpdateExpression for ++/-- @@ -1760,7 +1763,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { : AST_NODE_TYPES.UnaryExpression, operator, prefix: node.kind === SyntaxKind.PrefixUnaryExpression, - argument: convertChild((node as any).operand) + argument: convertChild(node.operand) }); break; } @@ -1770,7 +1773,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { type: AST_NODE_TYPES.UnaryExpression, operator: 'delete', prefix: true, - argument: convertChild((node as any).expression) + argument: convertChild(node.expression) }); break; @@ -1779,7 +1782,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { type: AST_NODE_TYPES.UnaryExpression, operator: 'void', prefix: true, - argument: convertChild((node as any).expression) + argument: convertChild(node.expression) }); break; @@ -1788,15 +1791,15 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { type: AST_NODE_TYPES.UnaryExpression, operator: 'typeof', prefix: true, - argument: convertChild((node as any).expression) + argument: convertChild(node.expression) }); break; case SyntaxKind.TypeOperator: Object.assign(result, { type: AST_NODE_TYPES.TSTypeOperator, - operator: nodeUtils.getTextForTokenKind((node as any).operator), - typeAnnotation: convertChild((node as any).type) + operator: nodeUtils.getTextForTokenKind(node.operator), + typeAnnotation: convertChild(node.type) }); break; @@ -1804,14 +1807,14 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.BinaryExpression: // TypeScript uses BinaryExpression for sequences as well - if (nodeUtils.isComma((node as any).operatorToken)) { + if (nodeUtils.isComma(node.operatorToken)) { Object.assign(result, { type: AST_NODE_TYPES.SequenceExpression, expressions: [] }); - const left = convertChild((node as any).left), - right = convertChild((node as any).right); + const left = convertChild(node.left), + right = convertChild(node.right); if ((left as any).type === AST_NODE_TYPES.SequenceExpression) { (result as any).expressions = (result as any).expressions.concat( @@ -1829,26 +1832,21 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { (result as any).expressions.push(right); } } else if ( - (node as any).operatorToken && - (node as any).operatorToken.kind === - SyntaxKind.AsteriskAsteriskEqualsToken + node.operatorToken && + node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken ) { Object.assign(result, { type: AST_NODE_TYPES.AssignmentExpression, - operator: nodeUtils.getTextForTokenKind( - (node as any).operatorToken.kind - ), - left: convertChild((node as any).left), - right: convertChild((node as any).right) + operator: nodeUtils.getTextForTokenKind(node.operatorToken.kind), + left: convertChild(node.left), + right: convertChild(node.right) }); } else { Object.assign(result, { - type: nodeUtils.getBinaryExpressionType((node as any).operatorToken), - operator: nodeUtils.getTextForTokenKind( - (node as any).operatorToken.kind - ), - left: convertChild((node as any).left), - right: convertChild((node as any).right) + type: nodeUtils.getBinaryExpressionType(node.operatorToken), + operator: nodeUtils.getTextForTokenKind(node.operatorToken.kind), + left: convertChild(node.left), + right: convertChild(node.right) }); // if the binary expression is in a destructured array, switch it @@ -1891,12 +1889,12 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { if (nodeUtils.isJSXToken(parent!)) { const jsxMemberExpression = { type: AST_NODE_TYPES.MemberExpression, - object: convertChild((node as any).expression), - property: convertChild((node as any).name) + object: convertChild(node.expression), + property: convertChild(node.name) }; const isNestedMemberExpression = - (node as any).expression.kind === SyntaxKind.PropertyAccessExpression; - if ((node as any).expression.kind === SyntaxKind.ThisKeyword) { + node.expression.kind === SyntaxKind.PropertyAccessExpression; + if (node.expression.kind === SyntaxKind.ThisKeyword) { (jsxMemberExpression as any).object.name = 'this'; } @@ -1909,8 +1907,8 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { } else { Object.assign(result, { type: AST_NODE_TYPES.MemberExpression, - object: convertChild((node as any).expression), - property: convertChild((node as any).name), + object: convertChild(node.expression), + property: convertChild(node.name), computed: false }); } @@ -1919,8 +1917,8 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.ElementAccessExpression: Object.assign(result, { type: AST_NODE_TYPES.MemberExpression, - object: convertChild((node as any).expression), - property: convertChild((node as any).argumentExpression), + object: convertChild(node.expression), + property: convertChild(node.argumentExpression), computed: true }); break; @@ -1928,21 +1926,21 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.ConditionalExpression: Object.assign(result, { type: AST_NODE_TYPES.ConditionalExpression, - test: convertChild((node as any).condition), - consequent: convertChild((node as any).whenTrue), - alternate: convertChild((node as any).whenFalse) + test: convertChild(node.condition), + consequent: convertChild(node.whenTrue), + alternate: convertChild(node.whenFalse) }); break; case SyntaxKind.CallExpression: Object.assign(result, { type: AST_NODE_TYPES.CallExpression, - callee: convertChild((node as any).expression), - arguments: (node as any).arguments.map(convertChild) + callee: convertChild(node.expression), + arguments: node.arguments.map(convertChild) }); - if ((node as any).typeArguments && (node as any).typeArguments.length) { + if (node.typeArguments && node.typeArguments.length) { result.typeParameters = convertTypeArgumentsToTypeParameters( - (node as any).typeArguments + node.typeArguments ); } break; @@ -1950,32 +1948,27 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.NewExpression: Object.assign(result, { type: AST_NODE_TYPES.NewExpression, - callee: convertChild((node as any).expression), - arguments: (node as any).arguments - ? (node as any).arguments.map(convertChild) - : [] + callee: convertChild(node.expression), + arguments: node.arguments ? node.arguments.map(convertChild) : [] }); - if ((node as any).typeArguments && (node as any).typeArguments.length) { + if (node.typeArguments && node.typeArguments.length) { result.typeParameters = convertTypeArgumentsToTypeParameters( - (node as any).typeArguments + node.typeArguments ); } break; case SyntaxKind.MetaProperty: { - const newToken = nodeUtils.convertToken( - (node as any).getFirstToken(), - ast - ); + const newToken = nodeUtils.convertToken(node.getFirstToken()!, ast); Object.assign(result, { type: AST_NODE_TYPES.MetaProperty, meta: { type: AST_NODE_TYPES.Identifier, range: newToken.range, loc: newToken.loc, - name: nodeUtils.getTextForTokenKind((node as any).keywordToken) + name: nodeUtils.getTextForTokenKind(node.keywordToken) }, - property: convertChild((node as any).name) + property: convertChild(node.name) }); break; } @@ -1988,18 +1981,16 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { raw: ast.text.slice((result as any).range[0], (result as any).range[1]) }); if ((parent as any).name && (parent as any).name === node) { - (result as any).value = (node as any).text; + (result as any).value = node.text; } else { - (result as any).value = nodeUtils.unescapeStringLiteralText( - (node as any).text - ); + (result as any).value = nodeUtils.unescapeStringLiteralText(node.text); } break; case SyntaxKind.NumericLiteral: Object.assign(result, { type: AST_NODE_TYPES.Literal, - value: Number((node as any).text), + value: Number(node.text), raw: ast.text.slice((result as any).range[0], (result as any).range[1]) }); break; @@ -2019,13 +2010,8 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { } case SyntaxKind.RegularExpressionLiteral: { - const pattern = (node as any).text.slice( - 1, - (node as any).text.lastIndexOf('/') - ); - const flags = (node as any).text.slice( - (node as any).text.lastIndexOf('/') + 1 - ); + const pattern = node.text.slice(1, node.text.lastIndexOf('/')); + const flags = node.text.slice(node.text.lastIndexOf('/') + 1); let regex = null; try { @@ -2037,7 +2023,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { Object.assign(result, { type: AST_NODE_TYPES.Literal, value: regex, - raw: (node as any).text, + raw: node.text, regex: { pattern, flags @@ -2093,9 +2079,9 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.JsxElement: Object.assign(result, { type: AST_NODE_TYPES.JSXElement, - openingElement: convertChild((node as any).openingElement), - closingElement: convertChild((node as any).closingElement), - children: (node as any).children.map(convertChild) + openingElement: convertChild(node.openingElement), + closingElement: convertChild(node.closingElement), + children: node.children.map(convertChild) }); break; @@ -2105,7 +2091,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { type: AST_NODE_TYPES.JSXFragment, openingFragment: convertChild((node as ts.JsxFragment).openingFragment), closingFragment: convertChild((node as ts.JsxFragment).closingFragment), - children: (node as any).children.map(convertChild) + children: node.children.map(convertChild) }); break; @@ -2114,7 +2100,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { * Convert SyntaxKind.JsxSelfClosingElement to SyntaxKind.JsxOpeningElement, * TypeScript does not seem to have the idea of openingElement when tag is self-closing */ - node.kind = SyntaxKind.JsxOpeningElement; + (node as any).kind = SyntaxKind.JsxOpeningElement; const openingElement = convertChild(node); (openingElement as any).selfClosing = true; @@ -2132,19 +2118,19 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.JsxOpeningElement: Object.assign(result, { type: AST_NODE_TYPES.JSXOpeningElement, - typeParameters: (node as any).typeArguments - ? convertTypeArgumentsToTypeParameters((node as any).typeArguments) + typeParameters: node.typeArguments + ? convertTypeArgumentsToTypeParameters(node.typeArguments) : undefined, selfClosing: false, - name: convertTypeScriptJSXTagNameToESTreeName((node as any).tagName), - attributes: (node as any).attributes.properties.map(convertChild) + name: convertTypeScriptJSXTagNameToESTreeName(node.tagName), + attributes: node.attributes.properties.map(convertChild) }); break; case SyntaxKind.JsxClosingElement: Object.assign(result, { type: AST_NODE_TYPES.JSXClosingElement, - name: convertTypeScriptJSXTagNameToESTreeName((node as any).tagName) + name: convertTypeScriptJSXTagNameToESTreeName(node.tagName) }); break; @@ -2163,8 +2149,8 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { const eloc = ast.getLineAndCharacterOfPosition( (result as any).range[0] + 1 ); - const expression = (node as any).expression - ? convertChild((node as any).expression) + const expression = node.expression + ? convertChild(node.expression) : { type: AST_NODE_TYPES.JSXEmptyExpression, loc: { @@ -2181,7 +2167,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { }; Object.assign(result, { - type: (node as any).dotDotDotToken + type: node.dotDotDotToken ? AST_NODE_TYPES.JSXSpreadChild : AST_NODE_TYPES.JSXExpressionContainer, expression @@ -2191,7 +2177,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { } case SyntaxKind.JsxAttribute: { - const attributeName = nodeUtils.convertToken((node as any).name, ast); + const attributeName = nodeUtils.convertToken(node.name, ast); attributeName.type = AST_NODE_TYPES.JSXIdentifier; attributeName.name = attributeName.value; delete attributeName.value; @@ -2199,7 +2185,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { Object.assign(result, { type: AST_NODE_TYPES.JSXAttribute, name: attributeName, - value: convertChild((node as any).initializer) + value: convertChild(node.initializer) }); break; @@ -2234,7 +2220,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.JsxSpreadAttribute: Object.assign(result, { type: AST_NODE_TYPES.JSXSpreadAttribute, - argument: convertChild((node as any).expression) + argument: convertChild(node.expression) }); break; @@ -2242,8 +2228,8 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.FirstNode: { Object.assign(result, { type: AST_NODE_TYPES.TSQualifiedName, - left: convertChild((node as any).left), - right: convertChild((node as any).right) + left: convertChild(node.left), + right: convertChild(node.right) }); break; @@ -2253,7 +2239,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.ParenthesizedExpression: return convert({ - node: (node as any).expression, + node: node.expression, parent, ast, additionalOptions @@ -2266,9 +2252,9 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.TypeAliasDeclaration: { const typeAliasDeclarator = { type: AST_NODE_TYPES.VariableDeclarator, - id: convertChild((node as any).name), - init: convertChild((node as any).type), - range: [(node as any).name.getStart(ast), (node as any).end] + id: convertChild(node.name), + init: convertChild(node.type), + range: [node.name.getStart(ast), node.end] }; (typeAliasDeclarator as any).loc = nodeUtils.getLocFor( @@ -2278,9 +2264,9 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { ); // Process typeParameters - if ((node as any).typeParameters && (node as any).typeParameters.length) { + if (node.typeParameters && node.typeParameters.length) { (typeAliasDeclarator as any).typeParameters = convertTSTypeParametersToTypeParametersDeclaration( - (node as any).typeParameters + node.typeParameters ); } @@ -2300,12 +2286,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { Object.assign(result, { type: AST_NODE_TYPES.TSMethodSignature, optional: nodeUtils.isOptional(node), - computed: nodeUtils.isComputedProperty((node as any).name), - key: convertChild((node as any).name), - params: convertParameters((node as any).parameters), - typeAnnotation: (node as any).type - ? convertTypeAnnotation((node as any).type) - : null, + computed: nodeUtils.isComputedProperty(node.name), + key: convertChild(node.name), + params: convertParameters(node.parameters), + typeAnnotation: node.type ? convertTypeAnnotation(node.type) : null, readonly: nodeUtils.hasModifier(SyntaxKind.ReadonlyKeyword, node) || undefined, static: nodeUtils.hasModifier(SyntaxKind.StaticKeyword, node), @@ -2318,9 +2302,9 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { (result as any).accessibility = accessibility; } - if ((node as any).typeParameters) { + if (node.typeParameters) { (result as any).typeParameters = convertTSTypeParametersToTypeParametersDeclaration( - (node as any).typeParameters + node.typeParameters ); } @@ -2331,12 +2315,12 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { Object.assign(result, { type: AST_NODE_TYPES.TSPropertySignature, optional: nodeUtils.isOptional(node) || undefined, - computed: nodeUtils.isComputedProperty((node as any).name), - key: convertChild((node as any).name), - typeAnnotation: (node as any).type - ? convertTypeAnnotation((node as any).type) + computed: nodeUtils.isComputedProperty(node.name), + key: convertChild(node.name), + typeAnnotation: node.type + ? convertTypeAnnotation(node.type) : undefined, - initializer: convertChild((node as any).initializer) || undefined, + initializer: convertChild(node.initializer) || undefined, readonly: nodeUtils.hasModifier(SyntaxKind.ReadonlyKeyword, node) || undefined, static: @@ -2356,10 +2340,8 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.IndexSignature: { Object.assign(result, { type: AST_NODE_TYPES.TSIndexSignature, - index: convertChild((node as any).parameters[0]), - typeAnnotation: (node as any).type - ? convertTypeAnnotation((node as any).type) - : null, + index: convertChild(node.parameters[0]), + typeAnnotation: node.type ? convertTypeAnnotation(node.type) : null, readonly: nodeUtils.hasModifier(SyntaxKind.ReadonlyKeyword, node) || undefined, static: nodeUtils.hasModifier(SyntaxKind.StaticKeyword, node), @@ -2378,15 +2360,13 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.ConstructSignature: { Object.assign(result, { type: AST_NODE_TYPES.TSConstructSignature, - params: convertParameters((node as any).parameters), - typeAnnotation: (node as any).type - ? convertTypeAnnotation((node as any).type) - : null + params: convertParameters(node.parameters), + typeAnnotation: node.type ? convertTypeAnnotation(node.type) : null }); - if ((node as any).typeParameters) { + if (node.typeParameters) { result.typeParameters = convertTSTypeParametersToTypeParametersDeclaration( - (node as any).typeParameters + node.typeParameters ); } @@ -2394,16 +2374,15 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { } case SyntaxKind.InterfaceDeclaration: { - const interfaceHeritageClauses = (node as any).heritageClauses || []; + const interfaceHeritageClauses = node.heritageClauses || []; let interfaceLastClassToken = interfaceHeritageClauses.length ? interfaceHeritageClauses[interfaceHeritageClauses.length - 1] - : (node as any).name; + : node.name; - if ((node as any).typeParameters && (node as any).typeParameters.length) { - const interfaceLastTypeParameter = (node as any).typeParameters[ - (node as any).typeParameters.length - 1 - ]; + if (node.typeParameters && node.typeParameters.length) { + const interfaceLastTypeParameter = + node.typeParameters[node.typeParameters.length - 1]; if ( !interfaceLastClassToken || @@ -2413,10 +2392,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { interfaceLastTypeParameter, ast, ast - ); + ) as any; } result.typeParameters = convertTSTypeParametersToTypeParametersDeclaration( - (node as any).typeParameters + node.typeParameters ); } @@ -2433,7 +2412,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { const interfaceBody = { type: AST_NODE_TYPES.TSInterfaceBody, - body: (node as any).members.map((member: any) => convertChild(member)), + body: node.members.map((member: any) => convertChild(member)), range: [interfaceOpenBrace.getStart(ast), (result as any).range[1]], loc: nodeUtils.getLocFor( interfaceOpenBrace.getStart(ast), @@ -2446,7 +2425,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { abstract: hasAbstractKeyword, type: AST_NODE_TYPES.TSInterfaceDeclaration, body: interfaceBody, - id: convertChild((node as any).name), + id: convertChild(node.name), heritage: hasImplementsClause ? interfaceHeritageClauses[0].types.map( convertInterfaceHeritageClause @@ -2470,8 +2449,8 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.FirstTypeNode: Object.assign(result, { type: AST_NODE_TYPES.TSTypePredicate, - parameterName: convertChild((node as any).parameterName), - typeAnnotation: convertTypeAnnotation((node as any).type) + parameterName: convertChild(node.parameterName), + typeAnnotation: convertTypeAnnotation(node.type) }); /** * Specific fix for type-guard location data @@ -2483,11 +2462,11 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.ImportType: Object.assign(result, { type: AST_NODE_TYPES.TSImportType, - isTypeOf: !!(node as any).isTypeOf, - parameter: convertChild((node as any).argument), - qualifier: convertChild((node as any).qualifier), - typeParameters: (node as any).typeArguments - ? convertTypeArgumentsToTypeParameters((node as any).typeArguments) + isTypeOf: !!node.isTypeOf, + parameter: convertChild(node.argument), + qualifier: convertChild(node.qualifier), + typeParameters: node.typeArguments + ? convertTypeArgumentsToTypeParameters(node.typeArguments) : null }); break; @@ -2495,11 +2474,11 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.EnumDeclaration: { Object.assign(result, { type: AST_NODE_TYPES.TSEnumDeclaration, - id: convertChild((node as any).name), - members: (node as any).members.map(convertChild) + id: convertChild(node.name), + members: node.members.map(convertChild) }); // apply modifiers first... - applyModifiersToResult((node as any).modifiers); + applyModifiersToResult(node.modifiers); // ...then check for exports result = nodeUtils.fixExports(node, result as any, ast); /** @@ -2516,10 +2495,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.EnumMember: { Object.assign(result, { type: AST_NODE_TYPES.TSEnumMember, - id: convertChild((node as any).name) + id: convertChild(node.name) }); - if ((node as any).initializer) { - (result as any).initializer = convertChild((node as any).initializer); + if (node.initializer) { + (result as any).initializer = convertChild(node.initializer); } break; } @@ -2534,13 +2513,13 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.ModuleDeclaration: { Object.assign(result, { type: AST_NODE_TYPES.TSModuleDeclaration, - id: convertChild((node as any).name) + id: convertChild(node.name) }); - if ((node as any).body) { - result.body = convertChild((node as any).body); + if (node.body) { + result.body = convertChild(node.body); } // apply modifiers first... - applyModifiersToResult((node as any).modifiers); + applyModifiersToResult(node.modifiers); if (node.flags & ts.NodeFlags.GlobalAugmentation) { result.global = true; } diff --git a/src/node-utils.ts b/src/node-utils.ts index 873db9c..4563770 100644 --- a/src/node-utils.ts +++ b/src/node-utils.ts @@ -11,6 +11,7 @@ import { ESTreeNode, ESTreeToken } from './temp-types-based-on-js-source'; +import { TSNode } from './ts-nodes'; const SyntaxKind = ts.SyntaxKind; @@ -289,12 +290,12 @@ function getLocFor( /** * Returns line and column data for the given ts.Node or ts.Token, * for the given AST - * @param {ts.Token|ts.Node} nodeOrToken the ts.Node or ts.Token + * @param {ts.Token|TSNode} nodeOrToken the ts.Node or ts.Token * @param {ts.SourceFile} ast the AST object * @returns {ESTreeLoc} the loc data */ function getLoc( - nodeOrToken: ts.Node | ts.Token, + nodeOrToken: TSNode | ts.Token, ast: ts.SourceFile ): ESTreeNodeLoc { return getLocFor(nodeOrToken.getStart(ast), nodeOrToken.end, ast); @@ -537,7 +538,7 @@ function isComputedProperty(node: ts.Node): boolean { * @param {ts.Node} node ts.Node to be checked * @returns {boolean} is Optional */ -function isOptional(node: any): boolean { +function isOptional(node: { questionToken?: ts.QuestionToken }): boolean { return node.questionToken ? node.questionToken.kind === SyntaxKind.QuestionToken : false; diff --git a/src/ts-nodes.ts b/src/ts-nodes.ts new file mode 100644 index 0000000..93d692f --- /dev/null +++ b/src/ts-nodes.ts @@ -0,0 +1,178 @@ +import ts from 'typescript'; + +export type TSNode = ts.Node & + ( + | ts.Modifier + | ts.Identifier + | ts.QualifiedName + | ts.ComputedPropertyName + | ts.Decorator + | ts.TypeParameterDeclaration + // | ts.SignatureDeclarationBase -> CallSignatureDeclaration, ConstructSignatureDeclaration + | ts.CallSignatureDeclaration + | ts.ConstructSignatureDeclaration + | ts.VariableDeclaration + | ts.VariableDeclarationList + | ts.ParameterDeclaration + | ts.BindingElement + | ts.PropertySignature + | ts.PropertyDeclaration + | ts.PropertyAssignment + | ts.ShorthandPropertyAssignment + | ts.SpreadAssignment + | ts.ObjectBindingPattern + | ts.ArrayBindingPattern + | ts.FunctionDeclaration + | ts.MethodSignature + | ts.MethodDeclaration + | ts.ConstructorDeclaration + | ts.SemicolonClassElement + | ts.GetAccessorDeclaration + | ts.SetAccessorDeclaration + | ts.IndexSignatureDeclaration + | ts.KeywordTypeNode + | ts.ImportTypeNode + | ts.ThisTypeNode + // | ts.FunctionOrConstructorTypeNodeBase -> FunctionTypeNode, ConstructorTypeNode + | ts.ConstructorTypeNode + | ts.TypeReferenceNode + | ts.TypePredicateNode + | ts.TypeQueryNode + | ts.TypeLiteralNode + | ts.ArrayTypeNode + | ts.TupleTypeNode + | ts.OptionalTypeNode + | ts.RestTypeNode + | ts.UnionTypeNode + | ts.IntersectionTypeNode + | ts.ConditionalTypeNode + | ts.InferTypeNode + | ts.ParenthesizedTypeNode + | ts.TypeOperatorNode + | ts.IndexedAccessTypeNode + | ts.MappedTypeNode + | ts.LiteralTypeNode + | ts.StringLiteral + | ts.OmittedExpression + | ts.PartiallyEmittedExpression + | ts.PrefixUnaryExpression + | ts.PostfixUnaryExpression + | ts.NullLiteral + | ts.BooleanLiteral + | ts.ThisExpression + | ts.SuperExpression + | ts.ImportExpression + | ts.DeleteExpression + | ts.TypeOfExpression + | ts.VoidExpression + | ts.AwaitExpression + | ts.YieldExpression + | ts.SyntheticExpression + | ts.BinaryExpression + | ts.ConditionalExpression + | ts.FunctionExpression + | ts.ArrowFunction + | ts.RegularExpressionLiteral + | ts.NoSubstitutionTemplateLiteral + | ts.NumericLiteral + | ts.BigIntLiteral + | ts.TemplateHead + | ts.TemplateMiddle + | ts.TemplateTail + | ts.TemplateExpression + | ts.TemplateSpan + | ts.ParenthesizedExpression + | ts.ArrayLiteralExpression + | ts.SpreadElement + | ts.ObjectLiteralExpression + | ts.PropertyAccessExpression + | ts.ElementAccessExpression + | ts.CallExpression + | ts.ExpressionWithTypeArguments + | ts.NewExpression + | ts.TaggedTemplateExpression + | ts.AsExpression + | ts.TypeAssertion + | ts.NonNullExpression + | ts.MetaProperty + | ts.JsxElement + | ts.JsxOpeningElement + | ts.JsxSelfClosingElement + | ts.JsxFragment + | ts.JsxOpeningFragment + | ts.JsxClosingFragment + | ts.JsxAttribute + | ts.JsxSpreadAttribute + | ts.JsxClosingElement + | ts.JsxExpression + | ts.JsxText + | ts.NotEmittedStatement + | ts.CommaListExpression + | ts.EmptyStatement + | ts.DebuggerStatement + | ts.MissingDeclaration + | ts.Block + | ts.VariableStatement + | ts.ExpressionStatement + | ts.IfStatement + | ts.DoStatement + | ts.WhileStatement + | ts.ForStatement + | ts.ForInStatement + | ts.ForOfStatement + | ts.BreakStatement + | ts.ContinueStatement + | ts.ReturnStatement + | ts.WithStatement + | ts.SwitchStatement + | ts.CaseBlock + | ts.CaseClause + | ts.DefaultClause + | ts.LabeledStatement + | ts.ThrowStatement + | ts.TryStatement + | ts.CatchClause + // | ts.ClassLikeDeclarationBase -> ClassDeclaration | ClassExpression + | ts.ClassDeclaration + | ts.ClassExpression + | ts.InterfaceDeclaration + | ts.HeritageClause + | ts.TypeAliasDeclaration + | ts.EnumMember + | ts.EnumDeclaration + | ts.ModuleDeclaration + | ts.ModuleBlock + | ts.ImportEqualsDeclaration + | ts.ExternalModuleReference + | ts.ImportDeclaration + | ts.ImportClause + | ts.NamespaceImport + | ts.NamespaceExportDeclaration + | ts.ExportDeclaration + | ts.NamedImports + | ts.NamedExports + | ts.ImportSpecifier + | ts.ExportSpecifier + | ts.ExportAssignment + | ts.CommentRange + | ts.JSDocTypeExpression + | ts.JSDoc + | ts.JSDocUnknownTag + | ts.JSDocAugmentsTag + | ts.JSDocClassTag + | ts.JSDocEnumTag + | ts.JSDocThisTag + | ts.JSDocTemplateTag + | ts.JSDocReturnTag + | ts.JSDocTypeTag + | ts.JSDocTypedefTag + | ts.JSDocCallbackTag + | ts.JSDocSignature + | ts.JSDocPropertyTag + | ts.JSDocParameterTag + | ts.JSDocTypeLiteral + | ts.SourceFile + | ts.Bundle + | ts.InputFiles + | ts.UnparsedSource + | ts.JsonMinusNumericLiteral); From 159c325120e78aad5ab4e2aa2b683173b46ae730 Mon Sep 17 00:00:00 2001 From: Armano Date: Wed, 19 Dec 2018 03:03:46 +0100 Subject: [PATCH 05/30] feat: fix issues in AST (#42) changes: DeclareFunction to TSDeclareFunction changes: VariableDeclarator[kind='type'] to TSTypeAliasDeclaration makes abstract optional in interfaces BREAKING CHANGE: This changes the AST --- src/ast-node-types.ts | 3 +- src/convert.ts | 66 +- src/node-utils.ts | 4 +- src/temp-types-based-on-js-source.ts | 1 + tests/ast-alignment/fixtures-to-test.ts | 38 +- .../typescript/declare/abstract-class.src.ts | 3 + .../fixtures/typescript/declare/class.src.ts | 3 + tests/fixtures/typescript/declare/enum.src.ts | 4 + .../typescript/declare/function.src.ts | 1 + .../typescript/declare/interface.src.ts | 3 + .../fixtures/typescript/declare/module.src.ts | 3 + .../typescript/declare/namespace.src.ts | 3 + .../typescript/declare/type-alias.src.ts | 1 + .../typescript/declare/variable.src.ts | 1 + tests/lib/__snapshots__/javascript.ts.snap | 2 - tests/lib/__snapshots__/tsx.ts.snap | 214 +- tests/lib/__snapshots__/typescript.ts.snap | 5050 +++++++++++------ 17 files changed, 3450 insertions(+), 1950 deletions(-) create mode 100644 tests/fixtures/typescript/declare/abstract-class.src.ts create mode 100644 tests/fixtures/typescript/declare/class.src.ts create mode 100644 tests/fixtures/typescript/declare/enum.src.ts create mode 100644 tests/fixtures/typescript/declare/function.src.ts create mode 100644 tests/fixtures/typescript/declare/interface.src.ts create mode 100644 tests/fixtures/typescript/declare/module.src.ts create mode 100644 tests/fixtures/typescript/declare/namespace.src.ts create mode 100644 tests/fixtures/typescript/declare/type-alias.src.ts create mode 100644 tests/fixtures/typescript/declare/variable.src.ts diff --git a/src/ast-node-types.ts b/src/ast-node-types.ts index 35a086f..58f6eea 100644 --- a/src/ast-node-types.ts +++ b/src/ast-node-types.ts @@ -26,7 +26,6 @@ export const AST_NODE_TYPES: { [key: string]: string } = { ConditionalExpression: 'ConditionalExpression', ContinueStatement: 'ContinueStatement', DebuggerStatement: 'DebuggerStatement', - DeclareFunction: 'DeclareFunction', Decorator: 'Decorator', DoWhileStatement: 'DoWhileStatement', EmptyStatement: 'EmptyStatement', @@ -100,6 +99,7 @@ export const AST_NODE_TYPES: { [key: string]: string } = { TSConstructorType: 'TSConstructorType', TSConstructSignature: 'TSConstructSignature', TSDeclareKeyword: 'TSDeclareKeyword', + TSDeclareFunction: 'TSDeclareFunction', TSEnumDeclaration: 'TSEnumDeclaration', TSEnumMember: 'TSEnumMember', TSExportAssignment: 'TSExportAssignment', @@ -132,6 +132,7 @@ export const AST_NODE_TYPES: { [key: string]: string } = { TSStringKeyword: 'TSStringKeyword', TSSymbolKeyword: 'TSSymbolKeyword', TSTypeAnnotation: 'TSTypeAnnotation', + TSTypeAliasDeclaration: 'TSTypeAliasDeclaration', TSTypeLiteral: 'TSTypeLiteral', TSTypeOperator: 'TSTypeOperator', TSTypeParameter: 'TSTypeParameter', diff --git a/src/convert.ts b/src/convert.ts index c405886..3dd82d5 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -694,15 +694,8 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.FunctionDeclaration: { let functionDeclarationType = AST_NODE_TYPES.FunctionDeclaration; - - if (node.modifiers && node.modifiers.length) { - const isDeclareFunction = nodeUtils.hasModifier( - SyntaxKind.DeclareKeyword, - node - ); - if (isDeclareFunction) { - functionDeclarationType = AST_NODE_TYPES.DeclareFunction; - } + if (nodeUtils.hasModifier(SyntaxKind.DeclareKeyword, node)) { + functionDeclarationType = AST_NODE_TYPES.TSDeclareFunction; } Object.assign(result, { @@ -712,7 +705,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { expression: false, async: nodeUtils.hasModifier(SyntaxKind.AsyncKeyword, node), params: convertParameters(node.parameters), - body: convertChild(node.body) + body: convertChild(node.body) || undefined }); // Process returnType @@ -720,6 +713,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { (result as any).returnType = convertTypeAnnotation(node.type); } + if (functionDeclarationType === AST_NODE_TYPES.TSDeclareFunction) { + result.declare = true; + } + // Process typeParameters if (node.typeParameters && node.typeParameters.length) { result.typeParameters = convertTSTypeParametersToTypeParametersDeclaration( @@ -758,6 +755,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { kind: nodeUtils.getDeclarationKind(node.declarationList) }); + if (nodeUtils.hasModifier(SyntaxKind.DeclareKeyword, node)) { + result.declare = true; + } + // check for exports result = nodeUtils.fixExports(node, result as any, ast); break; @@ -1618,6 +1619,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { ); } + if (nodeUtils.hasModifier(SyntaxKind.DeclareKeyword, node)) { + result.declare = true; + } + if (node.decorators) { result.decorators = convertDecorators(node.decorators); } @@ -2245,40 +2250,26 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { additionalOptions }); - /** - * Convert TypeAliasDeclaration node into VariableDeclaration - * to allow core rules such as "semi" to work automatically - */ case SyntaxKind.TypeAliasDeclaration: { - const typeAliasDeclarator = { - type: AST_NODE_TYPES.VariableDeclarator, + Object.assign(result, { + type: AST_NODE_TYPES.TSTypeAliasDeclaration, id: convertChild(node.name), - init: convertChild(node.type), - range: [node.name.getStart(ast), node.end] - }; + typeAnnotation: convertChild(node.type) + }); - (typeAliasDeclarator as any).loc = nodeUtils.getLocFor( - typeAliasDeclarator.range[0], - typeAliasDeclarator.range[1], - ast - ); + if (nodeUtils.hasModifier(SyntaxKind.DeclareKeyword, node)) { + result.declare = true; + } // Process typeParameters if (node.typeParameters && node.typeParameters.length) { - (typeAliasDeclarator as any).typeParameters = convertTSTypeParametersToTypeParametersDeclaration( + (result as any).typeParameters = convertTSTypeParametersToTypeParametersDeclaration( node.typeParameters ); } - Object.assign(result, { - type: AST_NODE_TYPES.VariableDeclaration, - kind: nodeUtils.getDeclarationKind(node), - declarations: [typeAliasDeclarator] - }); - // check for exports result = nodeUtils.fixExports(node, result as any, ast); - break; } @@ -2400,10 +2391,6 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { } const hasImplementsClause = interfaceHeritageClauses.length > 0; - const hasAbstractKeyword = nodeUtils.hasModifier( - SyntaxKind.AbstractKeyword, - node - ); const interfaceOpenBrace = nodeUtils.findNextToken( interfaceLastClassToken, ast, @@ -2422,7 +2409,6 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { }; Object.assign(result, { - abstract: hasAbstractKeyword, type: AST_NODE_TYPES.TSInterfaceDeclaration, body: interfaceBody, id: convertChild(node.name), @@ -2440,6 +2426,12 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { if (node.decorators) { result.decorators = convertDecorators(node.decorators); } + if (nodeUtils.hasModifier(SyntaxKind.AbstractKeyword, node)) { + result.abstract = true; + } + if (nodeUtils.hasModifier(SyntaxKind.DeclareKeyword, node)) { + result.declare = true; + } // check for exports result = nodeUtils.fixExports(node, result as any, ast); diff --git a/src/node-utils.ts b/src/node-utils.ts index 4563770..8630177 100644 --- a/src/node-utils.ts +++ b/src/node-utils.ts @@ -350,10 +350,8 @@ function isTypeKeyword(kind: number): boolean { * @param {ts.Node} node TypeScript AST node * @returns {string} declaration kind */ -function getDeclarationKind(node: ts.Node): string { +function getDeclarationKind(node: ts.Node): 'let' | 'const' | 'var' { switch (node.kind) { - case SyntaxKind.TypeAliasDeclaration: - return 'type'; case SyntaxKind.VariableDeclarationList: if (node.flags & ts.NodeFlags.Let) { return 'let'; diff --git a/src/temp-types-based-on-js-source.ts b/src/temp-types-based-on-js-source.ts index 3a37c3f..9ce5dae 100644 --- a/src/temp-types-based-on-js-source.ts +++ b/src/temp-types-based-on-js-source.ts @@ -41,6 +41,7 @@ export interface ESTreeNode { static?: boolean; export?: boolean; parameter?: any; + abstract?: boolean; } export interface ESTreeComment extends ESTreeNode {} diff --git a/tests/ast-alignment/fixtures-to-test.ts b/tests/ast-alignment/fixtures-to-test.ts index 3e22061..cba6f1c 100644 --- a/tests/ast-alignment/fixtures-to-test.ts +++ b/tests/ast-alignment/fixtures-to-test.ts @@ -395,16 +395,6 @@ let fixturePatternConfigsToTest = [ 'class-with-implements-generic', 'class-with-implements', 'class-with-extends-and-implements', - /** - * Babylon: TSDeclareFunction + declare: true - * tsep: DeclareFunction - */ - 'declare-function', - /** - * Babylon: TSTypeReference + identifier - * tsep: TSUnknownKeyword - */ - 'unknown-type-annotation', /** * Other major AST differences (e.g. fundamentally different node types) */ @@ -418,15 +408,9 @@ let fixturePatternConfigsToTest = [ 'interface-with-jsdoc', 'interface-with-optional-properties', 'interface-without-type-annotation', - 'type-alias-declaration-with-constrained-type-parameter', - 'type-alias-declaration', - 'type-alias-object-without-annotation', 'typed-this', 'export-type-function-declaration', - 'export-type-class-declaration', 'abstract-interface', - 'export-type-alias-declaration', - 'unique-symbol', 'keyof-operator', /** * tsep bug - Program.body[0].expression.left.properties[0].value.right is currently showing up @@ -456,6 +440,8 @@ let fixturePatternConfigsToTest = [ parseWithSourceTypeModule: [ 'export-named-enum', 'export-assignment', + 'export-type-alias-declaration', + 'export-type-class-declaration', 'export-default-class-with-generic', 'export-default-class-with-multiple-generics', 'export-named-class-with-generic', @@ -483,7 +469,7 @@ let fixturePatternConfigsToTest = [ fileType: 'ts', ignore: [ /** - * currently babylon not supported + * there is difference in range between babel and tsep */ 'tagged-template-expression-type-arguments' ] @@ -508,6 +494,24 @@ let fixturePatternConfigsToTest = [ ] }), + createFixturePatternConfigFor('typescript/declare', { + fileType: 'ts', + ignore: [ + /** + * AST difference + * tsep: TSAbstractClassDeclaration + * babel: ClassDeclaration[abstract=true] + */ + 'interface', + /** + * AST difference + * tsep: heritage = [] + * babel: heritage = undefined + */ + 'abstract-class' + ] + }), + createFixturePatternConfigFor('typescript/namespaces-and-modules', { fileType: 'ts', ignore: [ diff --git a/tests/fixtures/typescript/declare/abstract-class.src.ts b/tests/fixtures/typescript/declare/abstract-class.src.ts new file mode 100644 index 0000000..4a9cfd0 --- /dev/null +++ b/tests/fixtures/typescript/declare/abstract-class.src.ts @@ -0,0 +1,3 @@ +declare abstract class Foo { + +} diff --git a/tests/fixtures/typescript/declare/class.src.ts b/tests/fixtures/typescript/declare/class.src.ts new file mode 100644 index 0000000..2e769f6 --- /dev/null +++ b/tests/fixtures/typescript/declare/class.src.ts @@ -0,0 +1,3 @@ +declare class Foo { + +} diff --git a/tests/fixtures/typescript/declare/enum.src.ts b/tests/fixtures/typescript/declare/enum.src.ts new file mode 100644 index 0000000..0fde772 --- /dev/null +++ b/tests/fixtures/typescript/declare/enum.src.ts @@ -0,0 +1,4 @@ +declare enum Foo { + Bar, + Baz +} diff --git a/tests/fixtures/typescript/declare/function.src.ts b/tests/fixtures/typescript/declare/function.src.ts new file mode 100644 index 0000000..44407a3 --- /dev/null +++ b/tests/fixtures/typescript/declare/function.src.ts @@ -0,0 +1 @@ +declare function foo(): void diff --git a/tests/fixtures/typescript/declare/interface.src.ts b/tests/fixtures/typescript/declare/interface.src.ts new file mode 100644 index 0000000..f9afeb1 --- /dev/null +++ b/tests/fixtures/typescript/declare/interface.src.ts @@ -0,0 +1,3 @@ +declare interface Foo { + +} diff --git a/tests/fixtures/typescript/declare/module.src.ts b/tests/fixtures/typescript/declare/module.src.ts new file mode 100644 index 0000000..13fa998 --- /dev/null +++ b/tests/fixtures/typescript/declare/module.src.ts @@ -0,0 +1,3 @@ +declare module Foo { + +} diff --git a/tests/fixtures/typescript/declare/namespace.src.ts b/tests/fixtures/typescript/declare/namespace.src.ts new file mode 100644 index 0000000..8caa74c --- /dev/null +++ b/tests/fixtures/typescript/declare/namespace.src.ts @@ -0,0 +1,3 @@ +declare namespace Foo { + +} diff --git a/tests/fixtures/typescript/declare/type-alias.src.ts b/tests/fixtures/typescript/declare/type-alias.src.ts new file mode 100644 index 0000000..d8346d0 --- /dev/null +++ b/tests/fixtures/typescript/declare/type-alias.src.ts @@ -0,0 +1 @@ +declare type Foo = string diff --git a/tests/fixtures/typescript/declare/variable.src.ts b/tests/fixtures/typescript/declare/variable.src.ts new file mode 100644 index 0000000..cdb68e3 --- /dev/null +++ b/tests/fixtures/typescript/declare/variable.src.ts @@ -0,0 +1 @@ +declare var foo: any; diff --git a/tests/lib/__snapshots__/javascript.ts.snap b/tests/lib/__snapshots__/javascript.ts.snap index 399dd29..eaad453 100644 --- a/tests/lib/__snapshots__/javascript.ts.snap +++ b/tests/lib/__snapshots__/javascript.ts.snap @@ -105760,7 +105760,6 @@ Object { "body": Array [ Object { "async": false, - "body": null, "expression": false, "generator": false, "id": Object { @@ -106077,7 +106076,6 @@ Object { "body": Array [ Object { "async": false, - "body": null, "expression": false, "generator": false, "id": Object { diff --git a/tests/lib/__snapshots__/tsx.ts.snap b/tests/lib/__snapshots__/tsx.ts.snap index d78b679..9f3a260 100644 --- a/tests/lib/__snapshots__/tsx.ts.snap +++ b/tests/lib/__snapshots__/tsx.ts.snap @@ -499,148 +499,128 @@ Object { "type": "ImportDeclaration", }, Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "Props", + "range": Array [ + 36, + 41, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 31, + 63, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, }, + "name": "title", + "range": Array [ + 48, + 53, + ], + "type": "Identifier", }, - "name": "Props", - "range": Array [ - 36, - 41, - ], - "type": "Identifier", - }, - "init": Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 15, + "line": 3, }, "start": Object { - "column": 13, - "line": 2, + "column": 2, + "line": 3, }, }, - "members": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "title", - "range": Array [ - 48, - 53, - ], - "type": "Identifier", + "range": Array [ + 48, + 61, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, }, + "start": Object { + "column": 7, + "line": 3, + }, + }, + "range": Array [ + 53, + 61, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { "column": 15, "line": 3, }, "start": Object { - "column": 2, + "column": 9, "line": 3, }, }, "range": Array [ - 48, + 55, 61, ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 53, - 61, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 55, - 61, - ], - "type": "TSStringKeyword", - }, - }, + "type": "TSStringKeyword", }, - ], - "range": Array [ - 44, - 63, - ], - "type": "TSTypeLiteral", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 2, }, }, - "range": Array [ - 36, - 63, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 2, - }, + ], + "range": Array [ + 44, + 63, + ], + "type": "TSTypeLiteral", }, - "range": Array [ - 31, - 63, - ], - "type": "VariableDeclaration", }, Object { "declaration": Object { diff --git a/tests/lib/__snapshots__/typescript.ts.snap b/tests/lib/__snapshots__/typescript.ts.snap index 1829ec5..edcf3d4 100644 --- a/tests/lib/__snapshots__/typescript.ts.snap +++ b/tests/lib/__snapshots__/typescript.ts.snap @@ -10718,7 +10718,6 @@ Object { "type": "ClassDeclaration", }, Object { - "abstract": false, "body": Object { "body": Array [], "loc": Object { @@ -10773,254 +10772,234 @@ Object { "type": "TSInterfaceDeclaration", }, Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 9, - }, - "start": Object { - "column": 5, - "line": 9, - }, - }, - "name": "Constructor", - "range": Array [ - 163, - 174, - ], - "type": "Identifier", + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 9, }, - "init": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 9, - }, - "start": Object { - "column": 22, - "line": 9, - }, - }, - "parameters": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 30, - "line": 9, - }, - }, - "name": "args", - "range": Array [ - 188, - 199, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 34, - "line": 9, - }, - }, - "range": Array [ - 192, - 199, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "elementType": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 9, - }, - "start": Object { - "column": 36, - "line": 9, - }, - }, - "range": Array [ - 194, - 197, - ], - "type": "TSAnyKeyword", - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 36, - "line": 9, - }, - }, - "range": Array [ - 194, - 199, - ], - "type": "TSArrayType", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 27, - "line": 9, - }, - }, - "range": Array [ - 185, - 199, - ], - "type": "RestElement", - }, - ], - "range": Array [ - 180, - 205, - ], - "type": "TSConstructorType", - "typeAnnotation": Object { + "start": Object { + "column": 5, + "line": 9, + }, + }, + "name": "Constructor", + "range": Array [ + 163, + 174, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 48, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 9, + }, + }, + "range": Array [ + 158, + 206, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 9, + }, + "start": Object { + "column": 22, + "line": 9, + }, + }, + "parameters": Array [ + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 47, + "column": 41, "line": 9, }, "start": Object { - "column": 44, + "column": 30, "line": 9, }, }, + "name": "args", "range": Array [ - 202, - 205, + 188, + 199, ], - "type": "TSTypeAnnotation", + "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 47, + "column": 41, "line": 9, }, "start": Object { - "column": 46, + "column": 34, "line": 9, }, }, "range": Array [ - 204, - 205, + 192, + 199, ], - "type": "TSTypeReference", - "typeName": Object { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "elementType": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 9, + }, + "start": Object { + "column": 36, + "line": 9, + }, + }, + "range": Array [ + 194, + 197, + ], + "type": "TSAnyKeyword", + }, "loc": Object { "end": Object { - "column": 47, + "column": 41, "line": 9, }, "start": Object { - "column": 46, + "column": 36, "line": 9, }, }, - "name": "T", "range": Array [ - 204, - 205, + 194, + 199, ], - "type": "Identifier", + "type": "TSArrayType", }, }, }, - "typeParameters": null, + "loc": Object { + "end": Object { + "column": 41, + "line": 9, + }, + "start": Object { + "column": 27, + "line": 9, + }, + }, + "range": Array [ + 185, + 199, + ], + "type": "RestElement", }, + ], + "range": Array [ + 180, + 205, + ], + "type": "TSConstructorType", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 48, + "column": 47, "line": 9, }, "start": Object { - "column": 5, + "column": 44, "line": 9, }, }, "range": Array [ - 163, - 206, + 202, + 205, ], - "type": "VariableDeclarator", - "typeParameters": Object { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 19, + "column": 47, "line": 9, }, "start": Object { - "column": 16, + "column": 46, "line": 9, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "name": "T", - "range": Array [ - 175, - 176, - ], - "type": "TSTypeParameter", - }, - ], "range": Array [ - 174, - 177, + 204, + 205, ], - "type": "TSTypeParameterDeclaration", + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 9, + }, + "start": Object { + "column": 46, + "line": 9, + }, + }, + "name": "T", + "range": Array [ + 204, + 205, + ], + "type": "Identifier", + }, }, }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 48, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, + "typeParameters": null, + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 9, + }, + "start": Object { + "column": 16, + "line": 9, + }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 9, + }, + "start": Object { + "column": 17, + "line": 9, + }, + }, + "name": "T", + "range": Array [ + 175, + 176, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 174, + 177, + ], + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 158, - 206, - ], - "type": "VariableDeclaration", }, ], "loc": Object { @@ -20323,6 +20302,7 @@ Object { ], "type": "ClassBody", }, + "declare": true, "id": Object { "loc": Object { "end": Object { @@ -20601,7 +20581,7 @@ Object { "body": Array [ Object { "async": false, - "body": null, + "declare": true, "expression": false, "generator": false, "id": Object { @@ -20724,7 +20704,7 @@ Object { "type": "TSStringKeyword", }, }, - "type": "DeclareFunction", + "type": "TSDeclareFunction", }, ], "loc": Object { @@ -23006,112 +22986,92 @@ Object { "body": Array [ Object { "declaration": Object { - "declarations": Array [ - Object { - "id": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "TestAlias", + "range": Array [ + 12, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 40, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 39, + ], + "type": "TSUnionType", + "types": Array [ + Object { "loc": Object { "end": Object { - "column": 21, + "column": 30, "line": 1, }, "start": Object { - "column": 12, + "column": 24, "line": 1, }, }, - "name": "TestAlias", "range": Array [ - 12, - 21, + 24, + 30, ], - "type": "Identifier", + "type": "TSStringKeyword", }, - "init": Object { + Object { "loc": Object { "end": Object { "column": 39, "line": 1, }, "start": Object { - "column": 24, + "column": 33, "line": 1, }, }, "range": Array [ - 24, + 33, 39, ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 30, - ], - "type": "TSStringKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 39, - ], - "type": "TSNumberKeyword", - }, - ], - }, - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, + "type": "TSNumberKeyword", }, - "range": Array [ - 12, - 40, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, + ], }, - "range": Array [ - 7, - 40, - ], - "type": "VariableDeclaration", }, "loc": Object { "end": Object { @@ -23302,148 +23262,128 @@ Object { "body": Array [ Object { "declaration": Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "TestClassProps", + "range": Array [ + 12, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 51, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, }, + "name": "count", + "range": Array [ + 35, + 40, + ], + "type": "Identifier", }, - "name": "TestClassProps", - "range": Array [ - 12, - 26, - ], - "type": "Identifier", - }, - "init": Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 17, + "line": 2, }, "start": Object { - "column": 29, - "line": 1, + "column": 4, + "line": 2, }, }, - "members": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "count", - "range": Array [ - 35, - 40, - ], - "type": "Identifier", + "range": Array [ + 35, + 48, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, }, + }, + "range": Array [ + 40, + 48, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { "column": 17, "line": 2, }, "start": Object { - "column": 4, + "column": 11, "line": 2, }, }, "range": Array [ - 35, + 42, 48, ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 40, - 48, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 42, - 48, - ], - "type": "TSNumberKeyword", - }, - }, + "type": "TSNumberKeyword", }, - ], - "range": Array [ - 29, - 50, - ], - "type": "TSTypeLiteral", - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 1, }, }, - "range": Array [ - 12, - 51, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, + ], + "range": Array [ + 29, + 50, + ], + "type": "TSTypeLiteral", }, - "range": Array [ - 7, - 51, - ], - "type": "VariableDeclaration", }, "loc": Object { "end": Object { @@ -23670,165 +23610,145 @@ Object { "body": Array [ Object { "declaration": Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "TestCallback", - "range": Array [ - 12, - 24, - ], - "type": "Identifier", + "id": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "TestCallback", + "range": Array [ + 12, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 47, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, }, - "init": Object { + }, + "parameters": Array [ + Object { "loc": Object { "end": Object { - "column": 46, + "column": 37, "line": 1, }, "start": Object { - "column": 27, + "column": 28, "line": 1, }, }, - "parameters": Array [ - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 28, - 37, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 37, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 37, - ], - "type": "TSNumberKeyword", - }, - }, - }, - ], + "name": "a", "range": Array [ - 27, - 46, + 28, + 37, ], - "type": "TSFunctionType", + "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 46, + "column": 37, "line": 1, }, "start": Object { - "column": 40, + "column": 29, "line": 1, }, }, "range": Array [ - 40, - 46, + 29, + 37, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 46, + "column": 37, "line": 1, }, "start": Object { - "column": 42, + "column": 31, "line": 1, }, }, "range": Array [ - 42, - 46, + 31, + 37, ], - "type": "TSVoidKeyword", + "type": "TSNumberKeyword", }, }, - "typeParameters": null, }, + ], + "range": Array [ + 27, + 46, + ], + "type": "TSFunctionType", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 47, + "column": 46, "line": 1, }, "start": Object { - "column": 12, + "column": 40, "line": 1, }, }, "range": Array [ - 12, - 47, + 40, + 46, ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 46, + ], + "type": "TSVoidKeyword", + }, }, + "typeParameters": null, }, - "range": Array [ - 7, - 47, - ], - "type": "VariableDeclaration", }, "loc": Object { "end": Object { @@ -28778,296 +28698,256 @@ exports[`typescript fixtures/basics/import-type.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, }, - "init": Object { - "isTypeOf": true, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "isTypeOf": true, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "parameter": Object { + "literal": Object { "loc": Object { "end": Object { - "column": 27, + "column": 26, "line": 1, }, "start": Object { - "column": 9, + "column": 23, "line": 1, }, }, - "parameter": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 26, - ], - "raw": "'A'", - "type": "Literal", - "value": "A", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "TSLiteralType", - }, - "qualifier": null, "range": Array [ - 9, - 27, + 23, + 26, ], - "type": "TSImportType", - "typeParameters": null, + "raw": "'A'", + "type": "Literal", + "value": "A", }, "loc": Object { "end": Object { - "column": 28, + "column": 26, "line": 1, }, "start": Object { - "column": 5, + "column": 23, "line": 1, }, }, "range": Array [ - 5, - 28, + 23, + 26, ], - "type": "VariableDeclarator", + "type": "TSLiteralType", }, - ], - "kind": "type", + "qualifier": null, + "range": Array [ + 9, + 27, + ], + "type": "TSImportType", + "typeParameters": null, + }, + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "B", + "range": Array [ + 34, + 35, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 26, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, "range": Array [ - 0, - 28, + 29, + 55, ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "id": Object { + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "isTypeOf": false, + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "parameter": Object { + "literal": Object { "loc": Object { "end": Object { - "column": 6, + "column": 19, "line": 2, }, "start": Object { - "column": 5, + "column": 16, "line": 2, }, }, - "name": "B", "range": Array [ - 34, - 35, + 45, + 48, ], - "type": "Identifier", + "raw": "\\"B\\"", + "type": "Literal", + "value": "B", }, - "init": Object { - "isTypeOf": false, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, }, - "parameter": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 45, - 48, - ], - "raw": "\\"B\\"", - "type": "Literal", - "value": "B", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 45, - 48, - ], - "type": "TSLiteralType", + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 45, + 48, + ], + "type": "TSLiteralType", + }, + "qualifier": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "name": "X", + "range": Array [ + 50, + 51, + ], + "type": "Identifier", + }, + "range": Array [ + 38, + 54, + ], + "type": "TSImportType", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, }, - "qualifier": Object { + "start": Object { + "column": 22, + "line": 2, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 22, + "column": 24, "line": 2, }, "start": Object { - "column": 21, + "column": 23, "line": 2, }, }, - "name": "X", "range": Array [ - 50, - 51, + 52, + 53, ], - "type": "Identifier", - }, - "range": Array [ - 38, - 54, - ], - "type": "TSImportType", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, }, - "range": Array [ - 52, - 53, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "Y", - "range": Array [ - 52, - 53, - ], - "type": "Identifier", + "start": Object { + "column": 23, + "line": 2, }, }, - ], - "range": Array [ - 51, - 54, - ], - "type": "TSTypeParameterInstantiation", + "name": "Y", + "range": Array [ + 52, + 53, + ], + "type": "Identifier", + }, }, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, + ], "range": Array [ - 34, - 55, + 51, + 54, ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, + "type": "TSTypeParameterInstantiation", }, }, - "range": Array [ - 29, - 55, - ], - "type": "VariableDeclaration", }, ], "loc": Object { @@ -29491,221 +29371,201 @@ exports[`typescript fixtures/basics/import-type-with-type-parameters-in-type-ref Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 30, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 29, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, }, - "name": "X", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", }, - "init": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "name": "A", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, }, - "range": Array [ - 9, - 29, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", + "start": Object { + "column": 10, + "line": 1, }, - "typeParameters": Object { + }, + "params": Array [ + Object { + "isTypeOf": false, "loc": Object { "end": Object { - "column": 29, + "column": 28, "line": 1, }, "start": Object { - "column": 10, + "column": 11, "line": 1, }, }, - "params": Array [ - Object { - "isTypeOf": false, + "parameter": Object { + "literal": Object { "loc": Object { "end": Object { - "column": 28, + "column": 20, "line": 1, }, "start": Object { - "column": 11, + "column": 18, "line": 1, }, }, - "parameter": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "raw": "\\"\\"", - "type": "Literal", - "value": "", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "TSLiteralType", - }, - "qualifier": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "B", - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - }, "range": Array [ - 11, - 28, + 18, + 20, ], - "type": "TSImportType", - "typeParameters": Object { + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 20, + ], + "type": "TSLiteralType", + }, + "qualifier": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "B", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "range": Array [ + 11, + 28, + ], + "type": "TSImportType", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 28, + "column": 27, "line": 1, }, "start": Object { - "column": 23, + "column": 24, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 27, - ], - "type": "TSAnyKeyword", - }, - ], "range": Array [ - 23, - 28, + 24, + 27, ], - "type": "TSTypeParameterInstantiation", + "type": "TSAnyKeyword", }, - }, - ], - "range": Array [ - 10, - 29, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, + ], + "range": Array [ + 23, + 28, + ], + "type": "TSTypeParameterInstantiation", + }, }, - }, + ], "range": Array [ - 5, - 30, + 10, + 29, ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "TSTypeParameterInstantiation", }, }, - "range": Array [ - 0, - 30, - ], - "type": "VariableDeclaration", }, ], "loc": Object { @@ -30021,7 +29881,6 @@ exports[`typescript fixtures/basics/interface-extends.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [], "loc": Object { @@ -30245,7 +30104,6 @@ exports[`typescript fixtures/basics/interface-extends-multiple.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [], "loc": Object { @@ -30540,7 +30398,6 @@ exports[`typescript fixtures/basics/interface-type-parameters.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [], "loc": Object { @@ -30783,7 +30640,6 @@ exports[`typescript fixtures/basics/interface-with-all-property-types.src 1`] = Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [ Object { @@ -34082,7 +33938,6 @@ exports[`typescript fixtures/basics/interface-with-construct-signature-with-para Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [ Object { @@ -34489,7 +34344,6 @@ exports[`typescript fixtures/basics/interface-with-extends-type-parameters.src 1 Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [], "loc": Object { @@ -34912,7 +34766,6 @@ exports[`typescript fixtures/basics/interface-with-generic.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [], "loc": Object { @@ -35155,7 +35008,6 @@ exports[`typescript fixtures/basics/interface-with-jsdoc.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [ Object { @@ -35457,7 +35309,6 @@ exports[`typescript fixtures/basics/interface-with-optional-properties.src 1`] = Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [ Object { @@ -36245,7 +36096,6 @@ exports[`typescript fixtures/basics/interface-without-type-annotation.src 1`] = Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [ Object { @@ -36470,97 +36320,24 @@ exports[`typescript fixtures/basics/keyof-operator.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "operator": "keyof", - "range": Array [ - 9, - 18, - ], - "type": "TSTypeOperator", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - }, - }, + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, + "start": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 5, - 19, - ], - "type": "VariableDeclarator", }, - ], - "kind": "type", + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { "column": 19, @@ -36575,7 +36352,60 @@ Object { 0, 19, ], - "type": "VariableDeclaration", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "operator": "keyof", + "range": Array [ + 9, + 18, + ], + "type": "TSTypeOperator", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 18, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, + }, + }, }, ], "loc": Object { @@ -40505,30 +40335,60 @@ exports[`typescript fixtures/basics/type-alias-declaration.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Result", - "range": Array [ - 5, - 11, - ], - "type": "Identifier", + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, }, - "init": Object { + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Result", + "range": Array [ + 5, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 37, + ], + "type": "TSUnionType", + "types": Array [ + Object { "loc": Object { "end": Object { - "column": 37, + "column": 27, "line": 1, }, "start": Object { @@ -40538,206 +40398,156 @@ Object { }, "range": Array [ 17, - 37, + 27, ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, }, - "range": Array [ - 17, - 27, - ], - "type": "TSTypeReference", - "typeName": Object { + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "Success", + "range": Array [ + 17, + 24, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 24, + "column": 26, "line": 1, }, "start": Object { - "column": 17, + "column": 25, "line": 1, }, }, - "name": "Success", "range": Array [ - 17, - 24, + 25, + 26, ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, }, - "range": Array [ - 25, - 26, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 25, - 26, - ], - "type": "Identifier", + "start": Object { + "column": 25, + "line": 1, }, }, - ], - "range": Array [ - 24, - 27, - ], - "type": "TSTypeParameterInstantiation", + "name": "T", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, }, + ], + "range": Array [ + 24, + 27, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 37, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, }, - "range": Array [ - 30, - 37, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "Failure", - "range": Array [ - 30, - 37, - ], - "type": "Identifier", + "start": Object { + "column": 30, + "line": 1, }, }, - ], - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, + "name": "Failure", + "range": Array [ + 30, + 37, + ], + "type": "Identifier", }, }, - "range": Array [ - 5, - 37, - ], - "type": "VariableDeclarator", - "typeParameters": Object { + ], + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 14, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 12, - 13, - ], - "type": "TSTypeParameter", - }, - ], + "name": "T", "range": Array [ - 11, - 14, + 12, + 13, ], - "type": "TSTypeParameterDeclaration", + "type": "TSTypeParameter", }, - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + ], + "range": Array [ + 11, + 14, + ], + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 37, - ], - "type": "VariableDeclaration", }, ], "loc": Object { @@ -40981,30 +40791,60 @@ exports[`typescript fixtures/basics/type-alias-declaration-with-constrained-type Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Result", - "range": Array [ - 5, - 11, - ], - "type": "Identifier", + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, }, - "init": Object { + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Result", + "range": Array [ + 5, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 48, + ], + "type": "TSUnionType", + "types": Array [ + Object { "loc": Object { "end": Object { - "column": 48, + "column": 38, "line": 1, }, "start": Object { @@ -41014,224 +40854,174 @@ Object { }, "range": Array [ 28, - 48, + 38, ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, }, - "range": Array [ - 28, - 38, - ], - "type": "TSTypeReference", - "typeName": Object { + "start": Object { + "column": 28, + "line": 1, + }, + }, + "name": "Success", + "range": Array [ + 28, + 35, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 35, + "column": 37, "line": 1, }, "start": Object { - "column": 28, + "column": 36, "line": 1, }, }, - "name": "Success", "range": Array [ - 28, - 35, + 36, + 37, ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, }, - "range": Array [ - 36, - 37, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 36, - 37, - ], - "type": "Identifier", + "start": Object { + "column": 36, + "line": 1, }, }, - ], - "range": Array [ - 35, - 38, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 48, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, + "name": "T", + "range": Array [ + 36, + 37, + ], + "type": "Identifier", }, - "name": "Failure", - "range": Array [ - 41, - 48, - ], - "type": "Identifier", }, - }, - ], - }, - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, + ], + "range": Array [ + 35, + 38, + ], + "type": "TSTypeParameterInstantiation", }, }, - "range": Array [ - 5, - 48, - ], - "type": "VariableDeclarator", - "typeParameters": Object { + Object { "loc": Object { "end": Object { - "column": 25, + "column": 48, "line": 1, }, "start": Object { - "column": 11, + "column": 41, "line": 1, }, }, - "params": Array [ - Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "members": Array [], - "range": Array [ - 22, - 24, - ], - "type": "TSTypeLiteral", + "range": Array [ + 41, + 48, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, + "start": Object { + "column": 41, + "line": 1, }, - "name": "T", - "range": Array [ - 12, - 24, - ], - "type": "TSTypeParameter", }, - ], + "name": "Failure", + "range": Array [ + 41, + 48, + ], + "type": "Identifier", + }, + }, + ], + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "params": Array [ + Object { + "constraint": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "members": Array [], + "range": Array [ + 22, + 24, + ], + "type": "TSTypeLiteral", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "T", "range": Array [ - 11, - 25, + 12, + 24, ], - "type": "TSTypeParameterDeclaration", + "type": "TSTypeParameter", }, - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + ], + "range": Array [ + 11, + 25, + ], + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 48, - ], - "type": "VariableDeclaration", }, ], "loc": Object { @@ -41529,184 +41319,164 @@ exports[`typescript fixtures/basics/type-alias-object-without-annotation.src 1`] Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 30, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, }, + "name": "bar", + "range": Array [ + 12, + 15, + ], + "type": "Identifier", }, - "name": "foo", - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - }, - "init": Object { "loc": Object { "end": Object { - "column": 29, + "column": 24, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, - "members": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 12, - 15, - ], - "type": "Identifier", + "range": Array [ + 12, + 24, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, }, + }, + "range": Array [ + 15, + 23, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 24, + "column": 23, "line": 1, }, "start": Object { - "column": 12, + "column": 17, "line": 1, }, }, "range": Array [ - 12, - 24, + 17, + 23, ], - "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", - }, - }, + "type": "TSStringKeyword", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 25, - 28, - ], - "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, + "start": Object { + "column": 25, + "line": 1, }, - "range": Array [ - 25, - 28, - ], - "type": "TSPropertySignature", }, - ], - "range": Array [ - 11, - 29, - ], - "type": "TSTypeLiteral", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, + "name": "baz", + "range": Array [ + 25, + 28, + ], + "type": "Identifier", }, - "start": Object { - "column": 5, - "line": 1, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, }, + "range": Array [ + 25, + 28, + ], + "type": "TSPropertySignature", }, - "range": Array [ - 5, - 30, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + ], + "range": Array [ + 11, + 29, + ], + "type": "TSTypeLiteral", }, - "range": Array [ - 0, - 30, - ], - "type": "VariableDeclaration", }, ], "loc": Object { @@ -43885,7 +43655,6 @@ exports[`typescript fixtures/basics/typed-this.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [ Object { @@ -44665,79 +44434,24 @@ exports[`typescript fixtures/basics/unique-symbol.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "operator": "unique", - "range": Array [ - 9, - 22, - ], - "type": "TSTypeOperator", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "TSSymbolKeyword", - }, + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, + "start": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 5, - 23, - ], - "type": "VariableDeclarator", }, - ], - "kind": "type", + "name": "A", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { "column": 23, @@ -44752,7 +44466,42 @@ Object { 0, 23, ], - "type": "VariableDeclaration", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "operator": "unique", + "range": Array [ + 9, + 22, + ], + "type": "TSTypeOperator", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 22, + ], + "type": "TSSymbolKeyword", + }, + }, }, ], "loc": Object { @@ -46261,45 +46010,1611 @@ Object { "type": "Literal", "value": "Bar", }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 34, + 53, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 30, + 54, + ], + "type": "VariableDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/basics/variable-declaration-type-annotation-spacing.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "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", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "type": "VariableDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/declare/abstract-class.src 1`] = ` +Object { + "body": Array [ + Object { + "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, + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 23, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "superClass": null, + "type": "TSAbstractClassDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/declare/class.src 1`] = ` +Object { + "body": Array [ + Object { + "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, + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/declare/enum.src 1`] = ` +Object { + "body": Array [ + Object { + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "members": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "Bar", + "range": Array [ + 23, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 23, + 26, + ], + "type": "TSEnumMember", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "Baz", + "range": Array [ + 32, + 35, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/declare/function.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "declare": true, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/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, + "heritage": Array [], + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/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 [ - 34, - 53, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 19, + 23, + ], + "type": "TSModuleBlock", + }, + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 30, - 54, + 0, + 23, ], - "type": "VariableDeclaration", + "type": "TSModuleDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 4, }, "start": Object { "column": 0, @@ -46308,14 +47623,14 @@ Object { }, "range": Array [ 0, - 55, + 24, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 7, "line": 1, }, "start": Object { @@ -46325,64 +47640,179 @@ Object { }, "range": Array [ 0, - 3, + 7, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "declare", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 14, "line": 1, }, "start": Object { - "column": 4, + "column": 8, "line": 1, }, }, "range": Array [ - 4, 8, + 14, ], "type": "Identifier", - "value": "name", + "value": "module", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 18, "line": 1, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, "range": Array [ - 8, - 9, + 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": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/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, + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "type": "TSModuleDeclaration", + }, + ], + "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": 9, + "column": 0, "line": 1, }, }, "range": Array [ - 9, - 15, + 0, + 7, ], "type": "Identifier", - "value": "string", + "value": "declare", }, Object { "loc": Object { @@ -46391,21 +47821,21 @@ Object { "line": 1, }, "start": Object { - "column": 16, + "column": 8, "line": 1, }, }, "range": Array [ - 16, + 8, 17, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "namespace", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 21, "line": 1, }, "start": Object { @@ -46415,161 +47845,221 @@ Object { }, "range": Array [ 18, - 28, + 21, ], - "type": "String", - "value": "\\"Nicholas\\"", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 23, "line": 1, }, "start": Object { - "column": 28, + "column": 22, "line": 1, }, }, "range": Array [ - 28, - 29, + 22, + 23, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { "column": 0, - "line": 2, + "line": 3, }, }, "range": Array [ - 30, - 33, + 25, + 26, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/declare/type-alias.src 1`] = ` +Object { + "body": Array [ Object { + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 34, - 37, + 0, + 25, ], - "type": "Identifier", - "value": "foo", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "TSStringKeyword", + }, + }, + ], + "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": 8, - "line": 2, + "column": 7, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 37, - 38, + 0, + 7, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "declare", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 39, - 45, + 8, + 12, ], "type": "Identifier", - "value": "string", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 46, - 47, + 13, + 16, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 48, - 53, + 17, + 18, ], - "type": "String", - "value": "\\"Bar\\"", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ - 53, - 54, + 19, + 25, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "string", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/variable-declaration-type-annotation-spacing.src 1`] = ` +exports[`typescript fixtures/declare/variable.src 1`] = ` Object { "body": Array [ Object { @@ -46578,77 +48068,78 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 21, + "column": 20, "line": 1, }, "start": Object { - "column": 4, + "column": 12, "line": 1, }, }, - "name": "x", + "name": "foo", "range": Array [ - 4, - 21, + 12, + 20, ], "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 21, + "column": 20, "line": 1, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, "range": Array [ - 8, - 21, + 15, + 20, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 21, + "column": 20, "line": 1, }, "start": Object { - "column": 15, + "column": 17, "line": 1, }, }, "range": Array [ - 15, - 21, + 17, + 20, ], - "type": "TSStringKeyword", + "type": "TSAnyKeyword", }, }, }, "init": null, "loc": Object { "end": Object { - "column": 21, + "column": 20, "line": 1, }, "start": Object { - "column": 4, + "column": 12, "line": 1, }, }, "range": Array [ - 4, - 21, + 12, + 20, ], "type": "VariableDeclarator", }, ], - "kind": "let", + "declare": true, + "kind": "var", "loc": Object { "end": Object { - "column": 22, + "column": 21, "line": 1, }, "start": Object { @@ -46658,15 +48149,15 @@ Object { }, "range": Array [ 0, - 22, + 21, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -46682,7 +48173,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 3, + "column": 7, "line": 1, }, "start": Object { @@ -46692,43 +48183,61 @@ Object { }, "range": Array [ 0, - 3, + 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": "let", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 15, "line": 1, }, "start": Object { - "column": 4, + "column": 12, "line": 1, }, }, "range": Array [ - 4, - 5, + 12, + 15, ], "type": "Identifier", - "value": "x", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 16, "line": 1, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, "range": Array [ - 8, - 9, + 15, + 16, ], "type": "Punctuator", "value": ":", @@ -46736,35 +48245,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 20, "line": 1, }, "start": Object { - "column": 15, + "column": 17, "line": 1, }, }, "range": Array [ - 15, - 21, + 17, + 20, ], "type": "Identifier", - "value": "string", + "value": "any", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 21, "line": 1, }, "start": Object { - "column": 21, + "column": 20, "line": 1, }, }, "range": Array [ + 20, 21, - 22, ], "type": "Punctuator", "value": ";", @@ -58688,7 +60197,6 @@ exports[`typescript fixtures/errorRecovery/decorator-on-interface-declaration.sr Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [], "loc": Object { @@ -59643,7 +61151,6 @@ exports[`typescript fixtures/errorRecovery/interface-empty-extends.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [], "loc": Object { @@ -59813,7 +61320,6 @@ exports[`typescript fixtures/errorRecovery/interface-property-modifiers.src 1`] Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [ Object { @@ -66032,7 +67538,6 @@ Object { Object { "declaration": Object { "async": false, - "body": null, "expression": false, "generator": false, "id": Object { @@ -68308,7 +69813,6 @@ Object { "body": Array [ Object { "declaration": Object { - "abstract": false, "body": Object { "body": Array [ Object { From fb10ef237230b824caac43f417e37d7339de198f Mon Sep 17 00:00:00 2001 From: Armano Date: Wed, 19 Dec 2018 03:16:11 +0100 Subject: [PATCH 06/30] refactor: mark AsteriskAsteriskEquals as assignment operator (#46) --- src/convert.ts | 12 +--- src/node-utils.ts | 137 +++++++++++++++++++++++----------------------- 2 files changed, 71 insertions(+), 78 deletions(-) diff --git a/src/convert.ts b/src/convert.ts index 3dd82d5..7ebf1c4 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -1758,7 +1758,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.PrefixUnaryExpression: case SyntaxKind.PostfixUnaryExpression: { - const operator = nodeUtils.getTextForTokenKind(node.operator); + const operator = nodeUtils.getTextForTokenKind(node.operator) || ''; Object.assign(result, { /** * ESTree uses UpdateExpression for ++/-- @@ -1836,16 +1836,6 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { } else { (result as any).expressions.push(right); } - } else if ( - node.operatorToken && - node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken - ) { - Object.assign(result, { - type: AST_NODE_TYPES.AssignmentExpression, - operator: nodeUtils.getTextForTokenKind(node.operatorToken.kind), - left: convertChild(node.left), - right: convertChild(node.right) - }); } else { Object.assign(result, { type: nodeUtils.getBinaryExpressionType(node.operatorToken), diff --git a/src/node-utils.ts b/src/node-utils.ts index 8630177..1249a92 100644 --- a/src/node-utils.ts +++ b/src/node-utils.ts @@ -12,14 +12,16 @@ import { ESTreeToken } from './temp-types-based-on-js-source'; import { TSNode } from './ts-nodes'; +import { AST_NODE_TYPES } from './ast-node-types'; const SyntaxKind = ts.SyntaxKind; -const ASSIGNMENT_OPERATORS = [ +const ASSIGNMENT_OPERATORS: ts.AssignmentOperator[] = [ SyntaxKind.EqualsToken, SyntaxKind.PlusEqualsToken, SyntaxKind.MinusEqualsToken, SyntaxKind.AsteriskEqualsToken, + SyntaxKind.AsteriskAsteriskEqualsToken, SyntaxKind.SlashEqualsToken, SyntaxKind.PercentEqualsToken, SyntaxKind.LessThanLessThanEqualsToken, @@ -30,72 +32,73 @@ const ASSIGNMENT_OPERATORS = [ SyntaxKind.CaretEqualsToken ]; -const LOGICAL_OPERATORS = [ +const LOGICAL_OPERATORS: ts.LogicalOperator[] = [ SyntaxKind.BarBarToken, SyntaxKind.AmpersandAmpersandToken ]; -const TOKEN_TO_TEXT: { [key: number]: string } = {}; -TOKEN_TO_TEXT[SyntaxKind.OpenBraceToken] = '{'; -TOKEN_TO_TEXT[SyntaxKind.CloseBraceToken] = '}'; -TOKEN_TO_TEXT[SyntaxKind.OpenParenToken] = '('; -TOKEN_TO_TEXT[SyntaxKind.CloseParenToken] = ')'; -TOKEN_TO_TEXT[SyntaxKind.OpenBracketToken] = '['; -TOKEN_TO_TEXT[SyntaxKind.CloseBracketToken] = ']'; -TOKEN_TO_TEXT[SyntaxKind.DotToken] = '.'; -TOKEN_TO_TEXT[SyntaxKind.DotDotDotToken] = '...'; -TOKEN_TO_TEXT[SyntaxKind.SemicolonToken] = ';'; -TOKEN_TO_TEXT[SyntaxKind.CommaToken] = ','; -TOKEN_TO_TEXT[SyntaxKind.LessThanToken] = '<'; -TOKEN_TO_TEXT[SyntaxKind.GreaterThanToken] = '>'; -TOKEN_TO_TEXT[SyntaxKind.LessThanEqualsToken] = '<='; -TOKEN_TO_TEXT[SyntaxKind.GreaterThanEqualsToken] = '>='; -TOKEN_TO_TEXT[SyntaxKind.EqualsEqualsToken] = '=='; -TOKEN_TO_TEXT[SyntaxKind.ExclamationEqualsToken] = '!='; -TOKEN_TO_TEXT[SyntaxKind.EqualsEqualsEqualsToken] = '==='; -TOKEN_TO_TEXT[SyntaxKind.InstanceOfKeyword] = 'instanceof'; -TOKEN_TO_TEXT[SyntaxKind.ExclamationEqualsEqualsToken] = '!=='; -TOKEN_TO_TEXT[SyntaxKind.EqualsGreaterThanToken] = '=>'; -TOKEN_TO_TEXT[SyntaxKind.PlusToken] = '+'; -TOKEN_TO_TEXT[SyntaxKind.MinusToken] = '-'; -TOKEN_TO_TEXT[SyntaxKind.AsteriskToken] = '*'; -TOKEN_TO_TEXT[SyntaxKind.AsteriskAsteriskToken] = '**'; -TOKEN_TO_TEXT[SyntaxKind.SlashToken] = '/'; -TOKEN_TO_TEXT[SyntaxKind.PercentToken] = '%'; -TOKEN_TO_TEXT[SyntaxKind.PlusPlusToken] = '++'; -TOKEN_TO_TEXT[SyntaxKind.MinusMinusToken] = '--'; -TOKEN_TO_TEXT[SyntaxKind.LessThanLessThanToken] = '<<'; -TOKEN_TO_TEXT[SyntaxKind.LessThanSlashToken] = '>'; -TOKEN_TO_TEXT[SyntaxKind.GreaterThanGreaterThanGreaterThanToken] = '>>>'; -TOKEN_TO_TEXT[SyntaxKind.AmpersandToken] = '&'; -TOKEN_TO_TEXT[SyntaxKind.BarToken] = '|'; -TOKEN_TO_TEXT[SyntaxKind.CaretToken] = '^'; -TOKEN_TO_TEXT[SyntaxKind.ExclamationToken] = '!'; -TOKEN_TO_TEXT[SyntaxKind.TildeToken] = '~'; -TOKEN_TO_TEXT[SyntaxKind.AmpersandAmpersandToken] = '&&'; -TOKEN_TO_TEXT[SyntaxKind.BarBarToken] = '||'; -TOKEN_TO_TEXT[SyntaxKind.QuestionToken] = '?'; -TOKEN_TO_TEXT[SyntaxKind.ColonToken] = ':'; -TOKEN_TO_TEXT[SyntaxKind.EqualsToken] = '='; -TOKEN_TO_TEXT[SyntaxKind.PlusEqualsToken] = '+='; -TOKEN_TO_TEXT[SyntaxKind.MinusEqualsToken] = '-='; -TOKEN_TO_TEXT[SyntaxKind.AsteriskEqualsToken] = '*='; -TOKEN_TO_TEXT[SyntaxKind.AsteriskAsteriskEqualsToken] = '**='; -TOKEN_TO_TEXT[SyntaxKind.SlashEqualsToken] = '/='; -TOKEN_TO_TEXT[SyntaxKind.PercentEqualsToken] = '%='; -TOKEN_TO_TEXT[SyntaxKind.LessThanLessThanEqualsToken] = '<<='; -TOKEN_TO_TEXT[SyntaxKind.GreaterThanGreaterThanEqualsToken] = '>>='; -TOKEN_TO_TEXT[SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken] = '>>>='; -TOKEN_TO_TEXT[SyntaxKind.AmpersandEqualsToken] = '&='; -TOKEN_TO_TEXT[SyntaxKind.BarEqualsToken] = '|='; -TOKEN_TO_TEXT[SyntaxKind.CaretEqualsToken] = '^='; -TOKEN_TO_TEXT[SyntaxKind.AtToken] = '@'; -TOKEN_TO_TEXT[SyntaxKind.InKeyword] = 'in'; -TOKEN_TO_TEXT[SyntaxKind.UniqueKeyword] = 'unique'; -TOKEN_TO_TEXT[SyntaxKind.KeyOfKeyword] = 'keyof'; -TOKEN_TO_TEXT[SyntaxKind.NewKeyword] = 'new'; -TOKEN_TO_TEXT[SyntaxKind.ImportKeyword] = 'import'; +const TOKEN_TO_TEXT: { readonly [P in ts.SyntaxKind]?: string } = { + [SyntaxKind.OpenBraceToken]: '{', + [SyntaxKind.CloseBraceToken]: '}', + [SyntaxKind.OpenParenToken]: '(', + [SyntaxKind.CloseParenToken]: ')', + [SyntaxKind.OpenBracketToken]: '[', + [SyntaxKind.CloseBracketToken]: ']', + [SyntaxKind.DotToken]: '.', + [SyntaxKind.DotDotDotToken]: '...', + [SyntaxKind.SemicolonToken]: ',', + [SyntaxKind.CommaToken]: ',', + [SyntaxKind.LessThanToken]: '<', + [SyntaxKind.GreaterThanToken]: '>', + [SyntaxKind.LessThanEqualsToken]: '<=', + [SyntaxKind.GreaterThanEqualsToken]: '>=', + [SyntaxKind.EqualsEqualsToken]: '==', + [SyntaxKind.ExclamationEqualsToken]: '!=', + [SyntaxKind.EqualsEqualsEqualsToken]: '===', + [SyntaxKind.InstanceOfKeyword]: 'instanceof', + [SyntaxKind.ExclamationEqualsEqualsToken]: '!==', + [SyntaxKind.EqualsGreaterThanToken]: '=>', + [SyntaxKind.PlusToken]: '+', + [SyntaxKind.MinusToken]: '-', + [SyntaxKind.AsteriskToken]: '*', + [SyntaxKind.AsteriskAsteriskToken]: '**', + [SyntaxKind.SlashToken]: '/', + [SyntaxKind.PercentToken]: '%', + [SyntaxKind.PlusPlusToken]: '++', + [SyntaxKind.MinusMinusToken]: '--', + [SyntaxKind.LessThanLessThanToken]: '<<', + [SyntaxKind.LessThanSlashToken]: '>', + [SyntaxKind.GreaterThanGreaterThanGreaterThanToken]: '>>>', + [SyntaxKind.AmpersandToken]: '&', + [SyntaxKind.BarToken]: '|', + [SyntaxKind.CaretToken]: '^', + [SyntaxKind.ExclamationToken]: '!', + [SyntaxKind.TildeToken]: '~', + [SyntaxKind.AmpersandAmpersandToken]: '&&', + [SyntaxKind.BarBarToken]: '||', + [SyntaxKind.QuestionToken]: '?', + [SyntaxKind.ColonToken]: ':', + [SyntaxKind.EqualsToken]: '=', + [SyntaxKind.PlusEqualsToken]: '+=', + [SyntaxKind.MinusEqualsToken]: '-=', + [SyntaxKind.AsteriskEqualsToken]: '*=', + [SyntaxKind.AsteriskAsteriskEqualsToken]: '**=', + [SyntaxKind.SlashEqualsToken]: '/=', + [SyntaxKind.PercentEqualsToken]: '%=', + [SyntaxKind.LessThanLessThanEqualsToken]: '<<=', + [SyntaxKind.GreaterThanGreaterThanEqualsToken]: '>>=', + [SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken]: '>>>=', + [SyntaxKind.AmpersandEqualsToken]: '&=', + [SyntaxKind.BarEqualsToken]: '|=', + [SyntaxKind.CaretEqualsToken]: '^=', + [SyntaxKind.AtToken]: '@', + [SyntaxKind.InKeyword]: 'in', + [SyntaxKind.UniqueKeyword]: 'unique', + [SyntaxKind.KeyOfKeyword]: 'keyof', + [SyntaxKind.NewKeyword]: 'new', + [SyntaxKind.ImportKeyword]: 'import' +}; /** * Find the first matching child based on the given sourceFile and predicate function. @@ -188,7 +191,7 @@ function isLogicalOperator(operator: ts.Token): boolean { * @param {number} kind the token's SyntaxKind * @returns {string} the token applicable token as a string */ -function getTextForTokenKind(kind: number): string { +function getTextForTokenKind(kind: ts.SyntaxKind): string | undefined { return TOKEN_TO_TEXT[kind]; } @@ -252,11 +255,11 @@ function isJSDocComment(node: ts.Node): boolean { */ function getBinaryExpressionType(operator: ts.Token): string { if (isAssignmentOperator(operator)) { - return 'AssignmentExpression'; + return AST_NODE_TYPES.AssignmentExpression; } else if (isLogicalOperator(operator)) { - return 'LogicalExpression'; + return AST_NODE_TYPES.LogicalExpression; } - return 'BinaryExpression'; + return AST_NODE_TYPES.BinaryExpression; } /** From 4ecdb8b299a69e11fecde3f371424c732ba38af2 Mon Sep 17 00:00:00 2001 From: Armano Date: Wed, 19 Dec 2018 03:24:12 +0100 Subject: [PATCH 07/30] refactor: remove internal typescript method call with hasModifier (#48) --- src/convert.ts | 9 ++++++--- src/node-utils.ts | 21 +++++---------------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/src/convert.ts b/src/convert.ts index 7ebf1c4..747849b 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -952,7 +952,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { key: convertChild(node.name), value: convertChild(node.initializer), computed: nodeUtils.isComputedProperty(node.name), - static: nodeUtils.hasStaticModifierFlag(node), + static: nodeUtils.hasModifier(SyntaxKind.StaticKeyword, node), readonly: nodeUtils.hasModifier(SyntaxKind.ReadonlyKeyword, node) || undefined }); @@ -1062,7 +1062,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { key: convertChild(node.name), value: method, computed: nodeUtils.isComputedProperty(node.name), - static: nodeUtils.hasStaticModifierFlag(node), + static: nodeUtils.hasModifier(SyntaxKind.StaticKeyword, node), kind: 'method' }); @@ -1107,7 +1107,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { // TypeScript uses this even for static methods named "constructor" case SyntaxKind.Constructor: { - const constructorIsStatic = nodeUtils.hasStaticModifierFlag(node), + const constructorIsStatic = nodeUtils.hasModifier( + SyntaxKind.StaticKeyword, + node + ), constructorIsAbstract = nodeUtils.hasModifier( SyntaxKind.AbstractKeyword, node diff --git a/src/node-utils.ts b/src/node-utils.ts index 1249a92..fe6ef76 100644 --- a/src/node-utils.ts +++ b/src/node-utils.ts @@ -145,7 +145,6 @@ export default { isJSXToken, getDeclarationKind, getTSNodeAccessibility, - hasStaticModifierFlag, findNextToken, findFirstMatchingToken, findChildOfKind, @@ -206,11 +205,14 @@ function isESTreeClassMember(node: ts.Node): boolean { /** * Checks if a ts.Node has a modifier - * @param {number} modifierKind TypeScript SyntaxKind modifier + * @param {ts.KeywordSyntaxKind} modifierKind TypeScript SyntaxKind modifier * @param {ts.Node} node TypeScript AST node * @returns {boolean} has the modifier specified */ -function hasModifier(modifierKind: number, node: ts.Node): boolean { +function hasModifier( + modifierKind: ts.KeywordSyntaxKind, + node: ts.Node +): boolean { return ( !!node.modifiers && !!node.modifiers.length && @@ -394,19 +396,6 @@ function getTSNodeAccessibility(node: ts.Node): string | null { return null; } -/** - * Returns true if the given ts.Node has the modifier flag set which corresponds - * to the static keyword. - * @param {ts.Node} node The ts.Node - * @returns {boolean} whether or not the static modifier flag is set - */ -function hasStaticModifierFlag(node: ts.Node): boolean { - /** - * TODO: Remove dependency on private TypeScript method - */ - return Boolean((ts as any).getModifierFlags(node) & ts.ModifierFlags.Static); -} - /** * Finds the next token based on the previous one and its parent * Had to copy this from TS instead of using TS's version because theirs doesn't pass the ast to getChildren From c5155af323815836c6f3743378cbbeef849ee7c7 Mon Sep 17 00:00:00 2001 From: Armano Date: Fri, 21 Dec 2018 20:39:02 +0100 Subject: [PATCH 08/30] chore: add editorconfig (#49) --- .editorconfig | 10 ++++++++++ .prettierrc | 3 --- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 .editorconfig delete mode 100644 .prettierrc diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ed19d9c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +quote_type = single diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index dc2fb82..0000000 --- a/.prettierrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "singleQuote": true -} \ No newline at end of file From 593b779e7ff5f9e5b218dae80958d26896762ec8 Mon Sep 17 00:00:00 2001 From: Armano Date: Fri, 21 Dec 2018 20:47:32 +0100 Subject: [PATCH 09/30] refactor: improve types in node-utils (#47) --- src/convert.ts | 4 ++-- src/node-utils.ts | 6 ++++-- src/temp-types-based-on-js-source.ts | 4 ++-- tests/ast-alignment/fixtures-to-test.ts | 5 ++++- tests/ast-alignment/spec.ts | 14 ++++++-------- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/convert.ts b/src/convert.ts index 747849b..22a4ec6 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -95,10 +95,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { /** * Converts a child into a type annotation. This creates an intermediary * TypeAnnotation node to match what Flow does. - * @param {ts.Node} child The TypeScript AST node to convert. + * @param {ts.TypeNode} child The TypeScript AST node to convert. * @returns {ESTreeNode} The type annotation node. */ - function convertTypeAnnotation(child: ts.Node): ESTreeNode { + function convertTypeAnnotation(child: ts.TypeNode): ESTreeNode { const annotation = convertChild(child); const annotationStartCol = child.getFullStart() - 1; const loc = nodeUtils.getLocFor(annotationStartCol, child.end, ast); diff --git a/src/node-utils.ts b/src/node-utils.ts index fe6ef76..bc35214 100644 --- a/src/node-utils.ts +++ b/src/node-utils.ts @@ -375,7 +375,9 @@ function getDeclarationKind(node: ts.Node): 'let' | 'const' | 'var' { * @param {ts.Node} node The ts.Node * @returns {string | null} accessibility "public", "protected", "private", or null */ -function getTSNodeAccessibility(node: ts.Node): string | null { +function getTSNodeAccessibility( + node: ts.Node +): 'public' | 'protected' | 'private' | null { const modifiers = node.modifiers; if (!modifiers) { return null; @@ -390,7 +392,7 @@ function getTSNodeAccessibility(node: ts.Node): string | null { case SyntaxKind.PrivateKeyword: return 'private'; default: - continue; + break; } } return null; diff --git a/src/temp-types-based-on-js-source.ts b/src/temp-types-based-on-js-source.ts index 9ce5dae..af416e4 100644 --- a/src/temp-types-based-on-js-source.ts +++ b/src/temp-types-based-on-js-source.ts @@ -7,7 +7,7 @@ export interface ESTreeToken { type: string; value: string; - range: number[]; + range: [number, number]; loc: ESTreeNodeLoc; regex?: { pattern: string; @@ -26,7 +26,7 @@ export interface ESTreeNode { specifiers?: any[]; source?: any; typeAnnotation?: ESTreeNode | null; - typeParameters?: any; + typeParameters?: ESTreeNode | null; id?: ESTreeNode | null; expression?: ESTreeNode | null; decorators?: any; diff --git a/tests/ast-alignment/fixtures-to-test.ts b/tests/ast-alignment/fixtures-to-test.ts index cba6f1c..ce914e1 100644 --- a/tests/ast-alignment/fixtures-to-test.ts +++ b/tests/ast-alignment/fixtures-to-test.ts @@ -6,7 +6,10 @@ import { ParserOptions } from '../../src/temp-types-based-on-js-source'; interface Fixture { filename: string; - config?: any; + config?: { + babelParserOptions?: BabelParserOptions; + typeScriptESTreeOptions?: ParserOptions; + }; } interface FixturePatternConfig { diff --git a/tests/ast-alignment/spec.ts b/tests/ast-alignment/spec.ts index 378ed9e..7ab17c7 100644 --- a/tests/ast-alignment/spec.ts +++ b/tests/ast-alignment/spec.ts @@ -7,15 +7,16 @@ fixturesToTest.forEach(fixture => { const filename = fixture.filename; const source = fs.readFileSync(filename, 'utf8').replace(/\r\n/g, '\n'); + const config = fixture.config || {}; + config.typeScriptESTreeOptions = config.typeScriptESTreeOptions || {}; + config.babelParserOptions = config.babelParserOptions || {}; + /** * Parse with typescript-estree */ const typeScriptESTreeResult = parse(source, { parser: 'typescript-estree', - typeScriptESTreeOptions: - fixture.config && fixture.config.typeScriptESTreeOptions - ? fixture.config.typeScriptESTreeOptions - : null + typeScriptESTreeOptions: config.typeScriptESTreeOptions }); /** @@ -23,10 +24,7 @@ fixturesToTest.forEach(fixture => { */ const babelParserResult = parse(source, { parser: '@babel/parser', - babelParserOptions: - fixture.config && fixture.config.babelParserOptions - ? fixture.config.babelParserOptions - : null + babelParserOptions: config.babelParserOptions }); /** From 3be357e24e2ce291169447bd84c3739ebc60292c Mon Sep 17 00:00:00 2001 From: Benjamin Lichtman Date: Thu, 27 Dec 2018 06:08:17 -0800 Subject: [PATCH 10/30] fix: non-existent files and custom file extensions (#53) --- src/parser.ts | 30 ++++- src/temp-types-based-on-js-source.ts | 2 + src/tsconfig-parser.ts | 79 +++++++++++- .../semanticInfo/extra-file-extension.vue | 1 + tests/lib/semanticInfo.ts | 117 ++++++++++++------ 5 files changed, 184 insertions(+), 45 deletions(-) create mode 100644 tests/fixtures/semanticInfo/extra-file-extension.vue diff --git a/src/parser.ts b/src/parser.ts index 41135b8..64d6c88 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -5,7 +5,10 @@ * @copyright jQuery Foundation and other contributors, https://jquery.org/ * MIT License */ -import calculateProjectParserOptions from './tsconfig-parser'; +import { + calculateProjectParserOptions, + createProgram +} from './tsconfig-parser'; import semver from 'semver'; import ts from 'typescript'; import convert from './ast-converter'; @@ -57,7 +60,8 @@ function resetExtra(): void { projects: [], errorOnUnknownASTType: false, code: '', - tsconfigRootDir: process.cwd() + tsconfigRootDir: process.cwd(), + extraFileExtensions: [] }; } @@ -73,7 +77,7 @@ function getASTFromProject(code: string, options: ParserOptions) { options.filePath || getFileName(options), extra ), - (currentProgram: ts.Program) => { + currentProgram => { const ast = currentProgram.getSourceFile( options.filePath || getFileName(options) ); @@ -82,6 +86,18 @@ function getASTFromProject(code: string, options: ParserOptions) { ); } +/** + * @param {string} code The code of the file being linted + * @param {Object} options The config object + * @returns {{ast: ts.SourceFile, program: ts.Program} | undefined} If found, returns the source file corresponding to the code and the containing program + */ +function getASTAndDefaultProject(code: string, options: ParserOptions) { + const fileName = options.filePath || getFileName(options); + const program = createProgram(code, fileName, extra); + const ast = program && program.getSourceFile(fileName); + return ast && { ast, program }; +} + /** * @param {string} code The code of the file being linted * @returns {{ast: ts.SourceFile, program: ts.Program}} Returns a new source file and program corresponding to the linted code @@ -154,6 +170,7 @@ function getProgramAndAST( ) { return ( (shouldProvideParserServices && getASTFromProject(code, options)) || + (shouldProvideParserServices && getASTAndDefaultProject(code, options)) || createNewProgram(code) ); } @@ -254,6 +271,13 @@ function generateAST( if (typeof options.tsconfigRootDir === 'string') { extra.tsconfigRootDir = options.tsconfigRootDir; } + + if ( + Array.isArray(options.extraFileExtensions) && + options.extraFileExtensions.every(ext => typeof ext === 'string') + ) { + extra.extraFileExtensions = options.extraFileExtensions; + } } if (!isRunningSupportedTypeScriptVersion && !warnedAboutTSVersion) { diff --git a/src/temp-types-based-on-js-source.ts b/src/temp-types-based-on-js-source.ts index af416e4..c3819ef 100644 --- a/src/temp-types-based-on-js-source.ts +++ b/src/temp-types-based-on-js-source.ts @@ -70,6 +70,7 @@ export interface Extra { log: Function; projects: string[]; tsconfigRootDir: string; + extraFileExtensions: string[]; } export interface ParserOptions { @@ -84,4 +85,5 @@ export interface ParserOptions { project?: string | string[]; filePath?: string; tsconfigRootDir?: string; + extraFileExtensions?: string[]; } diff --git a/src/tsconfig-parser.ts b/src/tsconfig-parser.ts index 63d472f..9995327 100644 --- a/src/tsconfig-parser.ts +++ b/src/tsconfig-parser.ts @@ -8,6 +8,15 @@ import { Extra } from './temp-types-based-on-js-source'; // Environment calculation //------------------------------------------------------------------------------ +/** + * Default compiler options for program generation from single root file + * @type {ts.CompilerOptions} + */ +const defaultCompilerOptions: ts.CompilerOptions = { + allowNonTsExtensions: true, + allowJs: true +}; + /** * Maps tsconfig paths to their corresponding file contents and resulting watches * @type {Map>} @@ -54,7 +63,7 @@ const noopFileWatcher = { close: () => {} }; * @param {string[]} extra.project Provided tsconfig paths * @returns {ts.Program[]} The programs corresponding to the supplied tsconfig paths */ -export default function calculateProjectParserOptions( +export function calculateProjectParserOptions( code: string, filePath: string, extra: Extra @@ -90,7 +99,7 @@ export default function calculateProjectParserOptions( // create compiler host const watchCompilerHost = ts.createWatchCompilerHost( tsconfigPath, - /*optionsToExtend*/ undefined, + /*optionsToExtend*/ { allowNonTsExtensions: true } as ts.CompilerOptions, ts.sys, ts.createSemanticDiagnosticsBuilderProgram, diagnosticReporter, @@ -136,6 +145,32 @@ export default function calculateProjectParserOptions( // ensure fileWatchers aren't created for directories watchCompilerHost.watchDirectory = () => noopFileWatcher; + // allow files with custom extensions to be included in program (uses internal ts api) + const oldOnDirectoryStructureHostCreate = (watchCompilerHost as any) + .onCachedDirectoryStructureHostCreate; + (watchCompilerHost as any).onCachedDirectoryStructureHostCreate = ( + host: any + ) => { + const oldReadDirectory = host.readDirectory; + host.readDirectory = ( + path: string, + extensions?: ReadonlyArray, + exclude?: ReadonlyArray, + include?: ReadonlyArray, + depth?: number + ) => + oldReadDirectory( + path, + !extensions + ? undefined + : extensions.concat(extra.extraFileExtensions), + exclude, + include, + depth + ); + oldOnDirectoryStructureHostCreate(host); + }; + // create program const programWatch = ts.createWatchProgram(watchCompilerHost); const program = programWatch.getProgram().getProgram(); @@ -147,3 +182,43 @@ export default function calculateProjectParserOptions( return results; } + +/** + * Create program from single root file. Requires a single tsconfig to be specified. + * @param code The code being linted + * @param filePath The file being linted + * @param {string} extra.tsconfigRootDir The root directory for relative tsconfig paths + * @param {string[]} extra.project Provided tsconfig paths + * @returns {ts.Program} The program containing just the file being linted and associated library files + */ +export function createProgram(code: string, filePath: string, extra: Extra) { + if (!extra.projects || extra.projects.length !== 1) { + return undefined; + } + + let tsconfigPath = extra.projects[0]; + + // if absolute paths aren't provided, make relative to tsconfigRootDir + if (!path.isAbsolute(tsconfigPath)) { + tsconfigPath = path.join(extra.tsconfigRootDir, tsconfigPath); + } + + const commandLine = ts.getParsedCommandLineOfConfigFile( + tsconfigPath, + defaultCompilerOptions, + { ...ts.sys, onUnRecoverableConfigFileDiagnostic: () => {} } + ); + + if (!commandLine) { + return undefined; + } + + const compilerHost = ts.createCompilerHost(commandLine.options); + const oldReadFile = compilerHost.readFile; + compilerHost.readFile = (fileName: string) => + path.normalize(fileName) === path.normalize(filePath) + ? code + : oldReadFile(fileName); + + return ts.createProgram([filePath], commandLine.options, compilerHost); +} diff --git a/tests/fixtures/semanticInfo/extra-file-extension.vue b/tests/fixtures/semanticInfo/extra-file-extension.vue new file mode 100644 index 0000000..ca04667 --- /dev/null +++ b/tests/fixtures/semanticInfo/extra-file-extension.vue @@ -0,0 +1 @@ +const x = [3, 4, 5]; \ No newline at end of file diff --git a/tests/lib/semanticInfo.ts b/tests/lib/semanticInfo.ts index d0c1f37..6abda98 100644 --- a/tests/lib/semanticInfo.ts +++ b/tests/lib/semanticInfo.ts @@ -77,48 +77,17 @@ describe('semanticInfo', () => { createOptions(fileName) ); - // get type checker - expect(parseResult).toHaveProperty('services.program.getTypeChecker'); - const checker = parseResult.services.program!.getTypeChecker(); - - // get number node (ast shape validated by snapshot) - const arrayMember = (parseResult.ast as any).body[0].declarations[0].init - .elements[0]; - expect(parseResult).toHaveProperty('services.esTreeNodeToTSNodeMap'); - - // get corresponding TS node - const tsArrayMember = parseResult.services.esTreeNodeToTSNodeMap!.get( - arrayMember - ); - expect(tsArrayMember).toBeDefined(); - expect(tsArrayMember.kind).toBe(ts.SyntaxKind.NumericLiteral); - expect(tsArrayMember.text).toBe('3'); - - // get type of TS node - const arrayMemberType: any = checker.getTypeAtLocation(tsArrayMember); - expect(arrayMemberType.flags).toBe(ts.TypeFlags.NumberLiteral); - expect(arrayMemberType.value).toBe(3); - - // make sure it maps back to original ESTree node - expect(parseResult).toHaveProperty('services.tsNodeToESTreeNodeMap'); - expect(parseResult.services.tsNodeToESTreeNodeMap!.get(tsArrayMember)).toBe( - arrayMember - ); - - // get bound name - const boundName = (parseResult.ast as any).body[0].declarations[0].id; - expect(boundName.name).toBe('x'); - - const tsBoundName = parseResult.services.esTreeNodeToTSNodeMap!.get( - boundName - ); - expect(tsBoundName).toBeDefined(); + testIsolatedFile(parseResult); + }); - checkNumberArrayType(checker, tsBoundName); + test('isolated-vue-file tests', () => { + const fileName = path.resolve(FIXTURES_DIR, 'extra-file-extension.vue'); + const parseResult = parseCodeAndGenerateServices(shelljs.cat(fileName), { + ...createOptions(fileName), + extraFileExtensions: ['.vue'] + }); - expect(parseResult.services.tsNodeToESTreeNodeMap!.get(tsBoundName)).toBe( - boundName - ); + testIsolatedFile(parseResult); }); test('imported-file tests', () => { @@ -150,6 +119,32 @@ describe('semanticInfo', () => { ).toBe(arrayBoundName); }); + test('non-existent file tests', () => { + const parseResult = parseCodeAndGenerateServices( + `const x = [parseInt("5")];`, + createOptions('') + ); + + // get type checker + expect(parseResult).toHaveProperty('services.program.getTypeChecker'); + const checker = parseResult.services.program!.getTypeChecker(); + + // get bound name + const boundName = (parseResult.ast as any).body[0].declarations[0].id; + expect(boundName.name).toBe('x'); + + const tsBoundName = parseResult.services.esTreeNodeToTSNodeMap!.get( + boundName + ); + expect(tsBoundName).toBeDefined(); + + checkNumberArrayType(checker, tsBoundName); + + expect(parseResult.services.tsNodeToESTreeNodeMap!.get(tsBoundName)).toBe( + boundName + ); + }); + test('non-existent project file', () => { const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); const badConfig = createOptions(fileName); @@ -178,6 +173,48 @@ describe('semanticInfo', () => { }); }); +function testIsolatedFile(parseResult: any) { + // get type checker + expect(parseResult).toHaveProperty('services.program.getTypeChecker'); + const checker = parseResult.services.program!.getTypeChecker(); + + // get number node (ast shape validated by snapshot) + const arrayMember = (parseResult.ast as any).body[0].declarations[0].init + .elements[0]; + expect(parseResult).toHaveProperty('services.esTreeNodeToTSNodeMap'); + + // get corresponding TS node + const tsArrayMember = parseResult.services.esTreeNodeToTSNodeMap!.get( + arrayMember + ); + expect(tsArrayMember).toBeDefined(); + expect(tsArrayMember.kind).toBe(ts.SyntaxKind.NumericLiteral); + expect((tsArrayMember as ts.NumericLiteral).text).toBe('3'); + + // get type of TS node + const arrayMemberType: any = checker.getTypeAtLocation(tsArrayMember); + expect(arrayMemberType.flags).toBe(ts.TypeFlags.NumberLiteral); + expect(arrayMemberType.value).toBe(3); + + // make sure it maps back to original ESTree node + expect(parseResult).toHaveProperty('services.tsNodeToESTreeNodeMap'); + expect(parseResult.services.tsNodeToESTreeNodeMap!.get(tsArrayMember)).toBe( + arrayMember + ); + + // get bound name + const boundName = (parseResult.ast as any).body[0].declarations[0].id; + expect(boundName.name).toBe('x'); + const tsBoundName = parseResult.services.esTreeNodeToTSNodeMap!.get( + boundName + ); + expect(tsBoundName).toBeDefined(); + checkNumberArrayType(checker, tsBoundName); + expect(parseResult.services.tsNodeToESTreeNodeMap!.get(tsBoundName)).toBe( + boundName + ); +} + /** * Verifies that the type of a TS node is number[] as expected * @param {ts.TypeChecker} checker From 969c0d398a73e438ba7d11ac8b8ed138b26d819d Mon Sep 17 00:00:00 2001 From: Armano Date: Fri, 28 Dec 2018 18:34:50 +0100 Subject: [PATCH 11/30] fix: many missing nodes and better babel alignment (#65) BREAKING CHANGE: We apologise for the lack of a granular changelog here. There are multiple changes to the AST in this large commit, please see the PR https://github.com/JamesHenry/typescript-estree/pull/65 for full details --- package.json | 2 +- src/ast-node-types.ts | 27 +- src/convert.ts | 345 +- src/node-utils.ts | 66 +- src/ts-nodes.ts | 2 + tests/ast-alignment/fixtures-to-test.ts | 318 +- tests/ast-alignment/parse.ts | 6 +- tests/ast-alignment/spec.ts | 34 +- tests/ast-alignment/utils.ts | 13 +- .../defaults-object-assign.src.js | 1 + .../javascript/directives/block.src.js | 5 + .../directives/directive-in-class.src.js | 19 + .../directives/function-non-strict.src.js | 4 + .../directives/non-directive-string.src.js | 16 + .../directives/program-order.src.js | 3 + .../javascript/directives/program.src.js | 3 + .../fixtures/javascript/directives/raw.src.js | 1 + .../literal-float-negative.src.js | 1 + .../simple-literals/literal-float.src.js | 1 + .../simple-literals/literal-null.src.js | 1 + .../literal-number-negative.src.js | 1 + .../simple-literals/literal-number.src.js | 1 + .../simple-literals/literal-string.src.js | 1 + .../simple-literals/literal-undefined.src.js | 1 + .../basics/class-with-mixin-reference.src.ts | 2 + .../destructuring-assignment-nested.src.ts | 1 + .../destructuring-assignment-object.src.ts | 1 + .../destructuring-assignment-property.src.ts | 3 + .../basics/directive-in-module.src.ts | 5 + .../basics/directive-in-namespace.src.ts | 5 + .../basics/typed-keyword-bigint.src.ts | 1 + .../basics/typed-keyword-boolean.src.ts | 1 + .../basics/typed-keyword-false.src.ts | 1 + .../basics/typed-keyword-never.src.ts | 1 + .../basics/typed-keyword-null.src.ts | 1 + .../basics/typed-keyword-number.src.ts | 1 + .../basics/typed-keyword-object.src.ts | 1 + .../basics/typed-keyword-string.src.ts | 1 + .../basics/typed-keyword-symbol.src.ts | 1 + .../basics/typed-keyword-true.src.ts | 1 + .../basics/typed-keyword-undefined.src.ts | 1 + .../basics/typed-keyword-unknown.src.ts | 1 + .../basics/typed-keyword-void.src.ts | 1 + .../typescript/types/array-type.src.ts | 1 + .../types/conditional-with-null.src.ts | 1 + .../typescript/types/conditional.src.ts | 1 + .../fixtures/typescript/types/indexed.src.ts | 1 + .../typescript/types/intersection-type.src.ts | 1 + .../types/mapped-readonly-minus.src.ts | 1 + .../types/mapped-readonly-plus.src.ts | 1 + .../typescript/types/mapped-readonly.src.ts | 1 + tests/fixtures/typescript/types/mapped.src.ts | 1 + .../typescript/types/nested-types.src.ts | 1 + .../types/parenthesized-type.src.ts | 1 + .../types/reference-generic-nested.src.ts | 1 + .../typescript/types/reference-generic.src.ts | 1 + .../typescript/types/reference.src.ts | 1 + .../typescript/types/tuple-empty.src.ts | 1 + .../typescript/types/tuple-optional.src.ts | 1 + .../typescript/types/tuple-rest.src.ts | 1 + .../typescript/types/tuple-type.src.ts | 1 + tests/fixtures/typescript/types/tuple.src.ts | 1 + .../typescript/types/type-literal.src.ts | 1 + .../typescript/types/type-operator.src.ts | 2 + tests/fixtures/typescript/types/typeof.src.ts | 1 + .../types/union-intersection.src.ts | 4 + .../typescript/types/union-type.src.ts | 1 + tests/lib/__snapshots__/javascript.ts.snap | 44148 ++++++---- tests/lib/__snapshots__/typescript.ts.snap | 73310 ++++++++++------ yarn.lock | 820 +- 70 files changed, 71075 insertions(+), 48133 deletions(-) create mode 100644 tests/fixtures/javascript/destructuring/defaults-object-assign.src.js create mode 100644 tests/fixtures/javascript/directives/block.src.js create mode 100644 tests/fixtures/javascript/directives/directive-in-class.src.js create mode 100644 tests/fixtures/javascript/directives/function-non-strict.src.js create mode 100644 tests/fixtures/javascript/directives/non-directive-string.src.js create mode 100644 tests/fixtures/javascript/directives/program-order.src.js create mode 100644 tests/fixtures/javascript/directives/program.src.js create mode 100644 tests/fixtures/javascript/directives/raw.src.js create mode 100644 tests/fixtures/javascript/simple-literals/literal-float-negative.src.js create mode 100644 tests/fixtures/javascript/simple-literals/literal-float.src.js create mode 100644 tests/fixtures/javascript/simple-literals/literal-null.src.js create mode 100644 tests/fixtures/javascript/simple-literals/literal-number-negative.src.js create mode 100644 tests/fixtures/javascript/simple-literals/literal-number.src.js create mode 100644 tests/fixtures/javascript/simple-literals/literal-string.src.js create mode 100644 tests/fixtures/javascript/simple-literals/literal-undefined.src.js create mode 100644 tests/fixtures/typescript/basics/class-with-mixin-reference.src.ts create mode 100644 tests/fixtures/typescript/basics/destructuring-assignment-nested.src.ts create mode 100644 tests/fixtures/typescript/basics/destructuring-assignment-object.src.ts create mode 100644 tests/fixtures/typescript/basics/destructuring-assignment-property.src.ts create mode 100644 tests/fixtures/typescript/basics/directive-in-module.src.ts create mode 100644 tests/fixtures/typescript/basics/directive-in-namespace.src.ts create mode 100644 tests/fixtures/typescript/basics/typed-keyword-bigint.src.ts create mode 100644 tests/fixtures/typescript/basics/typed-keyword-boolean.src.ts create mode 100644 tests/fixtures/typescript/basics/typed-keyword-false.src.ts create mode 100644 tests/fixtures/typescript/basics/typed-keyword-never.src.ts create mode 100644 tests/fixtures/typescript/basics/typed-keyword-null.src.ts create mode 100644 tests/fixtures/typescript/basics/typed-keyword-number.src.ts create mode 100644 tests/fixtures/typescript/basics/typed-keyword-object.src.ts create mode 100644 tests/fixtures/typescript/basics/typed-keyword-string.src.ts create mode 100644 tests/fixtures/typescript/basics/typed-keyword-symbol.src.ts create mode 100644 tests/fixtures/typescript/basics/typed-keyword-true.src.ts create mode 100644 tests/fixtures/typescript/basics/typed-keyword-undefined.src.ts create mode 100644 tests/fixtures/typescript/basics/typed-keyword-unknown.src.ts create mode 100644 tests/fixtures/typescript/basics/typed-keyword-void.src.ts create mode 100644 tests/fixtures/typescript/types/array-type.src.ts create mode 100644 tests/fixtures/typescript/types/conditional-with-null.src.ts create mode 100644 tests/fixtures/typescript/types/conditional.src.ts create mode 100644 tests/fixtures/typescript/types/indexed.src.ts create mode 100644 tests/fixtures/typescript/types/intersection-type.src.ts create mode 100644 tests/fixtures/typescript/types/mapped-readonly-minus.src.ts create mode 100644 tests/fixtures/typescript/types/mapped-readonly-plus.src.ts create mode 100644 tests/fixtures/typescript/types/mapped-readonly.src.ts create mode 100644 tests/fixtures/typescript/types/mapped.src.ts create mode 100644 tests/fixtures/typescript/types/nested-types.src.ts create mode 100644 tests/fixtures/typescript/types/parenthesized-type.src.ts create mode 100644 tests/fixtures/typescript/types/reference-generic-nested.src.ts create mode 100644 tests/fixtures/typescript/types/reference-generic.src.ts create mode 100644 tests/fixtures/typescript/types/reference.src.ts create mode 100644 tests/fixtures/typescript/types/tuple-empty.src.ts create mode 100644 tests/fixtures/typescript/types/tuple-optional.src.ts create mode 100644 tests/fixtures/typescript/types/tuple-rest.src.ts create mode 100644 tests/fixtures/typescript/types/tuple-type.src.ts create mode 100644 tests/fixtures/typescript/types/tuple.src.ts create mode 100644 tests/fixtures/typescript/types/type-literal.src.ts create mode 100644 tests/fixtures/typescript/types/type-operator.src.ts create mode 100644 tests/fixtures/typescript/types/typeof.src.ts create mode 100644 tests/fixtures/typescript/types/union-intersection.src.ts create mode 100644 tests/fixtures/typescript/types/union-type.src.ts diff --git a/package.json b/package.json index 2199885..49b519e 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "license": "BSD-2-Clause", "devDependencies": { "@babel/code-frame": "7.0.0", - "@babel/parser": "7.1.6", + "@babel/parser": "7.2.3", "@commitlint/cli": "^7.1.2", "@commitlint/config-conventional": "^7.1.2", "@commitlint/travis-cli": "^7.1.2", diff --git a/src/ast-node-types.ts b/src/ast-node-types.ts index 58f6eea..59b684f 100644 --- a/src/ast-node-types.ts +++ b/src/ast-node-types.ts @@ -86,9 +86,17 @@ export const AST_NODE_TYPES: { [key: string]: string } = { ThisExpression: 'ThisExpression', ThrowStatement: 'ThrowStatement', TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + YieldExpression: 'YieldExpression', /** * TS-prefixed nodes */ + TSAbstractClassDeclaration: 'TSAbstractClassDeclaration', TSAbstractClassProperty: 'TSAbstractClassProperty', TSAbstractKeyword: 'TSAbstractKeyword', TSAbstractMethodDefinition: 'TSAbstractMethodDefinition', @@ -96,6 +104,8 @@ export const AST_NODE_TYPES: { [key: string]: string } = { TSArrayType: 'TSArrayType', TSAsyncKeyword: 'TSAsyncKeyword', TSBooleanKeyword: 'TSBooleanKeyword', + TSBigIntKeyword: 'TSBigIntKeyword', + TSConditionalType: 'TSConditionalType', TSConstructorType: 'TSConstructorType', TSConstructSignature: 'TSConstructSignature', TSDeclareKeyword: 'TSDeclareKeyword', @@ -106,6 +116,7 @@ export const AST_NODE_TYPES: { [key: string]: string } = { TSExportKeyword: 'TSExportKeyword', TSImportType: 'TSImportType', TSLiteralType: 'TSLiteralType', + TSIndexedAccessType: 'TSIndexedAccessType', TSIndexSignature: 'TSIndexSignature', TSInterfaceBody: 'TSInterfaceBody', TSInterfaceDeclaration: 'TSInterfaceDeclaration', @@ -119,6 +130,7 @@ export const AST_NODE_TYPES: { [key: string]: string } = { TSNeverKeyword: 'TSNeverKeyword', TSNullKeyword: 'TSNullKeyword', TSNumberKeyword: 'TSNumberKeyword', + TSMappedType: 'TSMappedType', TSObjectKeyword: 'TSObjectKeyword', TSParameterProperty: 'TSParameterProperty', TSPrivateKeyword: 'TSPrivateKeyword', @@ -128,6 +140,7 @@ export const AST_NODE_TYPES: { [key: string]: string } = { TSQualifiedName: 'TSQualifiedName', TSQuestionToken: 'TSQuestionToken', TSReadonlyKeyword: 'TSReadonlyKeyword', + TSRestType: 'TSRestType', TSStaticKeyword: 'TSStaticKeyword', TSStringKeyword: 'TSStringKeyword', TSSymbolKeyword: 'TSSymbolKeyword', @@ -140,15 +153,13 @@ export const AST_NODE_TYPES: { [key: string]: string } = { TSTypeParameterInstantiation: 'TSTypeParameterInstantiation', TSTypePredicate: 'TSTypePredicate', TSTypeReference: 'TSTypeReference', + TSTypeQuery: 'TSTypeQuery', + TSIntersectionType: 'TSIntersectionType', + TSTupleType: 'TSTupleType', + TSOptionalType: 'TSOptionalType', + TSParenthesizedType: 'TSParenthesizedType', TSUnionType: 'TSUnionType', TSUndefinedKeyword: 'TSUndefinedKeyword', TSUnknownKeyword: 'TSUnknownKeyword', - TSVoidKeyword: 'TSVoidKeyword', - UnaryExpression: 'UnaryExpression', - UpdateExpression: 'UpdateExpression', - VariableDeclaration: 'VariableDeclaration', - VariableDeclarator: 'VariableDeclarator', - WhileStatement: 'WhileStatement', - WithStatement: 'WithStatement', - YieldExpression: 'YieldExpression' + TSVoidKeyword: 'TSVoidKeyword' }; diff --git a/src/convert.ts b/src/convert.ts index 22a4ec6..5ccc6f4 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -34,6 +34,7 @@ interface ConvertAdditionalOptions { interface ConvertConfig { node: ts.Node; parent?: ts.Node | null; + inTypeMode?: boolean; ast: ts.SourceFile; additionalOptions: ConvertAdditionalOptions; } @@ -69,14 +70,16 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { loc: nodeUtils.getLoc(node, ast) }; - /** - * Copies the result object into an ESTree node with just a type property. - * This is used only for leaf nodes that have no other properties. - * @returns {void} - */ - function simplyCopy(): void { - Object.assign(result, { - type: SyntaxKind[node.kind] + function converter(child?: ts.Node, inTypeMode?: boolean): ESTreeNode | null { + if (!child) { + return null; + } + return convert({ + node: child, + parent: node, + inTypeMode, + ast, + additionalOptions }); } @@ -86,10 +89,16 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { * @returns {ESTreeNode|null} the converted ESTree node */ function convertChild(child?: ts.Node): ESTreeNode | null { - if (!child) { - return null; - } - return convert({ node: child, parent: node, ast, additionalOptions }); + return converter(child, config.inTypeMode); + } + + /** + * Converts a TypeScript node into an ESTree node. + * @param {ts.Node} child the child ts.Node + * @returns {ESTreeNode|null} the converted ESTree node + */ + function convertChildType(child?: ts.Node): ESTreeNode | null { + return converter(child, true); } /** @@ -99,7 +108,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { * @returns {ESTreeNode} The type annotation node. */ function convertTypeAnnotation(child: ts.TypeNode): ESTreeNode { - const annotation = convertChild(child); + const annotation = convertChildType(child); const annotationStartCol = child.getFullStart() - 1; const loc = nodeUtils.getLocFor(annotationStartCol, child.end, ast); return { @@ -110,6 +119,34 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { }; } + /** + * Coverts body ExpressionStatements to directives + */ + function convertBodyExpressionsToDirectives() { + if (result.body && nodeUtils.canContainDirective(node)) { + const unique: string[] = []; + + // directives has to be unique, if directive is registered twice pick only first one + result.body + .filter( + (child: ESTreeNode) => + child.type === AST_NODE_TYPES.ExpressionStatement && + child.expression && + child.expression.type === AST_NODE_TYPES.Literal && + (child.expression as any).value && + typeof (child.expression as any).value === 'string' + ) + .forEach( + (child: { directive: string; expression: { raw: string } }) => { + if (!unique.includes((child.expression as any).raw)) { + child.directive = child.expression.raw.slice(1, -1); + unique.push(child.expression.raw); + } + } + ); + } + } + /** * Converts a ts.Node's typeArguments ts.NodeArray to a flow-like typeParameters node * @param {ts.NodeArray} typeArguments ts.Node typeArguments @@ -149,32 +186,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { type: AST_NODE_TYPES.TSTypeParameterInstantiation, range: [start, end], loc: nodeUtils.getLocFor(start, end, ast), - params: typeArguments.map(typeArgument => { - if (nodeUtils.isTypeKeyword(typeArgument.kind)) { - return { - type: AST_NODE_TYPES[`TS${SyntaxKind[typeArgument.kind]}`], - range: [typeArgument.getStart(ast), typeArgument.getEnd()], - loc: nodeUtils.getLoc(typeArgument, ast) - }; - } - if (typeArgument.kind === SyntaxKind.ImportType) { - return convert({ - node: typeArgument, - parent: null, - ast, - additionalOptions - }); - } - return { - type: AST_NODE_TYPES.TSTypeReference, - range: [typeArgument.getStart(ast), typeArgument.getEnd()], - loc: nodeUtils.getLoc(typeArgument, ast), - typeName: convertChild(typeArgument.typeName || typeArgument), - typeParameters: typeArgument.typeArguments - ? convertTypeArgumentsToTypeParameters(typeArgument.typeArguments) - : undefined - }; - }) + params: typeArguments.map(typeArgument => convertChildType(typeArgument)) }; } @@ -203,36 +215,9 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { greaterThanToken!.end, ast ), - params: typeParameters.map(typeParameter => { - const name = typeParameter.name.text; - - const constraint = typeParameter.constraint - ? convert({ - node: typeParameter.constraint, - parent: typeParameter, - ast, - additionalOptions - }) - : undefined; - - const defaultParameter = typeParameter.default - ? convert({ - node: typeParameter.default, - parent: typeParameter, - ast, - additionalOptions - }) - : typeParameter.default; - - return { - type: AST_NODE_TYPES.TSTypeParameter, - range: [typeParameter.getStart(ast), typeParameter.getEnd()], - loc: nodeUtils.getLoc(typeParameter, ast), - name, - constraint, - default: defaultParameter - }; - }) + params: typeParameters.map(typeParameter => + convertChildType(typeParameter) + ) }; } @@ -488,14 +473,12 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { function fixTypeAnnotationParentLocation( typeAnnotationParent: ESTreeNode ): void { - const end = (node as any).type.getEnd(); - typeAnnotationParent.range[1] = end; - const loc = nodeUtils.getLocFor( + typeAnnotationParent.range[1] = (node as any).type.getEnd(); + typeAnnotationParent.loc = nodeUtils.getLocFor( typeAnnotationParent.range[0], typeAnnotationParent.range[1], ast ); - typeAnnotationParent.loc = loc; } /** @@ -519,6 +502,8 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { } }); + convertBodyExpressionsToDirectives(); + (result as any).range[1] = node.endOfFileToken.end; result.loc = nodeUtils.getLocFor( node.getStart(ast), @@ -532,6 +517,8 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { type: AST_NODE_TYPES.BlockStatement, body: node.statements.map(convertChild) }); + + convertBodyExpressionsToDirectives(); break; case SyntaxKind.Identifier: @@ -799,7 +786,9 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { let arrayIsInAssignment; if (arrayAssignNode) { - if (node.parent.kind === SyntaxKind.CallExpression) { + if (node.parent.kind === SyntaxKind.ShorthandPropertyAssignment) { + arrayIsInAssignment = false; + } else if (node.parent.kind === SyntaxKind.CallExpression) { arrayIsInAssignment = false; } else if ( nodeUtils.getBinaryExpressionType( @@ -849,7 +838,9 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { let objectIsInAssignment = false; if (objectAssignNode) { - if ((objectAssignNode as any).left === node) { + if (node.parent.kind === SyntaxKind.ShorthandPropertyAssignment) { + objectIsInAssignment = false; + } else if ((objectAssignNode as any).left === node) { objectIsInAssignment = true; } else if (node.parent.kind === SyntaxKind.CallExpression) { objectIsInAssignment = false; @@ -1576,7 +1567,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { const openBrace = nodeUtils.findNextToken(lastClassToken, ast, ast)!; const superClass = heritageClauses.find( - (clause: any) => clause.token === SyntaxKind.ExtendsKeyword + clause => clause.token === SyntaxKind.ExtendsKeyword ); if (superClass) { @@ -1596,7 +1587,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { } const implementsClause = heritageClauses.find( - (clause: any) => clause.token === SyntaxKind.ImplementsKeyword + clause => clause.token === SyntaxKind.ImplementsKeyword ); Object.assign(result, { @@ -1650,6 +1641,8 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { type: AST_NODE_TYPES.TSModuleBlock, body: node.statements.map(convertChild) }); + + convertBodyExpressionsToDirectives(); break; case SyntaxKind.ImportDeclaration: @@ -1849,16 +1842,18 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { // if the binary expression is in a destructured array, switch it if (result.type === AST_NODE_TYPES.AssignmentExpression) { - const upperArrayNode = nodeUtils.findAncestorOfKind( - node, - SyntaxKind.ArrayLiteralExpression - ), - upperArrayAssignNode = - upperArrayNode && - nodeUtils.findAncestorOfKind( - upperArrayNode, - SyntaxKind.BinaryExpression - ); + const upperArrayNode = nodeUtils.findFirstMatchingAncestor( + node, + parent => + parent.kind === SyntaxKind.ArrayLiteralExpression || + parent.kind === SyntaxKind.ObjectLiteralExpression + ); + const upperArrayAssignNode = + upperArrayNode && + nodeUtils.findAncestorOfKind( + upperArrayNode, + SyntaxKind.BinaryExpression + ); let upperArrayIsInAssignment; @@ -2047,7 +2042,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { break; case SyntaxKind.NullKeyword: { - if (nodeUtils.isWithinTypeAnnotation(node)) { + if (config.inTypeMode) { Object.assign(result, { type: AST_NODE_TYPES.TSNullKeyword }); @@ -2069,7 +2064,9 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.EmptyStatement: case SyntaxKind.DebuggerStatement: - simplyCopy(); + Object.assign(result, { + type: SyntaxKind[node.kind] + }); break; // JSX @@ -2235,6 +2232,130 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { // TypeScript specific + case SyntaxKind.TypeReference: { + Object.assign(result, { + type: AST_NODE_TYPES.TSTypeReference, + typeName: convertChildType(node.typeName), + typeParameters: node.typeArguments + ? convertTypeArgumentsToTypeParameters(node.typeArguments) + : undefined + }); + break; + } + + case SyntaxKind.TypeParameter: { + Object.assign(result, { + type: AST_NODE_TYPES.TSTypeParameter, + name: node.name.text, + constraint: node.constraint + ? convertChildType(node.constraint) + : undefined, + default: node.default ? convertChildType(node.default) : undefined + }); + break; + } + + case SyntaxKind.AnyKeyword: + case SyntaxKind.BigIntKeyword: + case SyntaxKind.BooleanKeyword: + case SyntaxKind.NeverKeyword: + case SyntaxKind.NumberKeyword: + case SyntaxKind.ObjectKeyword: + case SyntaxKind.StringKeyword: + case SyntaxKind.SymbolKeyword: + case SyntaxKind.UnknownKeyword: + case SyntaxKind.VoidKeyword: + case SyntaxKind.UndefinedKeyword: { + Object.assign(result, { + type: `TS${SyntaxKind[node.kind]}` + }); + break; + } + + case SyntaxKind.NonNullExpression: { + Object.assign(result, { + type: AST_NODE_TYPES.TSNonNullExpression, + expression: convertChild(node.expression) + }); + break; + } + + case SyntaxKind.TypeLiteral: { + Object.assign(result, { + type: AST_NODE_TYPES.TSTypeLiteral, + members: node.members.map(convertChild) + }); + break; + } + + case SyntaxKind.ArrayType: { + Object.assign(result, { + type: AST_NODE_TYPES.TSArrayType, + elementType: convertChildType(node.elementType) + }); + break; + } + + case SyntaxKind.IndexedAccessType: { + Object.assign(result, { + type: AST_NODE_TYPES.TSIndexedAccessType, + objectType: convertChildType(node.objectType), + indexType: convertChildType(node.indexType) + }); + break; + } + + case SyntaxKind.ConditionalType: { + Object.assign(result, { + type: AST_NODE_TYPES.TSConditionalType, + checkType: convertChildType(node.checkType), + extendsType: convertChildType(node.extendsType), + trueType: convertChildType(node.trueType), + falseType: convertChildType(node.falseType) + }); + break; + } + + case SyntaxKind.TypeQuery: { + Object.assign(result, { + type: AST_NODE_TYPES.TSTypeQuery, + exprName: convertChildType(node.exprName) + }); + break; + } + + case SyntaxKind.MappedType: { + Object.assign(result, { + type: AST_NODE_TYPES.TSMappedType, + typeParameter: convertChildType(node.typeParameter) + }); + + if (node.readonlyToken) { + if (node.readonlyToken.kind === SyntaxKind.ReadonlyKeyword) { + (result as any).readonly = true; + } else { + (result as any).readonly = nodeUtils.getTextForTokenKind( + node.readonlyToken.kind + ); + } + } + + if (node.questionToken) { + if (node.questionToken.kind === SyntaxKind.QuestionToken) { + (result as any).optional = true; + } else { + (result as any).optional = nodeUtils.getTextForTokenKind( + node.questionToken.kind + ); + } + } + + if (node.type) { + result.typeAnnotation = convertChildType(node.type); + } + break; + } + case SyntaxKind.ParenthesizedExpression: return convert({ node: node.expression, @@ -2247,7 +2368,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { Object.assign(result, { type: AST_NODE_TYPES.TSTypeAliasDeclaration, id: convertChild(node.name), - typeAnnotation: convertChild(node.type) + typeAnnotation: convertChildType(node.type) }); if (nodeUtils.hasModifier(SyntaxKind.DeclareKeyword, node)) { @@ -2513,6 +2634,50 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { break; } + // TypeScript specific types + case SyntaxKind.OptionalType: { + Object.assign(result, { + type: AST_NODE_TYPES.TSOptionalType, + typeAnnotation: convertChildType(node.type) + }); + break; + } + case SyntaxKind.ParenthesizedType: { + Object.assign(result, { + type: AST_NODE_TYPES.TSParenthesizedType, + typeAnnotation: convertChildType(node.type) + }); + break; + } + case SyntaxKind.TupleType: { + Object.assign(result, { + type: AST_NODE_TYPES.TSTupleType, + elementTypes: node.elementTypes.map(convertChildType) + }); + break; + } + case SyntaxKind.UnionType: { + Object.assign(result, { + type: AST_NODE_TYPES.TSUnionType, + types: node.types.map(convertChildType) + }); + break; + } + case SyntaxKind.IntersectionType: { + Object.assign(result, { + type: AST_NODE_TYPES.TSIntersectionType, + types: node.types.map(convertChildType) + }); + break; + } + case SyntaxKind.RestType: { + Object.assign(result, { + type: AST_NODE_TYPES.TSRestType, + typeAnnotation: convertChildType(node.type) + }); + break; + } + default: deeplyCopy(); } diff --git a/src/node-utils.ts b/src/node-utils.ts index bc35214..4b016cd 100644 --- a/src/node-utils.ts +++ b/src/node-utils.ts @@ -142,6 +142,7 @@ export default { getLocFor, getLoc, isToken, + canContainDirective, isJSXToken, getDeclarationKind, getTSNodeAccessibility, @@ -159,8 +160,6 @@ export default { convertToken, convertTokens, getNodeContainer, - isWithinTypeAnnotation, - isTypeKeyword, isComment, isJSDocComment, createError, @@ -292,6 +291,34 @@ function getLocFor( }; } +/** + * Check whatever node can contain directive + * @param {ts.Node} node + * @returns {boolean} returns true if node can contain directive + */ +function canContainDirective(node: ts.Node): boolean { + switch (node.kind) { + case ts.SyntaxKind.SourceFile: + case ts.SyntaxKind.ModuleBlock: + return true; + case ts.SyntaxKind.Block: + switch (node.parent.kind) { + case ts.SyntaxKind.Constructor: + case ts.SyntaxKind.GetAccessor: + case ts.SyntaxKind.SetAccessor: + case ts.SyntaxKind.ArrowFunction: + case ts.SyntaxKind.FunctionExpression: + case ts.SyntaxKind.FunctionDeclaration: + case ts.SyntaxKind.MethodDeclaration: + return true; + default: + return false; + } + default: + return false; + } +} + /** * Returns line and column data for the given ts.Node or ts.Token, * for the given AST @@ -328,28 +355,6 @@ function isJSXToken(node: ts.Node): boolean { ); } -/** - * Returns true if the given ts.Node.kind value corresponds to a type keyword - * @param {number} kind TypeScript SyntaxKind - * @returns {boolean} is a type keyword - */ -function isTypeKeyword(kind: number): boolean { - switch (kind) { - case SyntaxKind.AnyKeyword: - case SyntaxKind.BooleanKeyword: - case SyntaxKind.NeverKeyword: - case SyntaxKind.NumberKeyword: - case SyntaxKind.ObjectKeyword: - case SyntaxKind.StringKeyword: - case SyntaxKind.SymbolKeyword: - case SyntaxKind.UnknownKeyword: - case SyntaxKind.VoidKeyword: - return true; - default: - return false; - } -} - /** * Returns the declaration kind of the given ts.Node * @param {ts.Node} node TypeScript AST node @@ -536,19 +541,6 @@ function isOptional(node: { questionToken?: ts.QuestionToken }): boolean { : false; } -/** - * Returns true if the given ts.Node is within the context of a "typeAnnotation", - * which effectively means - is it coming from its parent's `type` or `types` property - * @param {ts.Node} node ts.Node to be checked - * @returns {boolean} is within "typeAnnotation context" - */ -function isWithinTypeAnnotation(node: any): boolean { - return ( - node.parent.type === node || - (node.parent.types && node.parent.types.indexOf(node) > -1) - ); -} - /** * Fixes the exports of the given ts.Node * @param {ts.Node} node the ts.Node diff --git a/src/ts-nodes.ts b/src/ts-nodes.ts index 93d692f..69682cb 100644 --- a/src/ts-nodes.ts +++ b/src/ts-nodes.ts @@ -50,6 +50,8 @@ export type TSNode = ts.Node & | ts.ParenthesizedTypeNode | ts.TypeOperatorNode | ts.IndexedAccessTypeNode + | ts.FunctionTypeNode + | ts.ConstructorTypeNode | ts.MappedTypeNode | ts.LiteralTypeNode | ts.StringLiteral diff --git a/tests/ast-alignment/fixtures-to-test.ts b/tests/ast-alignment/fixtures-to-test.ts index ce914e1..53175a9 100644 --- a/tests/ast-alignment/fixtures-to-test.ts +++ b/tests/ast-alignment/fixtures-to-test.ts @@ -1,31 +1,27 @@ import glob from 'glob'; +import fs from 'fs'; import path from 'path'; + import jsxKnownIssues from '../jsx-known-issues'; -import { ParserOptions as BabelParserOptions } from '@babel/parser'; -import { ParserOptions } from '../../src/temp-types-based-on-js-source'; interface Fixture { filename: string; - config?: { - babelParserOptions?: BabelParserOptions; - typeScriptESTreeOptions?: ParserOptions; - }; + ignoreSourceType: boolean; } interface FixturePatternConfig { pattern: string; - config?: { - babelParserOptions?: BabelParserOptions; - typeScriptESTreeOptions?: ParserOptions; - }; + ignoreSourceType: boolean; } interface CreateFixturePatternConfig { ignore?: string[]; fileType?: string; - parseWithSourceTypeModule?: string[]; + ignoreSourceType?: string[]; } +const fixturesDirPath = path.join(__dirname, '../fixtures'); + /** * JSX fixtures which have known issues for typescript-estree */ @@ -34,9 +30,9 @@ const jsxFilesWithKnownIssues = jsxKnownIssues.map(f => f.replace('jsx/', '')); /** * Current random error difference on jsx/invalid-no-tag-name.src.js * TSEP - SyntaxError - * Babylon - RangeError + * Babel - RangeError * - * Reported here: https://github.com/babel/babylon/issues/674 + * Reported here: https://github.com/babel/babel/issues/6680 */ jsxFilesWithKnownIssues.push('invalid-no-tag-name'); @@ -63,41 +59,41 @@ function createFixturePatternConfigFor( 'fixtureSubPath was not provided for the current fixture pattern' ); } + if (!fs.existsSync(path.join(fixturesDirPath, fixturesSubPath))) { + throw new Error( + `Registered path '${path.join(__dirname, fixturesSubPath)}' was not found` + ); + } + config = config || ({} as CreateFixturePatternConfig); config.ignore = config.ignore || []; config.fileType = config.fileType || 'js'; - config.parseWithSourceTypeModule = config.parseWithSourceTypeModule || []; + config.ignoreSourceType = config.ignoreSourceType || []; /** * The TypeScript compiler gives us the "externalModuleIndicator" to allow typescript-estree do dynamically detect the "sourceType". - * Babylon does not have an equivalent feature (although perhaps it might come in the future https://github.com/babel/babylon/issues/440), - * so we have to specify the "sourceType" we want to use. - * - * By default we have configured babylon to use "script", but for any fixtures specified in the parseWithSourceTypeModule array we need "module". + * Babel has similar feature sourceType='unambiguous' but its not perfect, and in some specific cases we sill have to enforce it. * * First merge the fixtures which need to be parsed with sourceType: "module" into the * ignore list, and then add their full config into the global array. */ - if (config.parseWithSourceTypeModule.length) { + if (config.ignoreSourceType.length) { config.ignore = ([] as string[]).concat( config.ignore, - config.parseWithSourceTypeModule + config.ignoreSourceType ); - for (const fixture of config.parseWithSourceTypeModule) { + for (const fixture of config.ignoreSourceType) { fixturesRequiringSourceTypeModule.push({ // It needs to be the full path from within fixtures/ for the pattern pattern: `${fixturesSubPath}/${fixture}.src.${config.fileType}`, - config: { - babelParserOptions: { - sourceType: 'module' - } - } + ignoreSourceType: true }); } } return { pattern: `${fixturesSubPath}/!(${config.ignore.join('|')}).src.${ config.fileType - }` + }`, + ignoreSourceType: false }; } @@ -105,14 +101,13 @@ function createFixturePatternConfigFor( * An array of FixturePatternConfigs */ let fixturePatternConfigsToTest = [ - createFixturePatternConfigFor('basics'), + createFixturePatternConfigFor('javascript/basics'), createFixturePatternConfigFor('comments', { ignore: [ - 'export-default-anonymous-class', // needs to be parsed with `sourceType: "module"` /** * Template strings seem to also be affected by the difference in opinion between different parsers in: - * https://github.com/babel/babylon/issues/673 + * https://github.com/babel/babel/issues/6681 */ 'no-comment-template', // Purely AST diffs 'template-string-block' // Purely AST diffs @@ -123,10 +118,14 @@ let fixturePatternConfigsToTest = [ ignore: ['**/*'] }), + createFixturePatternConfigFor('javascript/simple-literals'), + + createFixturePatternConfigFor('javascript/directives'), + createFixturePatternConfigFor('javascript/experimentalObjectRestSpread', { ignore: [ /** - * Trailing comma is not permitted after a "RestElement" in Babylon + * Trailing comma is not permitted after a "RestElement" in Babel */ 'invalid-rest-trailing-comma' ] @@ -135,15 +134,14 @@ let fixturePatternConfigsToTest = [ createFixturePatternConfigFor('javascript/arrowFunctions', { ignore: [ /** - * Expected babylon parse errors - all of these files below produce parse errors in espree + * Expected babel parse errors - all of these files below produce parse errors in espree * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree * does not actually error on them and will produce an AST. */ - 'error-dup-params', // babylon parse errors - 'error-dup-params', // babylon parse errors - 'error-strict-dup-params', // babylon parse errors - 'error-strict-octal', // babylon parse errors - 'error-two-lines' // babylon parse errors + 'error-dup-params', // babel parse errors + 'error-strict-dup-params', // babel parse errors + 'error-strict-octal', // babel parse errors + 'error-two-lines' // babel parse errors ] }), @@ -156,14 +154,14 @@ let fixturePatternConfigsToTest = [ /** * super() is being used outside of constructor. Other parsers (e.g. espree, acorn) do not error on this. */ - 'class-one-method-super', // babylon parse errors + 'class-one-method-super', // babel parse errors /** - * Expected babylon parse errors - all of these files below produce parse errors in espree + * Expected babel parse errors - all of these files below produce parse errors in espree * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree * does not actually error on them and will produce an AST. */ - 'invalid-class-declaration', // babylon parse errors - 'invalid-class-setter-declaration' // babylon parse errors + 'invalid-class-declaration', // babel parse errors + 'invalid-class-setter-declaration' // babel parse errors ] }), @@ -172,11 +170,11 @@ let fixturePatternConfigsToTest = [ createFixturePatternConfigFor('javascript/destructuring', { ignore: [ /** - * Expected babylon parse errors - all of these files below produce parse errors in espree + * Expected babel parse errors - all of these files below produce parse errors in espree * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree * does not actually error on them and will produce an AST. */ - 'invalid-defaults-object-assign' // babylon parse errors + 'invalid-defaults-object-assign' // babel parse errors ] }), @@ -188,24 +186,25 @@ let fixturePatternConfigsToTest = [ createFixturePatternConfigFor('javascript/destructuring-and-spread', { ignore: [ /** - * Expected babylon parse errors - all of these files below produce parse errors in espree + * Expected babel parse errors - all of these files below produce parse errors in espree * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree * does not actually error on them and will produce an AST. */ - 'error-complex-destructured-spread-first' // babylon parse errors + 'error-complex-destructured-spread-first' // babel parse errors ] }), createFixturePatternConfigFor('javascript/experimentalAsyncIteration'), createFixturePatternConfigFor('javascript/experimentalDynamicImport'), createFixturePatternConfigFor('javascript/exponentiationOperators'), + createFixturePatternConfigFor('javascript/experimentalOptionalCatchBinding'), createFixturePatternConfigFor('javascript/forOf', { ignore: [ /** - * TypeScript, espree and acorn parse this fine - esprima, flow and babylon do not... + * TypeScript, espree and acorn parse this fine - esprima, flow and babel do not... */ - 'for-of-with-function-initializer' // babylon parse errors + 'for-of-with-function-initializer' // babel parse errors ] }), @@ -215,97 +214,41 @@ let fixturePatternConfigsToTest = [ createFixturePatternConfigFor('javascript/modules', { ignore: [ /** - * TypeScript, flow and babylon parse this fine - esprima, espree and acorn do not... - */ - 'invalid-export-default', // typescript-estree parse errors - /** - * Expected babylon parse errors - all of these files below produce parse errors in espree + * Expected babel parse errors - all of these files below produce parse errors in espree * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree * does not actually error on them and will produce an AST. */ - 'invalid-export-named-default', // babylon parse errors - 'invalid-import-default-module-specifier', // babylon parse errors - 'invalid-import-module-specifier', // babylon parse errors - /** - * Deleting local variable in strict mode - */ - 'error-delete', // babylon parse errors - /** - * 'with' in strict mode - */ - 'error-strict' // babylon parse errors + 'invalid-export-named-default', // babel parse errors + 'invalid-import-default-module-specifier', // babel parse errors + 'invalid-import-module-specifier' // babel parse errors ], - parseWithSourceTypeModule: [ - 'export-default-array', - 'export-default-class', - 'export-default-expression', - 'export-default-function', - 'export-default-named-class', - 'export-default-named-function', - 'export-default-number', - 'export-default-object', - 'export-default-value', - 'export-from-batch', - 'export-from-default', - 'export-from-named-as-default', - 'export-from-named-as-specifier', - 'export-from-named-as-specifiers', - 'export-from-specifier', - 'export-from-specifiers', - 'export-function', - 'export-named-as-default', - 'export-named-as-specifier', - 'export-named-as-specifiers', - 'export-named-class', - 'export-named-empty', - 'export-named-specifier', - 'export-named-specifiers-comma', - 'export-named-specifiers', - 'export-var-anonymous-function', - 'export-var-number', - 'export-var', - 'import-default-and-named-specifiers', - 'import-default-and-namespace-specifiers', - 'import-default-as', - 'import-default', - 'import-jquery', - 'import-module', - 'import-named-as-specifier', - 'import-named-as-specifiers', - 'import-named-empty', - 'import-named-specifier', - 'import-named-specifiers-comma', - 'import-named-specifiers', - 'import-namespace-specifier', - 'import-null-as-nil', - 'invalid-await', - 'invalid-class' - ] + ignoreSourceType: ['error-function', 'error-strict', 'error-delete'] }), createFixturePatternConfigFor('javascript/newTarget', { ignore: [ /** - * Expected babylon parse errors - all of these files below produce parse errors in espree + * Expected babel parse errors - all of these files below produce parse errors in espree * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree * does not actually error on them and will produce an AST. */ - 'invalid-new-target', // babylon parse errors - 'invalid-unknown-property' // babylon parse errors + 'invalid-new-target', // babel parse errors + 'invalid-unknown-property' // babel parse errors ] }), + createFixturePatternConfigFor('javascript/objectLiteral'), createFixturePatternConfigFor('javascript/objectLiteralComputedProperties'), createFixturePatternConfigFor('javascript/objectLiteralDuplicateProperties', { ignore: [ /** - * Expected babylon parse errors - all of these files below produce parse errors in espree + * Expected babel parse errors - all of these files below produce parse errors in espree * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree * does not actually error on them and will produce an AST. */ - 'error-proto-property', // babylon parse errors - 'error-proto-string-property' // babylon parse errors + 'error-proto-property', // babel parse errors + 'error-proto-string-property' // babel parse errors ] }), @@ -319,18 +262,23 @@ let fixturePatternConfigsToTest = [ createFixturePatternConfigFor('javascript/restParams', { ignore: [ /** - * Expected babylon parse errors - all of these files below produce parse errors in espree + * Expected babel parse errors - all of these files below produce parse errors in espree * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree * does not actually error on them and will produce an AST. */ - 'error-no-default', // babylon parse errors - 'error-not-last' // babylon parse errors + 'error-no-default', // babel parse errors + 'error-not-last' // babel parse errors ] }), createFixturePatternConfigFor('javascript/spread'), createFixturePatternConfigFor('javascript/unicodeCodePointEscapes'), - createFixturePatternConfigFor('jsx', { ignore: jsxFilesWithKnownIssues }), + + /* ================================================== */ + + createFixturePatternConfigFor('jsx', { + ignore: jsxFilesWithKnownIssues + }), createFixturePatternConfigFor('jsx-useJSXTextNode'), /* ================================================== */ @@ -340,17 +288,7 @@ let fixturePatternConfigsToTest = [ */ createFixturePatternConfigFor('tsx', { - fileType: 'tsx', - ignore: [ - /** - * AST difference - */ - 'react-typed-props', - /** - * currently babylon not supported - */ - 'generic-jsx-element' - ] + fileType: 'tsx' }), /* ================================================== */ @@ -367,31 +305,31 @@ let fixturePatternConfigsToTest = [ fileType: 'ts', ignore: [ /** - * Other babylon parse errors relating to invalid syntax. + * Other babel parse errors relating to invalid syntax. */ - 'abstract-class-with-abstract-constructor', // babylon parse errors - 'class-with-export-parameter-properties', // babylon parse errors - 'class-with-optional-methods', // babylon parse errors - 'class-with-static-parameter-properties', // babylon parse errors - 'interface-with-all-property-types', // babylon parse errors - 'interface-with-construct-signature-with-parameter-accessibility', // babylon parse errors - 'class-with-implements-and-extends', // babylon parse errors + 'abstract-class-with-abstract-constructor', // babel parse errors + 'class-with-export-parameter-properties', // babel parse errors + 'class-with-implements-and-extends', // babel parse errors + 'class-with-optional-methods', // babel parse errors + 'class-with-static-parameter-properties', // babel parse errors + 'interface-with-all-property-types', // babel parse errors + 'interface-with-construct-signature-with-parameter-accessibility', // babel parse errors /** - * typescript-estree erroring, but babylon not. + * typescript-estree erroring, but babel not. */ 'arrow-function-with-type-parameters', // typescript-estree parse errors /** - * Babylon: ClassDeclaration + abstract: true + * Babel: ClassDeclaration + abstract: true * tsep: TSAbstractClassDeclaration */ 'abstract-class-with-abstract-properties', /** - * Babylon: ClassProperty + abstract: true + * Babel: ClassProperty + abstract: true * tsep: TSAbstractClassProperty */ 'abstract-class-with-abstract-readonly-property', /** - * Babylon: TSExpressionWithTypeArguments + * Babel: TSExpressionWithTypeArguments * tsep: ClassImplements */ 'class-with-implements-generic-multiple', @@ -414,41 +352,56 @@ let fixturePatternConfigsToTest = [ 'typed-this', 'export-type-function-declaration', 'abstract-interface', - 'keyof-operator', - /** - * tsep bug - Program.body[0].expression.left.properties[0].value.right is currently showing up - * as `ArrayPattern`, babylon, acorn and espree say it should be `ArrayExpression` - * TODO: Fix this - */ - 'destructuring-assignment', /** - * Babylon bug for optional or abstract methods? + * Babel bug for optional or abstract methods? */ - 'abstract-class-with-abstract-method', // babylon parse errors - 'abstract-class-with-optional-method', // babylon parse errors - 'declare-class-with-optional-method', // babylon parse errors + 'abstract-class-with-abstract-method', // babel parse errors + 'abstract-class-with-optional-method', // babel parse errors + 'declare-class-with-optional-method', // babel parse errors /** - * Awaiting feedback on Babylon issue https://github.com/babel/babylon/issues/700 + * Awaiting feedback on Babel issue https://github.com/babel/babel/issues/6679 */ 'class-with-private-parameter-properties', 'class-with-protected-parameter-properties', 'class-with-public-parameter-properties', 'class-with-readonly-parameter-properties', /** - * Not yet supported in Babylon https://github.com/babel/babel/issues/7749 + * Not yet supported in Babel https://github.com/babel/babel/issues/7749 */ 'import-type', - 'import-type-with-type-parameters-in-type-reference' + 'import-type-with-type-parameters-in-type-reference', + /** + * babel is not supporting it yet https://github.com/babel/babel/pull/9230 + * Babel: TSTypeReference -> Identifier + * tsep: TSBigIntKeyword + */ + 'typed-keyword-bigint', + /** + * Awaiting feedback on Babel issue https://github.com/babel/babel/issues/9228 + * Babel: BooleanLiteral + * tsep: Literal + */ + 'typed-keyword-true', + /** + * Not yet supported in Babel https://github.com/babel/babel/issues/9228 + * Babel: BooleanLiteral + * tsep: Literal + */ + 'typed-keyword-false', + /** + * Not yet supported in Babel https://github.com/babel/babel/issues/9228 + * Directive field is not added to module and namespace + */ + 'directive-in-module', + /** + * Not yet supported in Babel https://github.com/babel/babel/issues/9228 + * Directive field is not added to module and namespace + */ + 'directive-in-namespace' ], - parseWithSourceTypeModule: [ - 'export-named-enum', - 'export-assignment', - 'export-type-alias-declaration', - 'export-type-class-declaration', - 'export-default-class-with-generic', - 'export-default-class-with-multiple-generics', - 'export-named-class-with-generic', - 'export-named-class-with-multiple-generics' + ignoreSourceType: [ + // https://github.com/babel/babel/issues/9213 + 'export-assignment' ] }), @@ -486,30 +439,34 @@ let fixturePatternConfigsToTest = [ */ 'interface-empty-extends', /** - * TypeScript-specific tests taken from "errorRecovery". Babylon is not being as forgiving as the TypeScript compiler here. + * TypeScript-specific tests taken from "errorRecovery". Babel is not being as forgiving as the TypeScript compiler here. */ - 'class-empty-extends-implements', // babylon parse errors - 'class-empty-extends', // babylon parse errors - 'decorator-on-enum-declaration', // babylon parse errors - 'decorator-on-interface-declaration', // babylon parse errors - 'interface-property-modifiers', // babylon parse errors - 'enum-with-keywords' // babylon parse errors + 'class-empty-extends-implements', // babel parse errors + 'class-empty-extends', // babel parse errors + 'decorator-on-enum-declaration', // babel parse errors + 'decorator-on-interface-declaration', // babel parse errors + 'interface-property-modifiers', // babel parse errors + 'enum-with-keywords' // babel parse errors ] }), + createFixturePatternConfigFor('typescript/types', { + fileType: 'ts' + }), + createFixturePatternConfigFor('typescript/declare', { fileType: 'ts', ignore: [ /** * AST difference - * tsep: TSAbstractClassDeclaration - * babel: ClassDeclaration[abstract=true] + * tsep: heritage = [] + * babel: heritage = undefined */ 'interface', /** * AST difference - * tsep: heritage = [] - * babel: heritage = undefined + * tsep: TSAbstractClassDeclaration + * babel: ClassDeclaration[abstract=true] */ 'abstract-class' ] @@ -523,10 +480,14 @@ let fixturePatternConfigsToTest = [ */ 'nested-internal-module', /** - * Babylon: TSDeclareFunction + * Babel: TSDeclareFunction * tsep: TSNamespaceFunctionDeclaration */ 'declare-namespace-with-exported-function' + ], + ignoreSourceType: [ + 'module-with-default-exports', + 'ambient-module-declaration-with-import' ] }) ]; @@ -540,7 +501,6 @@ fixturePatternConfigsToTest = ([] as FixturePatternConfig[]).concat( ); const fixturesToTest: Fixture[] = []; -const fixturesDirPath = path.join(__dirname, '../fixtures'); /** * Resolve the glob patterns into actual Fixture files that we can run assertions for... @@ -556,7 +516,7 @@ fixturePatternConfigsToTest.forEach(fixturePatternConfig => { matchingFixtures.forEach(filename => { fixturesToTest.push({ filename, - config: fixturePatternConfig.config + ignoreSourceType: fixturePatternConfig.ignoreSourceType }); }); }); diff --git a/tests/ast-alignment/parse.ts b/tests/ast-alignment/parse.ts index 85e53bd..c5df123 100644 --- a/tests/ast-alignment/parse.ts +++ b/tests/ast-alignment/parse.ts @@ -19,12 +19,12 @@ function parseWithBabelParser( parserOptions?: BabelParserOptions ) { parserOptions = parserOptions || {}; - const babylon = require('@babel/parser'); - return babylon.parse( + const babel = require('@babel/parser'); + return babel.parse( text, Object.assign( { - sourceType: 'script', + sourceType: 'unambiguous', allowImportExportEverywhere: true, allowReturnOutsideFunction: true, ranges: true, diff --git a/tests/ast-alignment/spec.ts b/tests/ast-alignment/spec.ts index 7ab17c7..31814b9 100644 --- a/tests/ast-alignment/spec.ts +++ b/tests/ast-alignment/spec.ts @@ -7,35 +7,29 @@ fixturesToTest.forEach(fixture => { const filename = fixture.filename; const source = fs.readFileSync(filename, 'utf8').replace(/\r\n/g, '\n'); - const config = fixture.config || {}; - config.typeScriptESTreeOptions = config.typeScriptESTreeOptions || {}; - config.babelParserOptions = config.babelParserOptions || {}; - /** * Parse with typescript-estree */ const typeScriptESTreeResult = parse(source, { - parser: 'typescript-estree', - typeScriptESTreeOptions: config.typeScriptESTreeOptions + parser: 'typescript-estree' }); /** - * Parse the source with babylon typescript-plugin + * Parse the source with @babel/parser typescript-plugin */ const babelParserResult = parse(source, { - parser: '@babel/parser', - babelParserOptions: config.babelParserOptions + parser: '@babel/parser' }); /** - * If babylon fails to parse the source, ensure that typescript-estree has the same fundamental issue + * If babel fails to parse the source, ensure that typescript-estree has the same fundamental issue */ if (babelParserResult.parseError) { /** - * FAIL: babylon errored but typescript-estree did not + * FAIL: babel errored but typescript-estree did not */ if (!typeScriptESTreeResult.parseError) { - it(`TEST FAIL [BABYLON ERRORED, BUT TSEP DID NOT] - ${filename}`, () => { + it(`TEST FAIL [BABEL ERRORED, BUT TSEP DID NOT] - ${filename}`, () => { expect(typeScriptESTreeResult.parseError).toEqual( babelParserResult.parseError ); @@ -54,10 +48,10 @@ fixturesToTest.forEach(fixture => { } /** - * FAIL: typescript-estree errored but babylon did not + * FAIL: typescript-estree errored but babel did not */ if (typeScriptESTreeResult.parseError) { - it(`TEST FAIL [TSEP ERRORED, BUT BABYLON DID NOT] - ${filename}`, () => { + it(`TEST FAIL [TSEP ERRORED, BUT BABEL DID NOT] - ${filename}`, () => { expect(babelParserResult.parseError).toEqual( typeScriptESTreeResult.parseError ); @@ -72,14 +66,18 @@ fixturesToTest.forEach(fixture => { expect(babelParserResult.ast).toBeTruthy(); expect(typeScriptESTreeResult.ast).toBeTruthy(); /** - * Perform some extra formatting steps on the babylon AST before comparing + * Perform some extra formatting steps on the babel AST before comparing */ expect( - parseUtils.removeLocationDataFromProgramNode( - parseUtils.preprocessBabylonAST(babelParserResult.ast) + parseUtils.removeLocationDataAndSourceTypeFromProgramNode( + parseUtils.preprocessBabylonAST(babelParserResult.ast), + fixture.ignoreSourceType ) ).toEqual( - parseUtils.removeLocationDataFromProgramNode(typeScriptESTreeResult.ast) + parseUtils.removeLocationDataAndSourceTypeFromProgramNode( + typeScriptESTreeResult.ast, + fixture.ignoreSourceType + ) ); }); }); diff --git a/tests/ast-alignment/utils.ts b/tests/ast-alignment/utils.ts index 95fb1f9..8dbf441 100644 --- a/tests/ast-alignment/utils.ts +++ b/tests/ast-alignment/utils.ts @@ -107,10 +107,6 @@ export function preprocessBabylonAST(ast: any): any { key: 'directives', predicate: always }, - { - key: 'directive', - predicate: always - }, { key: 'innerComments', predicate: always @@ -142,10 +138,17 @@ export function preprocessBabylonAST(ast: any): any { * See: https://github.com/babel/babylon/issues/673 * * @param {Object} ast the raw AST with a Program node at its top level + * @param {boolean} ignoreSourceType fix for issues with unambiguous type detection * @returns {Object} the ast with the location data removed from the Program node */ -export function removeLocationDataFromProgramNode(ast: any) { +export function removeLocationDataAndSourceTypeFromProgramNode( + ast: any, + ignoreSourceType: boolean +) { delete ast.loc; delete ast.range; + if (ignoreSourceType) { + delete ast.sourceType; + } return ast; } diff --git a/tests/fixtures/javascript/destructuring/defaults-object-assign.src.js b/tests/fixtures/javascript/destructuring/defaults-object-assign.src.js new file mode 100644 index 0000000..4f84af4 --- /dev/null +++ b/tests/fixtures/javascript/destructuring/defaults-object-assign.src.js @@ -0,0 +1 @@ +({ Object=0, String=0 } = {}) diff --git a/tests/fixtures/javascript/directives/block.src.js b/tests/fixtures/javascript/directives/block.src.js new file mode 100644 index 0000000..8d54ee0 --- /dev/null +++ b/tests/fixtures/javascript/directives/block.src.js @@ -0,0 +1,5 @@ +function foo() { + "use strict"; + var a = 1; + "use strict"; +} diff --git a/tests/fixtures/javascript/directives/directive-in-class.src.js b/tests/fixtures/javascript/directives/directive-in-class.src.js new file mode 100644 index 0000000..2d2f36d --- /dev/null +++ b/tests/fixtures/javascript/directives/directive-in-class.src.js @@ -0,0 +1,19 @@ +"use strict"; + +class Foo { + constructor () { + "use strict"; + } + + get foo () { + "use strict"; + } + + set foo (value) { + "use strict"; + } + + method () { + "use strict"; + } +} diff --git a/tests/fixtures/javascript/directives/function-non-strict.src.js b/tests/fixtures/javascript/directives/function-non-strict.src.js new file mode 100644 index 0000000..783e003 --- /dev/null +++ b/tests/fixtures/javascript/directives/function-non-strict.src.js @@ -0,0 +1,4 @@ +function foo () { + "use smth" + 1+1; +} diff --git a/tests/fixtures/javascript/directives/non-directive-string.src.js b/tests/fixtures/javascript/directives/non-directive-string.src.js new file mode 100644 index 0000000..51697ce --- /dev/null +++ b/tests/fixtures/javascript/directives/non-directive-string.src.js @@ -0,0 +1,16 @@ +if (true) { + "use strict" +} + +switch (true) { + case false: { + "use strict" + } + default: { + "use strict" + } +} + +while (true) { + "use strict" +} diff --git a/tests/fixtures/javascript/directives/program-order.src.js b/tests/fixtures/javascript/directives/program-order.src.js new file mode 100644 index 0000000..43e689e --- /dev/null +++ b/tests/fixtures/javascript/directives/program-order.src.js @@ -0,0 +1,3 @@ +"use strict"; +"use loose"; +var a; diff --git a/tests/fixtures/javascript/directives/program.src.js b/tests/fixtures/javascript/directives/program.src.js new file mode 100644 index 0000000..6603b9c --- /dev/null +++ b/tests/fixtures/javascript/directives/program.src.js @@ -0,0 +1,3 @@ +"use strict"; +var a = 1; +"use strict"; diff --git a/tests/fixtures/javascript/directives/raw.src.js b/tests/fixtures/javascript/directives/raw.src.js new file mode 100644 index 0000000..10ecb3d --- /dev/null +++ b/tests/fixtures/javascript/directives/raw.src.js @@ -0,0 +1 @@ +"use\x20strict"; diff --git a/tests/fixtures/javascript/simple-literals/literal-float-negative.src.js b/tests/fixtures/javascript/simple-literals/literal-float-negative.src.js new file mode 100644 index 0000000..32ebbd0 --- /dev/null +++ b/tests/fixtures/javascript/simple-literals/literal-float-negative.src.js @@ -0,0 +1 @@ +const a = -1.5; diff --git a/tests/fixtures/javascript/simple-literals/literal-float.src.js b/tests/fixtures/javascript/simple-literals/literal-float.src.js new file mode 100644 index 0000000..0c12a9e --- /dev/null +++ b/tests/fixtures/javascript/simple-literals/literal-float.src.js @@ -0,0 +1 @@ +const a = 1.5; diff --git a/tests/fixtures/javascript/simple-literals/literal-null.src.js b/tests/fixtures/javascript/simple-literals/literal-null.src.js new file mode 100644 index 0000000..d6c4ab0 --- /dev/null +++ b/tests/fixtures/javascript/simple-literals/literal-null.src.js @@ -0,0 +1 @@ +const a = null; diff --git a/tests/fixtures/javascript/simple-literals/literal-number-negative.src.js b/tests/fixtures/javascript/simple-literals/literal-number-negative.src.js new file mode 100644 index 0000000..143a6b3 --- /dev/null +++ b/tests/fixtures/javascript/simple-literals/literal-number-negative.src.js @@ -0,0 +1 @@ +const a = -1; diff --git a/tests/fixtures/javascript/simple-literals/literal-number.src.js b/tests/fixtures/javascript/simple-literals/literal-number.src.js new file mode 100644 index 0000000..54b82a0 --- /dev/null +++ b/tests/fixtures/javascript/simple-literals/literal-number.src.js @@ -0,0 +1 @@ +const a = 1; diff --git a/tests/fixtures/javascript/simple-literals/literal-string.src.js b/tests/fixtures/javascript/simple-literals/literal-string.src.js new file mode 100644 index 0000000..25b4331 --- /dev/null +++ b/tests/fixtures/javascript/simple-literals/literal-string.src.js @@ -0,0 +1 @@ +const a = 'a'; diff --git a/tests/fixtures/javascript/simple-literals/literal-undefined.src.js b/tests/fixtures/javascript/simple-literals/literal-undefined.src.js new file mode 100644 index 0000000..0257085 --- /dev/null +++ b/tests/fixtures/javascript/simple-literals/literal-undefined.src.js @@ -0,0 +1 @@ +const a = undefined; diff --git a/tests/fixtures/typescript/basics/class-with-mixin-reference.src.ts b/tests/fixtures/typescript/basics/class-with-mixin-reference.src.ts new file mode 100644 index 0000000..9ba1bfd --- /dev/null +++ b/tests/fixtures/typescript/basics/class-with-mixin-reference.src.ts @@ -0,0 +1,2 @@ +function M>(Base: T) { +} diff --git a/tests/fixtures/typescript/basics/destructuring-assignment-nested.src.ts b/tests/fixtures/typescript/basics/destructuring-assignment-nested.src.ts new file mode 100644 index 0000000..0c7c1bf --- /dev/null +++ b/tests/fixtures/typescript/basics/destructuring-assignment-nested.src.ts @@ -0,0 +1 @@ +({ foo: { bar: { baz: [a, { foo: [x] = [3] } = { foo: [2]}] = [] } = {} } = { } } = { foo: { bar: { baz: [2, { foo: [3] }] } }}); diff --git a/tests/fixtures/typescript/basics/destructuring-assignment-object.src.ts b/tests/fixtures/typescript/basics/destructuring-assignment-object.src.ts new file mode 100644 index 0000000..29aaf2c --- /dev/null +++ b/tests/fixtures/typescript/basics/destructuring-assignment-object.src.ts @@ -0,0 +1 @@ +({ foo = {} } = bar); diff --git a/tests/fixtures/typescript/basics/destructuring-assignment-property.src.ts b/tests/fixtures/typescript/basics/destructuring-assignment-property.src.ts new file mode 100644 index 0000000..2958638 --- /dev/null +++ b/tests/fixtures/typescript/basics/destructuring-assignment-property.src.ts @@ -0,0 +1,3 @@ +function Foo({ foo = [] } = bar) { + +} diff --git a/tests/fixtures/typescript/basics/directive-in-module.src.ts b/tests/fixtures/typescript/basics/directive-in-module.src.ts new file mode 100644 index 0000000..2cb68ab --- /dev/null +++ b/tests/fixtures/typescript/basics/directive-in-module.src.ts @@ -0,0 +1,5 @@ +module foo { + "use strict"; + var a = 1; + "use strict"; +} diff --git a/tests/fixtures/typescript/basics/directive-in-namespace.src.ts b/tests/fixtures/typescript/basics/directive-in-namespace.src.ts new file mode 100644 index 0000000..80bc6c5 --- /dev/null +++ b/tests/fixtures/typescript/basics/directive-in-namespace.src.ts @@ -0,0 +1,5 @@ +namespace foo { + "use strict"; + var a = 1; + "use strict"; +} diff --git a/tests/fixtures/typescript/basics/typed-keyword-bigint.src.ts b/tests/fixtures/typescript/basics/typed-keyword-bigint.src.ts new file mode 100644 index 0000000..c02b862 --- /dev/null +++ b/tests/fixtures/typescript/basics/typed-keyword-bigint.src.ts @@ -0,0 +1 @@ +type Foo = bigint diff --git a/tests/fixtures/typescript/basics/typed-keyword-boolean.src.ts b/tests/fixtures/typescript/basics/typed-keyword-boolean.src.ts new file mode 100644 index 0000000..3d441e3 --- /dev/null +++ b/tests/fixtures/typescript/basics/typed-keyword-boolean.src.ts @@ -0,0 +1 @@ +type Foo = boolean diff --git a/tests/fixtures/typescript/basics/typed-keyword-false.src.ts b/tests/fixtures/typescript/basics/typed-keyword-false.src.ts new file mode 100644 index 0000000..b9c6360 --- /dev/null +++ b/tests/fixtures/typescript/basics/typed-keyword-false.src.ts @@ -0,0 +1 @@ +type Foo = false diff --git a/tests/fixtures/typescript/basics/typed-keyword-never.src.ts b/tests/fixtures/typescript/basics/typed-keyword-never.src.ts new file mode 100644 index 0000000..1f2b390 --- /dev/null +++ b/tests/fixtures/typescript/basics/typed-keyword-never.src.ts @@ -0,0 +1 @@ +type Foo = never diff --git a/tests/fixtures/typescript/basics/typed-keyword-null.src.ts b/tests/fixtures/typescript/basics/typed-keyword-null.src.ts new file mode 100644 index 0000000..da97119 --- /dev/null +++ b/tests/fixtures/typescript/basics/typed-keyword-null.src.ts @@ -0,0 +1 @@ +type Foo = null diff --git a/tests/fixtures/typescript/basics/typed-keyword-number.src.ts b/tests/fixtures/typescript/basics/typed-keyword-number.src.ts new file mode 100644 index 0000000..9133270 --- /dev/null +++ b/tests/fixtures/typescript/basics/typed-keyword-number.src.ts @@ -0,0 +1 @@ +type Foo = number diff --git a/tests/fixtures/typescript/basics/typed-keyword-object.src.ts b/tests/fixtures/typescript/basics/typed-keyword-object.src.ts new file mode 100644 index 0000000..0a689a9 --- /dev/null +++ b/tests/fixtures/typescript/basics/typed-keyword-object.src.ts @@ -0,0 +1 @@ +type Foo = object diff --git a/tests/fixtures/typescript/basics/typed-keyword-string.src.ts b/tests/fixtures/typescript/basics/typed-keyword-string.src.ts new file mode 100644 index 0000000..d508231 --- /dev/null +++ b/tests/fixtures/typescript/basics/typed-keyword-string.src.ts @@ -0,0 +1 @@ +type Foo = string diff --git a/tests/fixtures/typescript/basics/typed-keyword-symbol.src.ts b/tests/fixtures/typescript/basics/typed-keyword-symbol.src.ts new file mode 100644 index 0000000..a5d3de1 --- /dev/null +++ b/tests/fixtures/typescript/basics/typed-keyword-symbol.src.ts @@ -0,0 +1 @@ +type Foo = symbol diff --git a/tests/fixtures/typescript/basics/typed-keyword-true.src.ts b/tests/fixtures/typescript/basics/typed-keyword-true.src.ts new file mode 100644 index 0000000..6906160 --- /dev/null +++ b/tests/fixtures/typescript/basics/typed-keyword-true.src.ts @@ -0,0 +1 @@ +type Foo = true diff --git a/tests/fixtures/typescript/basics/typed-keyword-undefined.src.ts b/tests/fixtures/typescript/basics/typed-keyword-undefined.src.ts new file mode 100644 index 0000000..588094c --- /dev/null +++ b/tests/fixtures/typescript/basics/typed-keyword-undefined.src.ts @@ -0,0 +1 @@ +type Foo = undefined diff --git a/tests/fixtures/typescript/basics/typed-keyword-unknown.src.ts b/tests/fixtures/typescript/basics/typed-keyword-unknown.src.ts new file mode 100644 index 0000000..cbdeb16 --- /dev/null +++ b/tests/fixtures/typescript/basics/typed-keyword-unknown.src.ts @@ -0,0 +1 @@ +type Foo = unknown diff --git a/tests/fixtures/typescript/basics/typed-keyword-void.src.ts b/tests/fixtures/typescript/basics/typed-keyword-void.src.ts new file mode 100644 index 0000000..d62ee2c --- /dev/null +++ b/tests/fixtures/typescript/basics/typed-keyword-void.src.ts @@ -0,0 +1 @@ +type Foo = void diff --git a/tests/fixtures/typescript/types/array-type.src.ts b/tests/fixtures/typescript/types/array-type.src.ts new file mode 100644 index 0000000..5d038fc --- /dev/null +++ b/tests/fixtures/typescript/types/array-type.src.ts @@ -0,0 +1 @@ +type Foo = string[] diff --git a/tests/fixtures/typescript/types/conditional-with-null.src.ts b/tests/fixtures/typescript/types/conditional-with-null.src.ts new file mode 100644 index 0000000..c776486 --- /dev/null +++ b/tests/fixtures/typescript/types/conditional-with-null.src.ts @@ -0,0 +1 @@ +let x: number extends string ? boolean : null; diff --git a/tests/fixtures/typescript/types/conditional.src.ts b/tests/fixtures/typescript/types/conditional.src.ts new file mode 100644 index 0000000..da72fcb --- /dev/null +++ b/tests/fixtures/typescript/types/conditional.src.ts @@ -0,0 +1 @@ +let x: number extends string ? boolean : string; diff --git a/tests/fixtures/typescript/types/indexed.src.ts b/tests/fixtures/typescript/types/indexed.src.ts new file mode 100644 index 0000000..4a5809f --- /dev/null +++ b/tests/fixtures/typescript/types/indexed.src.ts @@ -0,0 +1 @@ +let x: T[K]; diff --git a/tests/fixtures/typescript/types/intersection-type.src.ts b/tests/fixtures/typescript/types/intersection-type.src.ts new file mode 100644 index 0000000..93da940 --- /dev/null +++ b/tests/fixtures/typescript/types/intersection-type.src.ts @@ -0,0 +1 @@ +type LinkedList = T & { next: LinkedList }; diff --git a/tests/fixtures/typescript/types/mapped-readonly-minus.src.ts b/tests/fixtures/typescript/types/mapped-readonly-minus.src.ts new file mode 100644 index 0000000..a7a1183 --- /dev/null +++ b/tests/fixtures/typescript/types/mapped-readonly-minus.src.ts @@ -0,0 +1 @@ +let map: { -readonly [P in string]-?: number }; diff --git a/tests/fixtures/typescript/types/mapped-readonly-plus.src.ts b/tests/fixtures/typescript/types/mapped-readonly-plus.src.ts new file mode 100644 index 0000000..854fb5d --- /dev/null +++ b/tests/fixtures/typescript/types/mapped-readonly-plus.src.ts @@ -0,0 +1 @@ +let map: { +readonly [P in string]+?: number; }; diff --git a/tests/fixtures/typescript/types/mapped-readonly.src.ts b/tests/fixtures/typescript/types/mapped-readonly.src.ts new file mode 100644 index 0000000..ef13a05 --- /dev/null +++ b/tests/fixtures/typescript/types/mapped-readonly.src.ts @@ -0,0 +1 @@ +let map: { readonly [P in string]?: number; }; diff --git a/tests/fixtures/typescript/types/mapped.src.ts b/tests/fixtures/typescript/types/mapped.src.ts new file mode 100644 index 0000000..aca2ba1 --- /dev/null +++ b/tests/fixtures/typescript/types/mapped.src.ts @@ -0,0 +1 @@ +let map: { [P in string]: number; }; diff --git a/tests/fixtures/typescript/types/nested-types.src.ts b/tests/fixtures/typescript/types/nested-types.src.ts new file mode 100644 index 0000000..adaf9a3 --- /dev/null +++ b/tests/fixtures/typescript/types/nested-types.src.ts @@ -0,0 +1 @@ +type Foo = [number, string?, boolean?] | [{}, [number?] | null & boolean[]] & {} diff --git a/tests/fixtures/typescript/types/parenthesized-type.src.ts b/tests/fixtures/typescript/types/parenthesized-type.src.ts new file mode 100644 index 0000000..5a03e27 --- /dev/null +++ b/tests/fixtures/typescript/types/parenthesized-type.src.ts @@ -0,0 +1 @@ +type Foo = (string | number) diff --git a/tests/fixtures/typescript/types/reference-generic-nested.src.ts b/tests/fixtures/typescript/types/reference-generic-nested.src.ts new file mode 100644 index 0000000..e38dfca --- /dev/null +++ b/tests/fixtures/typescript/types/reference-generic-nested.src.ts @@ -0,0 +1 @@ +let x: Array>; diff --git a/tests/fixtures/typescript/types/reference-generic.src.ts b/tests/fixtures/typescript/types/reference-generic.src.ts new file mode 100644 index 0000000..4925bd4 --- /dev/null +++ b/tests/fixtures/typescript/types/reference-generic.src.ts @@ -0,0 +1 @@ +let x: Array; diff --git a/tests/fixtures/typescript/types/reference.src.ts b/tests/fixtures/typescript/types/reference.src.ts new file mode 100644 index 0000000..330fb1d --- /dev/null +++ b/tests/fixtures/typescript/types/reference.src.ts @@ -0,0 +1 @@ +let x: T; diff --git a/tests/fixtures/typescript/types/tuple-empty.src.ts b/tests/fixtures/typescript/types/tuple-empty.src.ts new file mode 100644 index 0000000..f7cd7b5 --- /dev/null +++ b/tests/fixtures/typescript/types/tuple-empty.src.ts @@ -0,0 +1 @@ +let x: []; diff --git a/tests/fixtures/typescript/types/tuple-optional.src.ts b/tests/fixtures/typescript/types/tuple-optional.src.ts new file mode 100644 index 0000000..3b8d21b --- /dev/null +++ b/tests/fixtures/typescript/types/tuple-optional.src.ts @@ -0,0 +1 @@ +let x: [string, number?, (string | number)?] diff --git a/tests/fixtures/typescript/types/tuple-rest.src.ts b/tests/fixtures/typescript/types/tuple-rest.src.ts new file mode 100644 index 0000000..d7719b2 --- /dev/null +++ b/tests/fixtures/typescript/types/tuple-rest.src.ts @@ -0,0 +1 @@ +let x: [string, ...number[]] diff --git a/tests/fixtures/typescript/types/tuple-type.src.ts b/tests/fixtures/typescript/types/tuple-type.src.ts new file mode 100644 index 0000000..75a6d8e --- /dev/null +++ b/tests/fixtures/typescript/types/tuple-type.src.ts @@ -0,0 +1 @@ +type Foo = [string, string?] diff --git a/tests/fixtures/typescript/types/tuple.src.ts b/tests/fixtures/typescript/types/tuple.src.ts new file mode 100644 index 0000000..53c8e72 --- /dev/null +++ b/tests/fixtures/typescript/types/tuple.src.ts @@ -0,0 +1 @@ +let x: [number, number, number]; diff --git a/tests/fixtures/typescript/types/type-literal.src.ts b/tests/fixtures/typescript/types/type-literal.src.ts new file mode 100644 index 0000000..4193f36 --- /dev/null +++ b/tests/fixtures/typescript/types/type-literal.src.ts @@ -0,0 +1 @@ +let obj: { x: number }; diff --git a/tests/fixtures/typescript/types/type-operator.src.ts b/tests/fixtures/typescript/types/type-operator.src.ts new file mode 100644 index 0000000..1d23f96 --- /dev/null +++ b/tests/fixtures/typescript/types/type-operator.src.ts @@ -0,0 +1,2 @@ +let x: keyof T; +let y: unique symbol; diff --git a/tests/fixtures/typescript/types/typeof.src.ts b/tests/fixtures/typescript/types/typeof.src.ts new file mode 100644 index 0000000..eebcd19 --- /dev/null +++ b/tests/fixtures/typescript/types/typeof.src.ts @@ -0,0 +1 @@ +let x: typeof y.z; diff --git a/tests/fixtures/typescript/types/union-intersection.src.ts b/tests/fixtures/typescript/types/union-intersection.src.ts new file mode 100644 index 0000000..93f391f --- /dev/null +++ b/tests/fixtures/typescript/types/union-intersection.src.ts @@ -0,0 +1,4 @@ +let union: number | null | undefined; +let intersection: number & string; +let precedence1: number | string & boolean; +let precedence2: number & string | boolean; diff --git a/tests/fixtures/typescript/types/union-type.src.ts b/tests/fixtures/typescript/types/union-type.src.ts new file mode 100644 index 0000000..a2cfaf9 --- /dev/null +++ b/tests/fixtures/typescript/types/union-type.src.ts @@ -0,0 +1 @@ +type Foo = string & number diff --git a/tests/lib/__snapshots__/javascript.ts.snap b/tests/lib/__snapshots__/javascript.ts.snap index eaad453..2e5e845 100644 --- a/tests/lib/__snapshots__/javascript.ts.snap +++ b/tests/lib/__snapshots__/javascript.ts.snap @@ -2921,6 +2921,7 @@ exports[`javascript fixtures/arrowFunctions/error-strict-default-param-eval.src Object { "body": Array [ Object { + "directive": "use strict", "expression": Object { "loc": Object { "end": Object { @@ -3275,6 +3276,7 @@ exports[`javascript fixtures/arrowFunctions/error-strict-dup-params.src 1`] = ` Object { "body": Array [ Object { + "directive": "use strict", "expression": Object { "loc": Object { "end": Object { @@ -3616,6 +3618,7 @@ Object { "body": Object { "body": Array [ Object { + "directive": "use strict", "expression": Object { "loc": Object { "end": Object { @@ -3947,6 +3950,7 @@ exports[`javascript fixtures/arrowFunctions/error-strict-eval-return.src 1`] = ` Object { "body": Array [ Object { + "directive": "use strict", "expression": Object { "loc": Object { "end": Object { @@ -4211,6 +4215,7 @@ exports[`javascript fixtures/arrowFunctions/error-strict-octal.src 1`] = ` Object { "body": Array [ Object { + "directive": "use strict", "expression": Object { "loc": Object { "end": Object { @@ -4493,6 +4498,7 @@ exports[`javascript fixtures/arrowFunctions/error-strict-param-arguments.src 1`] Object { "body": Array [ Object { + "directive": "use strict", "expression": Object { "loc": Object { "end": Object { @@ -4829,6 +4835,7 @@ exports[`javascript fixtures/arrowFunctions/error-strict-param-eval.src 1`] = ` Object { "body": Array [ Object { + "directive": "use strict", "expression": Object { "loc": Object { "end": Object { @@ -5165,6 +5172,7 @@ exports[`javascript fixtures/arrowFunctions/error-strict-param-names.src 1`] = ` Object { "body": Array [ Object { + "directive": "use strict", "expression": Object { "loc": Object { "end": Object { @@ -5501,6 +5509,7 @@ exports[`javascript fixtures/arrowFunctions/error-strict-param-no-paren-argument Object { "body": Array [ Object { + "directive": "use strict", "expression": Object { "loc": Object { "end": Object { @@ -5747,6 +5756,7 @@ exports[`javascript fixtures/arrowFunctions/error-strict-param-no-paren-eval.src Object { "body": Array [ Object { + "directive": "use strict", "expression": Object { "loc": Object { "end": Object { @@ -38903,163 +38913,254 @@ Object { } `; -exports[`javascript fixtures/destructuring/defaults-object-longform.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-assign.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, + "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 { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "Object", + "range": Array [ + 3, + 9, + ], + "type": "Identifier", }, - "start": Object { - "column": 4, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { + "method": false, + "range": Array [ + 3, + 11, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 1, }, "start": Object { - "column": 6, + "column": 3, "line": 1, }, }, - "name": "x", + "name": "Object", "range": Array [ - 6, - 7, + 3, + 9, ], "type": "Identifier", }, - "kind": "init", "loc": Object { "end": Object { - "column": 15, + "column": 11, "line": 1, }, "start": Object { - "column": 6, + "column": 3, "line": 1, }, }, - "method": false, "range": Array [ - 6, - 15, + 3, + 11, ], - "shorthand": false, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, }, - "name": "x", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, }, + }, + "name": "String", + "range": Array [ + 13, + 19, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 13, + 21, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { "loc": Object { "end": Object { - "column": 15, + "column": 19, "line": 1, }, "start": Object { - "column": 9, + "column": 13, "line": 1, }, }, + "name": "String", "range": Array [ - 9, - 15, + 13, + 19, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 21, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, }, - "range": Array [ - 13, - 15, - ], - "raw": "10", - "type": "Literal", - "value": 10, }, - "type": "AssignmentPattern", + "range": Array [ + 20, + 21, + ], + "raw": "0", + "type": "Literal", + "value": 0, }, - }, - ], - "range": Array [ - 4, - 17, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, + "type": "AssignmentPattern", }, }, - "name": "x", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", + ], + "range": Array [ + 1, + 23, + ], + "type": "ObjectPattern", + }, + "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": 21, + "column": 28, "line": 1, }, "start": Object { - "column": 4, + "column": 26, "line": 1, }, }, + "properties": Array [], "range": Array [ - 4, - 21, + 26, + 28, ], - "type": "VariableDeclarator", + "type": "ObjectExpression", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 22, + "column": 29, "line": 1, }, "start": Object { @@ -39069,15 +39170,15 @@ Object { }, "range": Array [ 0, - 22, + 29, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -39086,14 +39187,14 @@ Object { }, "range": Array [ 0, - 22, + 30, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -39103,25 +39204,25 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 2, "line": 1, }, "start": Object { - "column": 4, + "column": 1, "line": 1, }, }, "range": Array [ - 4, - 5, + 1, + 2, ], "type": "Punctuator", "value": "{", @@ -39129,56 +39230,56 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 1, }, "start": Object { - "column": 6, + "column": 3, "line": 1, }, }, "range": Array [ - 6, - 7, + 3, + 9, ], "type": "Identifier", - "value": "x", + "value": "Object", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { - "column": 7, + "column": 9, "line": 1, }, }, "range": Array [ - 7, - 8, + 9, + 10, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { - "column": 9, + "column": 10, "line": 1, }, }, "range": Array [ - 9, 10, + 11, ], - "type": "Identifier", - "value": "x", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { @@ -39196,12 +39297,12 @@ Object { 12, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 19, "line": 1, }, "start": Object { @@ -39211,25 +39312,61 @@ Object { }, "range": Array [ 13, - 15, + 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": "10", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 23, "line": 1, }, "start": Object { - "column": 16, + "column": 22, "line": 1, }, }, "range": Array [ - 16, - 17, + 22, + 23, ], "type": "Punctuator", "value": "}", @@ -39237,17 +39374,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 25, "line": 1, }, "start": Object { - "column": 18, + "column": 24, "line": 1, }, }, "range": Array [ - 18, - 19, + 24, + 25, ], "type": "Punctuator", "value": "=", @@ -39255,45 +39392,63 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 27, "line": 1, }, "start": Object { - "column": 20, + "column": 26, "line": 1, }, }, "range": Array [ - 20, - 21, + 26, + 27, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 28, "line": 1, }, "start": Object { - "column": 21, + "column": 27, "line": 1, }, }, "range": Array [ - 21, - 22, + 27, + 28, ], "type": "Punctuator", - "value": ";", + "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", } `; -exports[`javascript fixtures/destructuring/defaults-object-longform-all.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-object-longform.src 1`] = ` Object { "body": Array [ Object { @@ -39302,7 +39457,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 37, + "column": 17, "line": 1, }, "start": Object { @@ -39316,36 +39471,36 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 6, + "column": 7, "line": 1, }, "start": Object { - "column": 5, + "column": 6, "line": 1, }, }, "name": "x", "range": Array [ - 5, 6, + 7, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { - "column": 5, + "column": 6, "line": 1, }, }, "method": false, "range": Array [ - 5, - 14, + 6, + 15, ], "shorthand": false, "type": "Property", @@ -39353,49 +39508,49 @@ Object { "left": Object { "loc": Object { "end": Object { - "column": 9, + "column": 10, "line": 1, }, "start": Object { - "column": 8, + "column": 9, "line": 1, }, }, "name": "x", "range": Array [ - 8, 9, + 10, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { - "column": 8, + "column": 9, "line": 1, }, }, "range": Array [ - 8, - 14, + 9, + 15, ], "right": Object { "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { - "column": 12, + "column": 13, "line": 1, }, }, "range": Array [ - 12, - 14, + 13, + 15, ], "raw": "10", "type": "Literal", @@ -39404,34 +39559,424 @@ Object { "type": "AssignmentPattern", }, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 16, + ], + "range": Array [ + 4, + 17, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 21, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "type": "VariableDeclaration", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/destructuring/defaults-object-longform-all.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 14, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "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", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 16, "line": 1, }, }, @@ -64435,348 +64980,159 @@ Object { } `; -exports[`javascript fixtures/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", - }, - "expression": false, - "generator": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 0, - 26, - ], - "type": "FunctionDeclaration", - }, - ], - "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", -} -`; - -exports[`javascript fixtures/experimentalAsyncIteration/async-iterator.src 1`] = ` +exports[`javascript fixtures/directives/block.src 1`] = ` Object { "body": Array [ Object { - "async": true, + "async": false, "body": Object { "body": Array [ Object { - "await": true, - "body": Object { - "body": Array [], + "directive": "use strict", + "expression": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 14, + "line": 2, }, "start": Object { - "column": 36, + "column": 2, "line": 2, }, }, "range": Array [ - 59, - 67, + 19, + 31, ], - "type": "BlockStatement", + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", }, - "left": Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 19, + 32, + ], + "type": "ExpressionStatement", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, }, - "name": "item", - "range": Array [ - 44, - 48, - ], - "type": "Identifier", }, - "init": null, + "name": "a", + "range": Array [ + 39, + 40, + ], + "type": "Identifier", + }, + "init": Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 11, + "line": 3, }, "start": Object { - "column": 21, - "line": 2, + "column": 10, + "line": 3, }, }, "range": Array [ + 43, 44, - 48, ], - "type": "VariableDeclarator", - }, - ], - "kind": "const", - "loc": Object { - "end": Object { - "column": 25, - "line": 2, + "raw": "1", + "type": "Literal", + "value": 1, }, - "start": Object { - "column": 15, - "line": 2, + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, }, + "range": Array [ + 39, + 44, + ], + "type": "VariableDeclarator", }, - "range": Array [ - 38, - 48, - ], - "type": "VariableDeclaration", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 12, + "line": 3, }, "start": Object { - "column": 4, - "line": 2, + "column": 2, + "line": 3, }, }, "range": Array [ - 27, - 67, + 35, + 45, ], - "right": Object { + "type": "VariableDeclaration", + }, + Object { + "expression": Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 14, + "line": 4, }, "start": Object { - "column": 29, - "line": 2, + "column": 2, + "line": 4, }, }, - "name": "items", "range": Array [ - 52, - 57, + 48, + 60, ], - "type": "Identifier", + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", }, - "type": "ForOfStatement", + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 48, + 61, + ], + "type": "ExpressionStatement", }, ], "loc": Object { @@ -64785,13 +65141,13 @@ Object { "line": 5, }, "start": Object { - "column": 21, + "column": 15, "line": 1, }, }, "range": Array [ - 21, - 69, + 15, + 63, ], "type": "BlockStatement", }, @@ -64800,18 +65156,18 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 18, + "column": 12, "line": 1, }, "start": Object { - "column": 15, + "column": 9, "line": 1, }, }, "name": "foo", "range": Array [ - 15, - 18, + 9, + 12, ], "type": "Identifier", }, @@ -64828,7 +65184,7 @@ Object { "params": Array [], "range": Array [ 0, - 69, + 63, ], "type": "FunctionDeclaration", }, @@ -64845,14 +65201,14 @@ Object { }, "range": Array [ 0, - 70, + 64, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -64862,25 +65218,7 @@ Object { }, "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, + 8, ], "type": "Keyword", "value": "function", @@ -64888,17 +65226,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 12, "line": 1, }, "start": Object { - "column": 15, + "column": 9, "line": 1, }, }, "range": Array [ - 15, - 18, + 9, + 12, ], "type": "Identifier", "value": "foo", @@ -64906,17 +65244,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 13, "line": 1, }, "start": Object { - "column": 18, + "column": 12, "line": 1, }, }, "range": Array [ - 18, - 19, + 12, + 13, ], "type": "Punctuator", "value": "(", @@ -64924,17 +65262,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 14, "line": 1, }, "start": Object { - "column": 19, + "column": 13, "line": 1, }, }, "range": Array [ - 19, - 20, + 13, + 14, ], "type": "Punctuator", "value": ")", @@ -64942,17 +65280,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 21, + "column": 15, "line": 1, }, }, "range": Array [ - 21, - 22, + 15, + 16, ], "type": "Punctuator", "value": "{", @@ -64960,38 +65298,20 @@ Object { 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, + "column": 14, "line": 2, }, "start": Object { - "column": 8, + "column": 2, "line": 2, }, }, "range": Array [ + 19, 31, - 36, ], - "type": "Identifier", - "value": "await", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { @@ -65005,137 +65325,137 @@ Object { }, }, "range": Array [ - 37, - 38, + 31, + 32, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 5, + "line": 3, }, "start": Object { - "column": 15, - "line": 2, + "column": 2, + "line": 3, }, }, "range": Array [ + 35, 38, - 43, ], "type": "Keyword", - "value": "const", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 21, - "line": 2, + "column": 6, + "line": 3, }, }, "range": Array [ - 44, - 48, + 39, + 40, ], "type": "Identifier", - "value": "item", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 2, + "column": 9, + "line": 3, }, "start": Object { - "column": 26, - "line": 2, + "column": 8, + "line": 3, }, }, "range": Array [ - 49, - 51, + 41, + 42, ], - "type": "Identifier", - "value": "of", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 11, + "line": 3, }, "start": Object { - "column": 29, - "line": 2, + "column": 10, + "line": 3, }, }, "range": Array [ - 52, - 57, + 43, + 44, ], - "type": "Identifier", - "value": "items", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 2, + "column": 12, + "line": 3, }, "start": Object { - "column": 34, - "line": 2, + "column": 11, + "line": 3, }, }, "range": Array [ - 57, - 58, + 44, + 45, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 2, + "column": 14, + "line": 4, }, "start": Object { - "column": 36, - "line": 2, + "column": 2, + "line": 4, }, }, "range": Array [ - 59, + 48, 60, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 15, "line": 4, }, "start": Object { - "column": 4, + "column": 14, "line": 4, }, }, "range": Array [ - 66, - 67, + 60, + 61, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { @@ -65149,8 +65469,8 @@ Object { }, }, "range": Array [ - 68, - 69, + 62, + 63, ], "type": "Punctuator", "value": "}", @@ -65160,207 +65480,601 @@ Object { } `; -exports[`javascript fixtures/experimentalDynamicImport/dynamic-import.src 1`] = ` +exports[`javascript fixtures/directives/directive-in-class.src 1`] = ` Object { "body": Array [ Object { + "directive": "use strict", "expression": Object { - "arguments": Array [ + "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 { + "body": Object { + "body": Array [ Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "name": "constructor", + "range": Array [ + 31, + 42, + ], + "type": "Identifier", + }, + "kind": "constructor", "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 5, + "line": 6, }, "start": Object { - "column": 19, - "line": 1, + "column": 4, + "line": 4, }, }, - "name": "main", "range": Array [ - 19, - 23, + 31, + 75, ], - "type": "Identifier", + "static": false, + "type": "MethodDefinition", + "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", + }, + "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, + ], + "type": "FunctionExpression", + }, }, - ], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 8, + }, + "start": Object { + "column": 8, + "line": 8, + }, + }, + "name": "foo", + "range": Array [ + 85, + 88, + ], + "type": "Identifier", }, - "start": Object { - "column": 0, - "line": 1, + "kind": "get", + "loc": Object { + "end": Object { + "column": 5, + "line": 10, + }, + "start": Object { + "column": 4, + "line": 8, + }, }, - }, - "object": Object { - "arguments": Array [ - Object { + "range": Array [ + 81, + 121, + ], + "static": false, + "type": "MethodDefinition", + "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": 12, - "line": 1, + "column": 5, + "line": 10, }, "start": Object { - "column": 7, - "line": 1, + "column": 15, + "line": 8, }, }, "range": Array [ - 7, - 12, + 92, + 121, ], - "raw": "'foo'", - "type": "Literal", - "value": "foo", + "type": "BlockStatement", }, - ], - "callee": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 5, + "line": 10, }, "start": Object { - "column": 0, - "line": 1, + "column": 12, + "line": 8, }, }, + "params": Array [], "range": Array [ - 0, - 6, + 89, + 121, ], - "type": "Import", + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 12, + }, + "start": Object { + "column": 8, + "line": 12, + }, + }, + "name": "foo", + "range": Array [ + 131, + 134, + ], + "type": "Identifier", }, + "kind": "set", "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 5, + "line": 14, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 12, }, }, "range": Array [ - 0, - 13, + 127, + 172, ], - "type": "CallExpression", + "static": false, + "type": "MethodDefinition", + "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", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 14, + }, + "start": Object { + "column": 12, + "line": 12, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 12, + }, + "start": Object { + "column": 13, + "line": 12, + }, + }, + "name": "value", + "range": Array [ + 136, + 141, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 135, + 172, + ], + "type": "FunctionExpression", + }, }, - "property": Object { + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 16, + }, + "start": Object { + "column": 4, + "line": 16, + }, + }, + "name": "method", + "range": Array [ + 178, + 184, + ], + "type": "Identifier", + }, + "kind": "method", "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 5, + "line": 18, }, "start": Object { - "column": 14, - "line": 1, + "column": 4, + "line": 16, }, }, - "name": "then", "range": Array [ - 14, - 18, + 178, + 217, ], - "type": "Identifier", - }, - "range": Array [ - 0, - 18, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 25, - ], - "type": "ExpressionStatement", - }, - ], - "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, + "static": false, + "type": "MethodDefinition", + "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", + }, + "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, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 19, + }, + "start": Object { + "column": 10, + "line": 3, + }, }, - "start": Object { - "column": 0, - "line": 1, + "range": Array [ + 25, + 219, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, }, + "name": "Foo", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 1, + "line": 19, }, "start": Object { - "column": 6, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 6, - 7, + 15, + 219, ], - "type": "Punctuator", - "value": "(", + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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 { @@ -65368,16 +66082,16 @@ Object { "line": 1, }, "start": Object { - "column": 7, + "column": 0, "line": 1, }, }, "range": Array [ - 7, + 0, 12, ], "type": "String", - "value": "'foo'", + "value": "\\"use strict\\"", }, Object { "loc": Object { @@ -65395,822 +66109,382 @@ Object { 13, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 13, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 13, - 14, + 15, + 20, ], - "type": "Punctuator", - "value": ".", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 9, + "line": 3, }, "start": Object { - "column": 14, - "line": 1, + "column": 6, + "line": 3, }, }, "range": Array [ - 14, - 18, + 21, + 24, ], "type": "Identifier", - "value": "then", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 10, + "line": 3, }, }, "range": Array [ - 18, - 19, + 25, + 26, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 15, + "line": 4, }, "start": Object { - "column": 19, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 19, - 23, + 31, + 42, ], "type": "Identifier", - "value": "main", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 17, + "line": 4, }, "start": Object { - "column": 23, - "line": 1, + "column": 16, + "line": 4, }, }, "range": Array [ - 23, - 24, + 43, + 44, ], "type": "Punctuator", - "value": ")", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 18, + "line": 4, }, "start": Object { - "column": 24, - "line": 1, + "column": 17, + "line": 4, }, }, "range": Array [ - 24, - 25, + 44, + 45, ], "type": "Punctuator", - "value": ";", + "value": ")", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/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", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 20, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 19, + "line": 4, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 12, - 13, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 19, - ], - "type": "RestElement", - }, - ], - "range": Array [ - 11, - 20, - ], - "type": "ObjectPattern", - }, - ], "range": Array [ - 0, - 24, + 46, + 47, ], - "type": "FunctionDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "{", }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 20, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 0, - 8, + 56, + 68, ], - "type": "Keyword", - "value": "function", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 21, + "line": 5, }, "start": Object { - "column": 9, - "line": 1, + "column": 20, + "line": 5, }, }, "range": Array [ - 9, - 10, + 68, + 69, ], - "type": "Identifier", - "value": "c", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 5, + "line": 6, }, "start": Object { - "column": 10, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 10, - 11, + 74, + 75, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 7, + "line": 8, }, "start": Object { - "column": 11, - "line": 1, + "column": 4, + "line": 8, }, }, "range": Array [ - 11, - 12, + 81, + 84, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 11, + "line": 8, }, "start": Object { - "column": 12, - "line": 1, + "column": 8, + "line": 8, }, }, "range": Array [ - 12, - 13, + 85, + 88, ], "type": "Identifier", - "value": "a", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 13, + "line": 8, }, "start": Object { - "column": 13, - "line": 1, + "column": 12, + "line": 8, }, }, "range": Array [ - 13, - 14, + 89, + 90, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 14, + "line": 8, }, "start": Object { - "column": 15, - "line": 1, + "column": 13, + "line": 8, }, }, "range": Array [ - 15, - 18, + 90, + 91, ], "type": "Punctuator", - "value": "...", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 16, + "line": 8, }, "start": Object { - "column": 18, - "line": 1, + "column": 15, + "line": 8, }, }, "range": Array [ - 18, - 19, + 92, + 93, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 20, - "line": 1, + "line": 9, }, "start": Object { - "column": 19, - "line": 1, + "column": 8, + "line": 9, }, }, "range": Array [ - 19, - 20, + 102, + 114, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { "column": 21, - "line": 1, + "line": 9, }, "start": Object { "column": 20, - "line": 1, + "line": 9, }, }, "range": Array [ - 20, - 21, + 114, + 115, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 5, + "line": 10, }, "start": Object { - "column": 22, - "line": 1, + "column": 4, + "line": 10, }, }, "range": Array [ - 22, - 23, + 120, + 121, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 7, + "line": 12, }, "start": Object { - "column": 23, - "line": 1, + "column": 4, + "line": 12, }, }, "range": Array [ - 23, - 24, + 127, + 130, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "set", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/experimentalObjectRestSpread/destructuring-assign-mirror.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 2, - 3, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 9, - ], - "type": "RestElement", - }, - ], - "range": Array [ - 1, - 10, - ], - "type": "ObjectPattern", - }, - "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 { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 14, - 15, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - }, - "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, + "column": 11, + "line": 12, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 12, }, }, "range": Array [ - 0, - 23, + 131, + 134, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "foo", }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 1, + "column": 13, + "line": 12, }, "start": Object { - "column": 0, - "line": 1, + "column": 12, + "line": 12, }, }, "range": Array [ - 0, - 1, + 135, + 136, ], "type": "Punctuator", "value": "(", @@ -66218,107 +66492,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 2, - "line": 1, + "column": 18, + "line": 12, }, "start": Object { - "column": 1, - "line": 1, + "column": 13, + "line": 12, }, }, "range": Array [ - 1, - 2, + 136, + 141, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "value", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 19, + "line": 12, }, "start": Object { - "column": 2, - "line": 1, + "column": 18, + "line": 12, }, }, "range": Array [ - 2, - 3, + 141, + 142, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 21, + "line": 12, }, "start": Object { - "column": 3, - "line": 1, + "column": 20, + "line": 12, }, }, "range": Array [ - 3, - 4, + 143, + 144, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 20, + "line": 13, }, "start": Object { - "column": 5, - "line": 1, + "column": 8, + "line": 13, }, }, "range": Array [ - 5, - 8, + 153, + 165, ], - "type": "Punctuator", - "value": "...", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 21, + "line": 13, }, "start": Object { - "column": 8, - "line": 1, + "column": 20, + "line": 13, }, }, "range": Array [ - 8, - 9, + 165, + 166, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 5, + "line": 14, }, "start": Object { - "column": 9, - "line": 1, + "column": 4, + "line": 14, }, }, "range": Array [ - 9, - 10, + 171, + 172, ], "type": "Punctuator", "value": "}", @@ -66326,125 +66600,125 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 10, + "line": 16, }, "start": Object { - "column": 11, - "line": 1, + "column": 4, + "line": 16, }, }, "range": Array [ - 11, - 12, + 178, + 184, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "method", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 12, + "line": 16, }, "start": Object { - "column": 13, - "line": 1, + "column": 11, + "line": 16, }, }, "range": Array [ - 13, - 14, + 185, + 186, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 13, + "line": 16, }, "start": Object { - "column": 14, - "line": 1, + "column": 12, + "line": 16, }, }, "range": Array [ - 14, - 15, + 186, + 187, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 15, + "line": 16, }, "start": Object { - "column": 15, - "line": 1, + "column": 14, + "line": 16, }, }, "range": Array [ - 15, - 16, + 188, + 189, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 20, - "line": 1, + "line": 17, }, "start": Object { - "column": 17, - "line": 1, + "column": 8, + "line": 17, }, }, "range": Array [ - 17, - 20, + 198, + 210, ], - "type": "Punctuator", - "value": "...", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { "column": 21, - "line": 1, + "line": 17, }, "start": Object { "column": 20, - "line": 1, + "line": 17, }, }, "range": Array [ - 20, - 21, + 210, + 211, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 5, + "line": 18, }, "start": Object { - "column": 21, - "line": 1, + "column": 4, + "line": 18, }, }, "range": Array [ - 21, - 22, + 216, + 217, ], "type": "Punctuator", "value": "}", @@ -66452,46 +66726,157 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 19, }, "start": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 19, }, }, "range": Array [ - 22, - 23, + 218, + 219, ], "type": "Punctuator", - "value": ")", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/experimentalObjectRestSpread/function-parameter-object-spread.src 1`] = ` +exports[`javascript fixtures/directives/function-non-strict.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, - }, - }, + "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 { + "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 [ - 23, - 26, + 16, + 39, ], "type": "BlockStatement", }, @@ -66517,73 +66902,18 @@ Object { }, "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "properties": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "RestElement", - }, - ], - "range": Array [ - 13, - 21, - ], - "type": "ObjectPattern", - }, - ], + "params": Array [], "range": Array [ 0, - 26, + 39, ], "type": "FunctionDeclaration", }, @@ -66591,7 +66921,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 5, }, "start": Object { "column": 0, @@ -66600,7 +66930,7 @@ Object { }, "range": Array [ 0, - 27, + 40, ], "sourceType": "script", "tokens": Array [ @@ -66643,17 +66973,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 1, }, "start": Object { - "column": 12, + "column": 13, "line": 1, }, }, "range": Array [ - 12, 13, + 14, ], "type": "Punctuator", "value": "(", @@ -66661,20 +66991,20 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { - "column": 13, + "column": 14, "line": 1, }, }, "range": Array [ - 13, 14, + 15, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { @@ -66683,103 +67013,121 @@ Object { "line": 1, }, "start": Object { - "column": 14, + "column": 16, "line": 1, }, }, "range": Array [ - 14, + 16, 17, ], "type": "Punctuator", - "value": "...", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 17, 20, + 30, ], - "type": "Identifier", - "value": "bar", + "type": "String", + "value": "\\"use smth\\"", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 3, + "line": 3, }, "start": Object { - "column": 20, - "line": 1, + "column": 2, + "line": 3, }, }, "range": Array [ - 20, - 21, + 33, + 34, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 4, + "line": 3, }, "start": Object { - "column": 21, - "line": 1, + "column": 3, + "line": 3, }, }, "range": Array [ - 21, - 22, + 34, + 35, ], "type": "Punctuator", - "value": ")", + "value": "+", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 23, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 23, - 24, + 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": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 25, - "line": 1, + "column": 0, + "line": 4, }, }, "range": Array [ - 25, - 26, + 38, + 39, ], "type": "Punctuator", "value": "}", @@ -66789,239 +67137,403 @@ Object { } `; -exports[`javascript fixtures/experimentalObjectRestSpread/invalid-rest.src 1`] = `"',' expected."`; - -exports[`javascript fixtures/experimentalObjectRestSpread/invalid-rest-trailing-comma.src 1`] = ` +exports[`javascript fixtures/directives/non-directive-string.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "alternate": null, + "consequent": Object { + "body": Array [ + Object { + "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": 19, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { "column": 4, - "line": 1, + "line": 2, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { + "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 { + "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": 7, - "line": 1, + "column": 20, + "line": 7, }, "start": Object { - "column": 6, - "line": 1, + "column": 8, + "line": 7, }, }, - "name": "x", "range": Array [ - 6, - 7, + 74, + 86, ], - "type": "Identifier", + "type": "ExpressionStatement", }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 8, }, - "method": false, - "range": Array [ - 6, - 7, - ], - "shorthand": true, - "type": "Property", - "value": Object { + "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 { + "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": 7, - "line": 1, + "column": 20, + "line": 10, }, "start": Object { - "column": 6, - "line": 1, + "column": 8, + "line": 10, }, }, - "name": "x", "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 9, - 10, + 116, + 128, ], - "type": "Identifier", + "type": "ExpressionStatement", }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 11, }, - "method": false, - "range": Array [ - 9, - 10, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", + "start": Object { + "column": 13, + "line": 9, }, }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", + "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 { + "expression": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 15, }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, + "start": Object { + "column": 4, + "line": 15, }, - "range": Array [ - 12, - 16, - ], - "type": "RestElement", }, - ], - "range": Array [ - 4, - 19, - ], - "type": "ObjectPattern", - }, - "init": Object { + "range": Array [ + 157, + 169, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 16, + "line": 15, }, "start": Object { - "column": 22, - "line": 1, + "column": 4, + "line": 15, }, }, - "name": "foo", "range": Array [ - 22, - 25, + 157, + 169, ], - "type": "Identifier", + "type": "ExpressionStatement", }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 16, + }, + "start": Object { + "column": 13, + "line": 14, }, - "range": Array [ - 4, - 25, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 151, + 171, + ], + "type": "BlockStatement", + }, "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 1, + "line": 16, }, "start": Object { "column": 0, - "line": 1, + "line": 14, }, }, "range": Array [ - 0, - 26, + 138, + 171, ], - "type": "VariableDeclaration", + "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", }, ], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 17, }, "start": Object { "column": 0, @@ -67030,14 +67542,14 @@ Object { }, "range": Array [ 0, - 27, + 172, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 2, "line": 1, }, "start": Object { @@ -67047,233 +67559,5093 @@ Object { }, "range": Array [ 0, - 3, + 2, ], "type": "Keyword", - "value": "var", + "value": "if", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 4, "line": 1, }, "start": Object { - "column": 4, + "column": 3, "line": 1, }, }, "range": Array [ + 3, 4, - 5, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 8, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 7, + 4, + 8, ], - "type": "Identifier", - "value": "x", + "type": "Boolean", + "value": "true", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 9, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "range": Array [ - 7, 8, + 9, ], "type": "Punctuator", - "value": ",", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { - "column": 9, + "column": 10, "line": 1, }, }, "range": Array [ - 9, 10, + 11, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 10, - 11, + 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": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "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": 1, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, }, }, "range": Array [ - 12, - 15, + 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": "...", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "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": 1, + "line": 6, + }, + "start": Object { + "column": 14, + "line": 6, }, }, "range": Array [ - 15, - 16, + 62, + 63, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { "column": 17, - "line": 1, + "line": 6, }, "start": Object { "column": 16, - "line": 1, + "line": 6, }, }, "range": Array [ - 16, - 17, + 64, + 65, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 20, + "line": 7, }, "start": Object { - "column": 18, - "line": 1, + "column": 8, + "line": 7, }, }, "range": Array [ - 18, - 19, + 74, + 86, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 5, + "line": 8, }, "start": Object { - "column": 20, - "line": 1, + "column": 4, + "line": 8, }, }, "range": Array [ - 20, - 21, + 91, + 92, ], "type": "Punctuator", - "value": "=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 11, + "line": 9, }, "start": Object { - "column": 22, - "line": 1, + "column": 4, + "line": 9, }, }, "range": Array [ - 22, - 25, + 97, + 104, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 12, + "line": 9, }, "start": Object { - "column": 25, - "line": 1, + "column": 11, + "line": 9, }, }, "range": Array [ - 25, - 26, + 104, + 105, ], "type": "Punctuator", - "value": ";", + "value": ":", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/experimentalObjectRestSpread/object-rest.src 1`] = ` + 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", +} +`; + +exports[`javascript fixtures/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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + "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", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 14, + 24, + ], + "type": "VariableDeclaration", + }, + Object { + "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", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "a", + "range": Array [ + 31, + 32, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 6, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 27, + 33, + ], + "type": "VariableDeclaration", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/directives/raw.src 1`] = ` +Object { + "body": Array [ + Object { + "directive": "use\\\\x20strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "raw": "\\"use\\\\x20strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "type": "ExpressionStatement", + }, + ], + "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": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "type": "String", + "value": "\\"use\\\\x20strict\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/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", + }, + "expression": false, + "generator": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 16, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 0, + 26, + ], + "type": "FunctionDeclaration", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "name": "item", + "range": Array [ + 44, + 48, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 44, + 48, + ], + "type": "VariableDeclarator", + }, + ], + "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 { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 29, + "line": 2, + }, + }, + "name": "items", + "range": Array [ + 52, + 57, + ], + "type": "Identifier", + }, + "type": "ForOfStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 69, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 0, + 69, + ], + "type": "FunctionDeclaration", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/experimentalDynamicImport/dynamic-import.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "main", + "range": Array [ + 19, + 23, + ], + "type": "Identifier", + }, + ], + "callee": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "object": Object { + "arguments": Array [ + 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", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "Import", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "type": "CallExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "then", + "range": Array [ + 14, + 18, + ], + "type": "Identifier", + }, + "range": Array [ + 0, + 18, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 25, + ], + "type": "ExpressionStatement", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/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", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 12, + 13, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 19, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 11, + 20, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 0, + 24, + ], + "type": "FunctionDeclaration", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/experimentalObjectRestSpread/destructuring-assign-mirror.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 2, + 3, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 9, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 1, + 10, + ], + "type": "ObjectPattern", + }, + "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 { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 14, + 15, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/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", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 9, + 12, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "properties": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 20, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 13, + 21, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 0, + 26, + ], + "type": "FunctionDeclaration", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/experimentalObjectRestSpread/invalid-rest.src 1`] = `"',' expected."`; + +exports[`javascript fixtures/experimentalObjectRestSpread/invalid-rest-trailing-comma.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 6, + 7, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 9, + 10, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 16, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 4, + 19, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 25, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "type": "VariableDeclaration", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/experimentalObjectRestSpread/object-rest.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 6, + 7, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 9, + 10, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 16, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 4, + 18, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "method": 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 { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 29, + 30, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "method": 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 { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "method": 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 { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 41, + 42, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "method": 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", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "type": "VariableDeclaration", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/experimentalObjectRestSpread/property-spread.src 1`] = ` Object { "body": Array [ Object { @@ -67282,7 +72654,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 18, + "column": 7, "line": 1, }, "start": Object { @@ -67290,172 +72662,150 @@ Object { "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 6, - 7, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "VariableDeclarator", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 9, - 10, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, + "start": Object { + "column": 4, + "line": 2, }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 16, - ], - "type": "RestElement", + }, + "name": "get", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "VariableDeclarator", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, }, + }, + "name": "set", + "range": Array [ + 22, + 25, ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 22, + 25, + ], + "type": "VariableDeclarator", + }, + ], + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "name": "x", "range": Array [ - 4, - 18, + 32, + 33, ], - "type": "ObjectPattern", + "type": "Identifier", }, "init": Object { "loc": Object { "end": Object { - "column": 47, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { - "column": 21, - "line": 1, + "column": 8, + "line": 5, }, }, "properties": Array [ @@ -67464,115 +72814,56 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "method": 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 { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 29, - "line": 1, + "column": 4, + "line": 6, }, }, - "name": "y", + "name": "foo", "range": Array [ - 29, - 30, + 42, + 45, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 29, - "line": 1, + "column": 4, + "line": 6, }, }, "method": false, "range": Array [ - 29, - 33, + 42, + 50, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 32, - "line": 1, + "column": 9, + "line": 6, }, }, + "name": "foo", "range": Array [ - 32, - 33, + 47, + 50, ], - "raw": "2", - "type": "Literal", - "value": 2, + "type": "Identifier", }, }, Object { @@ -67580,137 +72871,149 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 7, + "line": 7, }, "start": Object { - "column": 35, - "line": 1, + "column": 4, + "line": 7, }, }, - "name": "a", + "name": "get", "range": Array [ - 35, - 36, + 56, + 59, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 12, + "line": 7, }, "start": Object { - "column": 35, - "line": 1, + "column": 4, + "line": 7, }, }, "method": false, "range": Array [ - 35, - 39, + 56, + 64, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 12, + "line": 7, }, "start": Object { - "column": 38, - "line": 1, + "column": 9, + "line": 7, }, }, + "name": "get", "range": Array [ - 38, - 39, + 61, + 64, ], - "raw": "3", - "type": "Literal", - "value": 3, + "type": "Identifier", }, }, Object { - "computed": false, - "key": Object { + "argument": Object { + "computed": false, "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 14, + "line": 8, }, "start": Object { - "column": 41, - "line": 1, + "column": 7, + "line": 8, }, }, - "name": "b", + "object": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 8, + }, + "start": Object { + "column": 7, + "line": 8, + }, + }, + "name": "set", + "range": Array [ + 73, + 76, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 8, + }, + "start": Object { + "column": 11, + "line": 8, + }, + }, + "name": "foo", + "range": Array [ + 77, + 80, + ], + "type": "Identifier", + }, "range": Array [ - 41, - 42, + 73, + 80, ], - "type": "Identifier", + "type": "MemberExpression", }, - "kind": "init", "loc": Object { "end": Object { - "column": 45, - "line": 1, + "column": 14, + "line": 8, }, "start": Object { - "column": 41, - "line": 1, + "column": 4, + "line": 8, }, }, - "method": false, "range": Array [ - 41, - 45, + 70, + 80, ], - "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, - }, + "type": "SpreadElement", }, ], "range": Array [ - 21, - 47, + 36, + 82, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 47, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { "column": 4, - "line": 1, + "line": 5, }, }, "range": Array [ - 4, - 47, + 32, + 82, ], "type": "VariableDeclarator", }, @@ -67718,17 +73021,17 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 48, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, - 48, + 28, + 83, ], "type": "VariableDeclaration", }, @@ -67736,7 +73039,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 10, }, "start": Object { "column": 0, @@ -67745,7 +73048,7 @@ Object { }, "range": Array [ 0, - 49, + 84, ], "sourceType": "script", "tokens": Array [ @@ -67770,7 +73073,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { @@ -67780,28 +73083,10 @@ Object { }, "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", + "value": "foo", }, Object { "loc": Object { @@ -67824,35 +73109,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 9, - 10, + 13, + 16, ], "type": "Identifier", - "value": "y", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 10, - 11, + 16, + 17, ], "type": "Punctuator", "value": ",", @@ -67860,377 +73145,341 @@ Object { 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, + "column": 7, + "line": 3, }, "start": Object { - "column": 15, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 15, - 16, + 22, + 25, ], "type": "Identifier", - "value": "z", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 17, - "line": 1, + "column": 7, + "line": 3, }, }, "range": Array [ - 17, - 18, + 25, + 26, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { - "column": 19, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 19, - 20, + 28, + 31, ], - "type": "Punctuator", - "value": "=", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 21, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 21, - 22, + 32, + 33, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 7, + "line": 5, }, "start": Object { - "column": 23, - "line": 1, + "column": 6, + "line": 5, }, }, "range": Array [ - 23, - 24, + 34, + 35, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 9, + "line": 5, }, "start": Object { - "column": 24, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 24, - 25, + 36, + 37, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 26, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 26, - 27, + 42, + 45, ], - "type": "Numeric", - "value": "1", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 8, + "line": 6, }, "start": Object { - "column": 27, - "line": 1, + "column": 7, + "line": 6, }, }, "range": Array [ - 27, - 28, + 45, + 46, ], "type": "Punctuator", - "value": ",", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 29, - "line": 1, + "column": 9, + "line": 6, }, }, "range": Array [ - 29, - 30, + 47, + 50, ], "type": "Identifier", - "value": "y", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 13, + "line": 6, }, "start": Object { - "column": 30, - "line": 1, + "column": 12, + "line": 6, }, }, "range": Array [ - 30, - 31, + 50, + 51, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 7, + "line": 7, }, "start": Object { - "column": 32, - "line": 1, + "column": 4, + "line": 7, }, }, "range": Array [ - 32, - 33, + 56, + 59, ], - "type": "Numeric", - "value": "2", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 8, + "line": 7, }, "start": Object { - "column": 33, - "line": 1, + "column": 7, + "line": 7, }, }, "range": Array [ - 33, - 34, + 59, + 60, ], "type": "Punctuator", - "value": ",", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 12, + "line": 7, }, "start": Object { - "column": 35, - "line": 1, + "column": 9, + "line": 7, }, }, "range": Array [ - 35, - 36, + 61, + 64, ], "type": "Identifier", - "value": "a", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 13, + "line": 7, }, "start": Object { - "column": 36, - "line": 1, + "column": 12, + "line": 7, }, }, "range": Array [ - 36, - 37, + 64, + 65, ], "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", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 1, + "column": 7, + "line": 8, }, "start": Object { - "column": 39, - "line": 1, + "column": 4, + "line": 8, }, }, "range": Array [ - 39, - 40, + 70, + 73, ], "type": "Punctuator", - "value": ",", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 10, + "line": 8, }, "start": Object { - "column": 41, - "line": 1, + "column": 7, + "line": 8, }, }, "range": Array [ - 41, - 42, + 73, + 76, ], "type": "Identifier", - "value": "b", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 43, - "line": 1, + "column": 11, + "line": 8, }, "start": Object { - "column": 42, - "line": 1, + "column": 10, + "line": 8, }, }, "range": Array [ - 42, - 43, + 76, + 77, ], "type": "Punctuator", - "value": ":", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 45, - "line": 1, + "column": 14, + "line": 8, }, "start": Object { - "column": 44, - "line": 1, + "column": 11, + "line": 8, }, }, "range": Array [ - 44, - 45, + 77, + 80, ], - "type": "Numeric", - "value": "4", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { - "column": 46, - "line": 1, + "column": 0, + "line": 9, }, }, "range": Array [ - 46, - 47, + 81, + 82, ], "type": "Punctuator", "value": "}", @@ -68238,17 +73487,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 48, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { - "column": 47, - "line": 1, + "column": 1, + "line": 9, }, }, "range": Array [ - 47, - 48, + 82, + 83, ], "type": "Punctuator", "value": ";", @@ -68258,401 +73507,298 @@ Object { } `; -exports[`javascript fixtures/experimentalObjectRestSpread/property-spread.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-method-args.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "VariableDeclarator", - }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "get", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", + "expression": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "start": Object { + "column": 1, + "line": 1, }, - "range": Array [ - 13, - 16, - ], - "type": "VariableDeclarator", }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, }, + "name": "initialize", + "range": Array [ + 7, + 17, + ], + "type": "Identifier", }, - "name": "set", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "VariableDeclarator", - }, - ], - "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 { - "id": Object { + "kind": "init", "loc": Object { "end": Object { "column": 5, - "line": 5, + "line": 4, }, "start": Object { "column": 4, - "line": 5, + "line": 2, }, }, - "name": "x", + "method": true, "range": Array [ - 32, - 33, + 7, + 104, ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - }, - "kind": "init", + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 12, - "line": 6, + "column": 5, + "line": 4, }, "start": Object { - "column": 4, - "line": 6, + "column": 48, + "line": 2, }, }, - "method": false, "range": Array [ - 42, - 50, + 51, + 104, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - }, + "type": "BlockStatement", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": "get", - "range": Array [ - 56, - 59, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, }, - "method": false, - "range": Array [ - 56, - 64, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "name": "get", - "range": Array [ - 61, - 64, - ], - "type": "Identifier", + "start": Object { + "column": 14, + "line": 2, }, }, - Object { - "argument": Object { - "computed": false, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 14, - "line": 8, + "column": 46, + "line": 2, }, "start": Object { - "column": 7, - "line": 8, + "column": 15, + "line": 2, }, }, - "object": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "someVar", + "range": Array [ + 19, + 26, + ], + "type": "Identifier", }, - "start": Object { - "column": 7, - "line": 8, + "kind": "init", + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 19, + 26, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "someVar", + "range": Array [ + 19, + 26, + ], + "type": "Identifier", }, }, - "name": "set", - "range": Array [ - 73, - 76, - ], - "type": "Identifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "name": "otherVar", + "range": Array [ + 28, + 36, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 28, + 36, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "name": "otherVar", + "range": Array [ + 28, + 36, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 2, + }, + "start": Object { + "column": 38, + "line": 2, + }, + }, + "name": "options", + "range": Array [ + 41, + 48, + ], + "type": "Identifier", }, - "start": Object { - "column": 11, - "line": 8, + "loc": Object { + "end": Object { + "column": 45, + "line": 2, + }, + "start": Object { + "column": 35, + "line": 2, + }, }, + "range": Array [ + 38, + 48, + ], + "type": "RestElement", }, - "name": "foo", - "range": Array [ - 77, - 80, - ], - "type": "Identifier", - }, + ], "range": Array [ - 73, - 80, + 18, + 49, ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, + "type": "ObjectPattern", }, - "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 [ + 17, + 104, + ], + "type": "FunctionExpression", }, }, - "range": Array [ - 32, - 82, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", + ], + "range": Array [ + 1, + 106, + ], + "type": "ObjectExpression", + }, "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 3, + "line": 5, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 28, - 83, + 0, + 108, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { "column": 0, - "line": 10, + "line": 6, }, "start": Object { "column": 0, @@ -68661,14 +73807,14 @@ Object { }, "range": Array [ 0, - 84, + 109, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -68678,51 +73824,33 @@ Object { }, "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, + 1, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 2, "line": 1, }, "start": Object { - "column": 7, + "column": 1, "line": 1, }, }, "range": Array [ - 7, - 8, + 1, + 2, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 2, }, "start": Object { @@ -68731,386 +73859,278 @@ Object { }, }, "range": Array [ - 13, - 16, + 7, + 17, ], "type": "Identifier", - "value": "get", + "value": "initialize", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 15, "line": 2, }, "start": Object { - "column": 7, + "column": 14, "line": 2, }, }, "range": Array [ - 16, 17, + 18, ], "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", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 16, + "line": 2, }, "start": Object { - "column": 7, - "line": 3, + "column": 15, + "line": 2, }, }, "range": Array [ - 25, - 26, + 18, + 19, ], "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", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 23, + "line": 2, }, "start": Object { - "column": 4, - "line": 5, + "column": 16, + "line": 2, }, }, "range": Array [ - 32, - 33, + 19, + 26, ], "type": "Identifier", - "value": "x", + "value": "someVar", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 24, + "line": 2, }, "start": Object { - "column": 6, - "line": 5, + "column": 23, + "line": 2, }, }, "range": Array [ - 34, - 35, + 26, + 27, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 33, + "line": 2, }, "start": Object { - "column": 8, - "line": 5, + "column": 25, + "line": 2, }, }, "range": Array [ + 28, 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", + "value": "otherVar", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 6, + "column": 34, + "line": 2, }, "start": Object { - "column": 7, - "line": 6, + "column": 33, + "line": 2, }, }, "range": Array [ - 45, - 46, + 36, + 37, ], "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", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 6, + "column": 38, + "line": 2, }, "start": Object { - "column": 12, - "line": 6, + "column": 35, + "line": 2, }, }, "range": Array [ - 50, - 51, + 38, + 41, ], "type": "Punctuator", - "value": ",", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 7, + "column": 45, + "line": 2, }, "start": Object { - "column": 4, - "line": 7, + "column": 38, + "line": 2, }, }, "range": Array [ - 56, - 59, + 41, + 48, ], "type": "Identifier", - "value": "get", + "value": "options", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 7, + "column": 46, + "line": 2, }, "start": Object { - "column": 7, - "line": 7, + "column": 45, + "line": 2, }, }, "range": Array [ - 59, - 60, + 48, + 49, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 7, + "column": 47, + "line": 2, }, "start": Object { - "column": 9, - "line": 7, + "column": 46, + "line": 2, }, }, "range": Array [ - 61, - 64, + 49, + 50, ], - "type": "Identifier", - "value": "get", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 7, + "column": 49, + "line": 2, }, "start": Object { - "column": 12, - "line": 7, + "column": 48, + "line": 2, }, }, "range": Array [ - 64, - 65, + 51, + 52, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 8, + "column": 5, + "line": 4, }, "start": Object { "column": 4, - "line": 8, + "line": 4, }, }, "range": Array [ - 70, - 73, + 103, + 104, ], "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", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 8, + "column": 1, + "line": 5, }, "start": Object { - "column": 10, - "line": 8, + "column": 0, + "line": 5, }, }, "range": Array [ - 76, - 77, + 105, + 106, ], "type": "Punctuator", - "value": ".", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 8, + "column": 2, + "line": 5, }, "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, + "line": 5, }, }, "range": Array [ - 81, - 82, + 106, + 107, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 3, + "line": 5, }, "start": Object { - "column": 1, - "line": 9, + "column": 2, + "line": 5, }, }, "range": Array [ - 82, - 83, + 107, + 108, ], "type": "Punctuator", "value": ";", @@ -69120,280 +74140,318 @@ Object { } `; -exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-method-args.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-methods.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "initialize", - "range": Array [ - 7, - 17, - ], - "type": "Identifier", - }, - "kind": "init", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { "column": 5, - "line": 4, + "line": 1, }, "start": Object { "column": 4, - "line": 2, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 1, }, }, - "method": true, - "range": Array [ - 7, - 104, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "initialize", + "range": Array [ + 14, + 24, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { "column": 5, "line": 4, }, "start": Object { - "column": 48, + "column": 4, "line": 2, }, }, + "method": true, "range": Array [ - 51, - 104, + 14, + 111, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "params": Array [ - Object { + "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", + }, + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 46, - "line": 2, + "column": 5, + "line": 4, }, "start": Object { - "column": 15, + "column": 14, "line": 2, }, }, - "properties": Array [ + "params": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "someVar", - "range": Array [ - 19, - 26, - ], - "type": "Identifier", - }, - "kind": "init", "loc": Object { "end": Object { - "column": 23, + "column": 46, "line": 2, }, "start": Object { - "column": 16, + "column": 15, "line": 2, }, }, - "method": false, - "range": Array [ - 19, - 26, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "someVar", + "range": Array [ + 26, + 33, + ], + "type": "Identifier", }, - }, - "name": "someVar", - "range": Array [ - 19, - 26, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, + "kind": "init", + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, }, - "start": Object { - "column": 25, - "line": 2, + "method": false, + "range": Array [ + 26, + 33, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "someVar", + "range": Array [ + 26, + 33, + ], + "type": "Identifier", }, }, - "name": "otherVar", - "range": Array [ - 28, - 36, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 28, - 36, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "name": "otherVar", + "range": Array [ + 35, + 43, + ], + "type": "Identifier", }, - "start": Object { - "column": 25, - "line": 2, + "kind": "init", + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 35, + 43, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "name": "otherVar", + "range": Array [ + 35, + 43, + ], + "type": "Identifier", }, }, - "name": "otherVar", - "range": Array [ - 28, - 36, - ], - "type": "Identifier", - }, - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 2, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 2, + }, + "start": Object { + "column": 38, + "line": 2, + }, + }, + "name": "options", + "range": Array [ + 48, + 55, + ], + "type": "Identifier", }, - "start": Object { - "column": 38, - "line": 2, + "loc": Object { + "end": Object { + "column": 45, + "line": 2, + }, + "start": Object { + "column": 35, + "line": 2, + }, }, + "range": Array [ + 45, + 55, + ], + "type": "RestElement", }, - "name": "options", - "range": Array [ - 41, - 48, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, + ], "range": Array [ - 38, - 48, + 25, + 56, ], - "type": "RestElement", + "type": "ObjectPattern", }, ], "range": Array [ - 18, - 49, + 24, + 111, ], - "type": "ObjectPattern", + "type": "FunctionExpression", }, - ], - "range": Array [ - 17, - 104, - ], - "type": "FunctionExpression", + }, + ], + "range": Array [ + 8, + 113, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 1, }, }, - ], - "range": Array [ - 1, - 106, - ], - "type": "ObjectExpression", - }, + "range": Array [ + 4, + 113, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 3, + "column": 2, "line": 5, }, "start": Object { @@ -69403,15 +74461,15 @@ Object { }, "range": Array [ 0, - 108, + 114, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 6, + "column": 2, + "line": 5, }, "start": Object { "column": 0, @@ -69420,14 +74478,14 @@ Object { }, "range": Array [ 0, - 109, + 114, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -69437,25 +74495,61 @@ Object { }, "range": Array [ 0, - 1, + 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": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 9, "line": 1, }, "start": Object { - "column": 1, + "column": 8, "line": 1, }, }, "range": Array [ - 1, - 2, + 8, + 9, ], "type": "Punctuator", "value": "{", @@ -69472,8 +74566,8 @@ Object { }, }, "range": Array [ - 7, - 17, + 14, + 24, ], "type": "Identifier", "value": "initialize", @@ -69490,8 +74584,8 @@ Object { }, }, "range": Array [ - 17, - 18, + 24, + 25, ], "type": "Punctuator", "value": "(", @@ -69508,8 +74602,8 @@ Object { }, }, "range": Array [ - 18, - 19, + 25, + 26, ], "type": "Punctuator", "value": "{", @@ -69526,8 +74620,8 @@ Object { }, }, "range": Array [ - 19, 26, + 33, ], "type": "Identifier", "value": "someVar", @@ -69544,8 +74638,8 @@ Object { }, }, "range": Array [ - 26, - 27, + 33, + 34, ], "type": "Punctuator", "value": ",", @@ -69562,8 +74656,8 @@ Object { }, }, "range": Array [ - 28, - 36, + 35, + 43, ], "type": "Identifier", "value": "otherVar", @@ -69580,8 +74674,8 @@ Object { }, }, "range": Array [ - 36, - 37, + 43, + 44, ], "type": "Punctuator", "value": ",", @@ -69598,8 +74692,8 @@ Object { }, }, "range": Array [ - 38, - 41, + 45, + 48, ], "type": "Punctuator", "value": "...", @@ -69616,8 +74710,8 @@ Object { }, }, "range": Array [ - 41, 48, + 55, ], "type": "Identifier", "value": "options", @@ -69634,8 +74728,8 @@ Object { }, }, "range": Array [ - 48, - 49, + 55, + 56, ], "type": "Punctuator", "value": "}", @@ -69652,8 +74746,8 @@ Object { }, }, "range": Array [ - 49, - 50, + 56, + 57, ], "type": "Punctuator", "value": ")", @@ -69670,8 +74764,8 @@ Object { }, }, "range": Array [ - 51, - 52, + 58, + 59, ], "type": "Punctuator", "value": "{", @@ -69688,8 +74782,8 @@ Object { }, }, "range": Array [ - 103, - 104, + 110, + 111, ], "type": "Punctuator", "value": "}", @@ -69706,8 +74800,8 @@ Object { }, }, "range": Array [ - 105, - 106, + 112, + 113, ], "type": "Punctuator", "value": "}", @@ -69724,38 +74818,148 @@ Object { }, }, "range": Array [ - 106, - 107, + 113, + 114, ], "type": "Punctuator", - "value": ")", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-properties.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "VariableDeclarator", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "get", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "VariableDeclarator", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "set", + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 22, + 25, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 8, + "line": 3, }, "start": Object { - "column": 2, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 107, - 108, + 0, + 26, ], - "type": "Punctuator", - "value": ";", + "type": "VariableDeclaration", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-methods.src 1`] = ` -Object { - "body": Array [ Object { "declarations": Array [ Object { @@ -69763,17 +74967,17 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 5, }, "start": Object { "column": 4, - "line": 1, + "line": 5, }, }, "name": "x", "range": Array [ - 4, - 5, + 32, + 33, ], "type": "Identifier", }, @@ -69781,11 +74985,11 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 9, }, "start": Object { "column": 8, - "line": 1, + "line": 5, }, }, "properties": Array [ @@ -69794,269 +74998,170 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 7, + "line": 6, }, "start": Object { "column": 4, - "line": 2, + "line": 6, }, }, - "name": "initialize", + "name": "foo", "range": Array [ - 14, - 24, + 42, + 45, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 7, + "line": 6, }, "start": Object { "column": 4, - "line": 2, + "line": 6, }, }, - "method": true, + "method": false, "range": Array [ - 14, - 111, + 42, + 45, ], - "shorthand": false, + "shorthand": true, "type": "Property", "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 48, - "line": 2, - }, + "loc": Object { + "end": Object { + "column": 7, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, }, - "range": Array [ - 58, - 111, - ], - "type": "BlockStatement", }, - "expression": false, - "generator": false, - "id": null, + "name": "foo", + "range": Array [ + 42, + 45, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 7, + "line": 7, }, "start": Object { - "column": 14, - "line": 2, + "column": 4, + "line": 7, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "someVar", - "range": Array [ - 26, - 33, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 26, - 33, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "someVar", - "range": Array [ - 26, - 33, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "otherVar", - "range": Array [ - 35, - 43, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 35, - 43, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "otherVar", - "range": Array [ - 35, - 43, - ], - "type": "Identifier", - }, - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "name": "options", - "range": Array [ - 48, - 55, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 45, - 55, - ], - "type": "RestElement", - }, - ], - "range": Array [ - 25, - 56, - ], - "type": "ObjectPattern", + "name": "get", + "range": Array [ + 51, + 54, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 7, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "method": false, + "range": Array [ + 51, + 54, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 7, }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "name": "get", + "range": Array [ + 51, + 54, ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 8, + }, + "start": Object { + "column": 7, + "line": 8, + }, + }, + "name": "set", "range": Array [ - 24, - 111, + 63, + 66, ], - "type": "FunctionExpression", + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, }, + "range": Array [ + 60, + 66, + ], + "type": "SpreadElement", }, ], "range": Array [ - 8, - 113, + 36, + 68, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 9, }, "start": Object { "column": 4, - "line": 1, + "line": 5, }, }, "range": Array [ - 4, - 113, + 32, + 68, ], "type": "VariableDeclarator", }, @@ -70065,24 +75170,24 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 5, + "line": 9, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, - 114, + 28, + 69, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 0, + "line": 10, }, "start": Object { "column": 0, @@ -70091,7 +75196,7 @@ Object { }, "range": Array [ 0, - 114, + 70, ], "sourceType": "script", "tokens": Array [ @@ -70116,7 +75221,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { @@ -70126,92 +75231,92 @@ Object { }, "range": Array [ 4, - 5, + 7, ], "type": "Identifier", - "value": "x", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 8, "line": 1, }, "start": Object { - "column": 6, + "column": 7, "line": 1, }, }, "range": Array [ - 6, 7, + 8, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 8, - 9, + 13, + 16, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 2, }, "start": Object { - "column": 4, + "column": 7, "line": 2, }, }, "range": Array [ - 14, - 24, + 16, + 17, ], - "type": "Identifier", - "value": "initialize", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 14, - "line": 2, + "column": 4, + "line": 3, }, }, "range": Array [ - 24, + 22, 25, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 8, + "line": 3, }, "start": Object { - "column": 15, - "line": 2, + "column": 7, + "line": 3, }, }, "range": Array [ @@ -70219,202 +75324,202 @@ Object { 26, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 3, + "line": 5, }, "start": Object { - "column": 16, - "line": 2, + "column": 0, + "line": 5, }, }, "range": Array [ - 26, - 33, + 28, + 31, ], - "type": "Identifier", - "value": "someVar", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 5, + "line": 5, }, "start": Object { - "column": 23, - "line": 2, + "column": 4, + "line": 5, }, }, "range": Array [ + 32, 33, - 34, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 7, + "line": 5, }, "start": Object { - "column": 25, - "line": 2, + "column": 6, + "line": 5, }, }, "range": Array [ + 34, 35, - 43, ], - "type": "Identifier", - "value": "otherVar", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 9, + "line": 5, }, "start": Object { - "column": 33, - "line": 2, + "column": 8, + "line": 5, }, }, "range": Array [ - 43, - 44, + 36, + 37, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 2, + "column": 7, + "line": 6, }, "start": Object { - "column": 35, - "line": 2, + "column": 4, + "line": 6, }, }, "range": Array [ + 42, 45, - 48, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 45, - "line": 2, + "column": 8, + "line": 6, }, "start": Object { - "column": 38, - "line": 2, + "column": 7, + "line": 6, }, }, "range": Array [ - 48, - 55, + 45, + 46, ], - "type": "Identifier", - "value": "options", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 46, - "line": 2, + "column": 7, + "line": 7, }, "start": Object { - "column": 45, - "line": 2, + "column": 4, + "line": 7, }, }, "range": Array [ - 55, - 56, + 51, + 54, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 2, + "column": 8, + "line": 7, }, "start": Object { - "column": 46, - "line": 2, + "column": 7, + "line": 7, }, }, "range": Array [ - 56, - 57, + 54, + 55, ], "type": "Punctuator", - "value": ")", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 49, - "line": 2, + "column": 7, + "line": 8, }, "start": Object { - "column": 48, - "line": 2, + "column": 4, + "line": 8, }, }, "range": Array [ - 58, - 59, + 60, + 63, ], "type": "Punctuator", - "value": "{", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 10, + "line": 8, }, "start": Object { - "column": 4, - "line": 4, + "column": 7, + "line": 8, }, }, "range": Array [ - 110, - 111, + 63, + 66, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 9, }, "start": Object { "column": 0, - "line": 5, + "line": 9, }, }, "range": Array [ - 112, - 113, + 67, + 68, ], "type": "Punctuator", "value": "}", @@ -70423,16 +75528,16 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 5, + "line": 9, }, "start": Object { "column": 1, - "line": 5, + "line": 9, }, }, "range": Array [ - 113, - 114, + 68, + 69, ], "type": "Punctuator", "value": ";", @@ -70442,7 +75547,7 @@ Object { } `; -exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-properties.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/single-spread.src 1`] = ` Object { "body": Array [ Object { @@ -70629,7 +75734,7 @@ Object { "kind": "init", "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 6, }, "start": Object { @@ -70640,25 +75745,25 @@ Object { "method": false, "range": Array [ 42, - 45, + 50, ], - "shorthand": true, + "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 6, }, "start": Object { - "column": 4, + "column": 9, "line": 6, }, }, "name": "foo", "range": Array [ - 42, - 45, + 47, + 50, ], "type": "Identifier", }, @@ -70678,15 +75783,15 @@ Object { }, "name": "get", "range": Array [ - 51, - 54, + 56, + 59, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 7, }, "start": Object { @@ -70696,26 +75801,26 @@ Object { }, "method": false, "range": Array [ - 51, - 54, + 56, + 64, ], - "shorthand": true, + "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 7, }, "start": Object { - "column": 4, + "column": 9, "line": 7, }, }, "name": "get", "range": Array [ - 51, - 54, + 61, + 64, ], "type": "Identifier", }, @@ -70734,8 +75839,8 @@ Object { }, "name": "set", "range": Array [ - 63, - 66, + 73, + 76, ], "type": "Identifier", }, @@ -70750,15 +75855,15 @@ Object { }, }, "range": Array [ - 60, - 66, + 70, + 76, ], "type": "SpreadElement", }, ], "range": Array [ 36, - 68, + 78, ], "type": "ObjectExpression", }, @@ -70774,7 +75879,7 @@ Object { }, "range": Array [ 32, - 68, + 78, ], "type": "VariableDeclarator", }, @@ -70792,7 +75897,7 @@ Object { }, "range": Array [ 28, - 69, + 79, ], "type": "VariableDeclaration", }, @@ -70809,7 +75914,7 @@ Object { }, "range": Array [ 0, - 70, + 80, ], "sourceType": "script", "tokens": Array [ @@ -71045,6 +76150,42 @@ Object { 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 { @@ -71059,8 +76200,8 @@ Object { }, }, "range": Array [ - 51, - 54, + 56, + 59, ], "type": "Identifier", "value": "get", @@ -71077,8 +76218,44 @@ Object { }, }, "range": Array [ - 54, - 55, + 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": ",", @@ -71095,8 +76272,8 @@ Object { }, }, "range": Array [ - 60, - 63, + 70, + 73, ], "type": "Punctuator", "value": "...", @@ -71113,8 +76290,8 @@ Object { }, }, "range": Array [ - 63, - 66, + 73, + 76, ], "type": "Identifier", "value": "set", @@ -71131,8 +76308,8 @@ Object { }, }, "range": Array [ - 67, - 68, + 77, + 78, ], "type": "Punctuator", "value": "}", @@ -71149,8 +76326,8 @@ Object { }, }, "range": Array [ - 68, - 69, + 78, + 79, ], "type": "Punctuator", "value": ";", @@ -71160,7 +76337,415 @@ Object { } `; -exports[`javascript fixtures/experimentalObjectRestSpread/single-spread.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/spread-trailing-comma.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 3, + 4, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 3, + 4, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 3, + 4, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 6, + 7, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/experimentalObjectRestSpread/two-spread.src 1`] = ` Object { "body": Array [ Object { @@ -71382,29 +76967,27 @@ Object { }, }, Object { - "computed": false, - "key": Object { + "argument": Object { "loc": Object { "end": Object { - "column": 7, + "column": 10, "line": 7, }, "start": Object { - "column": 4, + "column": 7, "line": 7, }, }, "name": "get", "range": Array [ - 56, 59, + 62, ], "type": "Identifier", }, - "kind": "init", "loc": Object { "end": Object { - "column": 12, + "column": 10, "line": 7, }, "start": Object { @@ -71412,31 +76995,11 @@ Object { "line": 7, }, }, - "method": false, "range": Array [ 56, - 64, + 62, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "name": "get", - "range": Array [ - 61, - 64, - ], - "type": "Identifier", - }, + "type": "SpreadElement", }, Object { "argument": Object { @@ -71452,8 +77015,8 @@ Object { }, "name": "set", "range": Array [ - 73, - 76, + 71, + 74, ], "type": "Identifier", }, @@ -71468,15 +77031,15 @@ Object { }, }, "range": Array [ - 70, - 76, + 68, + 74, ], "type": "SpreadElement", }, ], "range": Array [ 36, - 78, + 76, ], "type": "ObjectExpression", }, @@ -71492,7 +77055,7 @@ Object { }, "range": Array [ 32, - 78, + 76, ], "type": "VariableDeclarator", }, @@ -71510,7 +77073,7 @@ Object { }, "range": Array [ 28, - 79, + 77, ], "type": "VariableDeclaration", }, @@ -71527,7 +77090,7 @@ Object { }, "range": Array [ 0, - 80, + 78, ], "sourceType": "script", "tokens": Array [ @@ -71816,13 +77379,13 @@ Object { 56, 59, ], - "type": "Identifier", - "value": "get", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 7, }, "start": Object { @@ -71832,25 +77395,7 @@ Object { }, "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, + 62, ], "type": "Identifier", "value": "get", @@ -71858,17 +77403,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 11, "line": 7, }, "start": Object { - "column": 12, + "column": 10, "line": 7, }, }, "range": Array [ - 64, - 65, + 62, + 63, ], "type": "Punctuator", "value": ",", @@ -71885,8 +77430,8 @@ Object { }, }, "range": Array [ - 70, - 73, + 68, + 71, ], "type": "Punctuator", "value": "...", @@ -71903,8 +77448,8 @@ Object { }, }, "range": Array [ - 73, - 76, + 71, + 74, ], "type": "Identifier", "value": "set", @@ -71921,8 +77466,8 @@ Object { }, }, "range": Array [ - 77, - 78, + 75, + 76, ], "type": "Punctuator", "value": "}", @@ -71939,8 +77484,8 @@ Object { }, }, "range": Array [ - 78, - 79, + 76, + 77, ], "type": "Punctuator", "value": ";", @@ -71950,181 +77495,68 @@ Object { } `; -exports[`javascript fixtures/experimentalObjectRestSpread/spread-trailing-comma.src 1`] = ` +exports[`javascript fixtures/experimentalOptionalCatchBinding/optional-catch-binding.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { + "block": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 16, + "column": 6, "line": 1, }, "start": Object { - "column": 1, + "column": 4, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, + "range": Array [ + 4, + 6, + ], + "type": "BlockStatement", + }, + "finalizer": null, + "handler": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, }, - "method": false, - "range": Array [ - 3, - 4, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 3, - 4, - ], - "type": "Identifier", + "start": Object { + "column": 13, + "line": 1, }, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 6, - 7, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + "range": Array [ + 13, + 15, + ], + "type": "BlockStatement", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 13, - ], - "type": "SpreadElement", + "start": Object { + "column": 7, + "line": 1, }, - ], + }, + "param": null, "range": Array [ - 1, - 16, + 7, + 15, ], - "type": "ObjectExpression", + "type": "CatchClause", }, "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 1, }, "start": Object { @@ -72133,60 +77565,114 @@ Object { }, }, "range": Array [ - 0, - 17, + 0, + 15, + ], + "type": "TryStatement", + }, + ], + "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": "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": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "}", }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 12, "line": 1, }, "start": Object { - "column": 0, + "column": 7, "line": 1, }, }, "range": Array [ - 0, - 1, + 7, + 12, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "catch", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 14, "line": 1, }, "start": Object { - "column": 1, + "column": 13, "line": 1, }, }, "range": Array [ - 1, - 2, + 13, + 14, ], "type": "Punctuator", "value": "{", @@ -72194,110 +77680,206 @@ Object { Object { "loc": Object { "end": Object { - "column": 4, + "column": 15, "line": 1, }, "start": Object { - "column": 3, + "column": 14, "line": 1, }, }, "range": Array [ - 3, - 4, + 14, + 15, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/experimentalOptionalCatchBinding/optional-catch-binding-finally.src 1`] = ` +Object { + "body": Array [ Object { + "block": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 6, + ], + "type": "BlockStatement", + }, + "finalizer": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 26, + ], + "type": "BlockStatement", + }, + "handler": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 15, + ], + "type": "BlockStatement", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "param": null, + "range": Array [ + 7, + 15, + ], + "type": "CatchClause", + }, "loc": Object { "end": Object { - "column": 5, + "column": 26, "line": 1, }, "start": Object { - "column": 4, + "column": 0, "line": 1, }, }, "range": Array [ - 4, - 5, + 0, + 26, ], - "type": "Punctuator", - "value": ",", + "type": "TryStatement", + }, + ], + "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": 7, + "column": 3, "line": 1, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, "range": Array [ - 6, - 7, + 0, + 3, ], - "type": "Identifier", - "value": "b", + "type": "Keyword", + "value": "try", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { - "column": 7, + "column": 4, "line": 1, }, }, "range": Array [ - 7, - 8, + 4, + 5, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 6, "line": 1, }, "start": Object { - "column": 9, + "column": 5, "line": 1, }, }, "range": Array [ - 9, - 12, + 5, + 6, ], "type": "Punctuator", - "value": "...", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 12, "line": 1, }, "start": Object { - "column": 12, + "column": 7, "line": 1, }, }, "range": Array [ + 7, 12, - 13, ], - "type": "Identifier", - "value": "c", + "type": "Keyword", + "value": "catch", }, Object { "loc": Object { @@ -72315,22 +77897,22 @@ Object { 14, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 15, "line": 1, }, "start": Object { - "column": 15, + "column": 14, "line": 1, }, }, "range": Array [ + 14, 15, - 16, ], "type": "Punctuator", "value": "}", @@ -72338,7 +77920,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, + "column": 23, "line": 1, }, "start": Object { @@ -72348,147 +77930,55 @@ Object { }, "range": Array [ 16, - 17, + 23, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "finally", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/experimentalObjectRestSpread/two-spread.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "VariableDeclarator", - }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "get", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "VariableDeclarator", + "loc": Object { + "end": Object { + "column": 25, + "line": 1, }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "set", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "VariableDeclarator", + "start": Object { + "column": 24, + "line": 1, }, + }, + "range": Array [ + 24, + 25, ], - "kind": "var", + "type": "Punctuator", + "value": "{", + }, + Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 26, + "line": 1, }, "start": Object { - "column": 0, + "column": 25, "line": 1, }, }, "range": Array [ - 0, + 25, 26, ], - "type": "VariableDeclaration", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/exponentiationOperators/exponential-operators.src 1`] = ` +Object { + "body": Array [ Object { "declarations": Array [ Object { @@ -72496,179 +77986,89 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 5, + "line": 1, }, "start": Object { "column": 4, - "line": 5, + "line": 1, }, }, "name": "x", "range": Array [ - 32, - 33, + 4, + 5, ], "type": "Identifier", }, "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "method": false, - "range": Array [ - 42, - 50, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - }, - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "name": "get", - "range": Array [ - 59, - 62, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 56, - 62, - ], - "type": "SpreadElement", - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "name": "set", - "range": Array [ - 71, - 74, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, + "left": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, }, - "range": Array [ - 68, - 74, - ], - "type": "SpreadElement", }, - ], + "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 [ - 36, - 76, + 8, + 14, ], - "type": "ObjectExpression", + "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": 1, - "line": 9, + "column": 14, + "line": 1, }, "start": Object { "column": 4, - "line": 5, + "line": 1, }, }, "range": Array [ - 32, - 76, + 4, + 14, ], "type": "VariableDeclarator", }, @@ -72676,25 +78076,97 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 15, + "line": 1, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 28, - 77, + 0, + 15, ], "type": "VariableDeclaration", }, + Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "name": "x", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "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", + }, ], "loc": Object { "end": Object { "column": 0, - "line": 10, + "line": 3, }, "start": Object { "column": 0, @@ -72703,7 +78175,7 @@ Object { }, "range": Array [ 0, - 78, + 25, ], "sourceType": "script", "tokens": Array [ @@ -72728,7 +78200,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -72738,97 +78210,97 @@ Object { }, "range": Array [ 4, - 7, + 5, ], "type": "Identifier", - "value": "foo", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 7, "line": 1, }, "start": Object { - "column": 7, + "column": 6, "line": 1, }, }, "range": Array [ + 6, 7, - 8, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 9, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 13, - 16, + 8, + 9, ], - "type": "Identifier", - "value": "get", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 16, - 17, + 10, + 12, ], "type": "Punctuator", - "value": ",", + "value": "**", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 13, + "line": 1, }, }, "range": Array [ - 22, - 25, + 13, + 14, ], - "type": "Identifier", - "value": "set", + "type": "Numeric", + "value": "3", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 14, + "line": 1, }, }, "range": Array [ - 25, - 26, + 14, + 15, ], "type": "Punctuator", "value": ";", @@ -72836,402 +78308,534 @@ Object { Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 1, + "line": 2, }, "start": Object { "column": 0, - "line": 5, + "line": 2, }, }, "range": Array [ - 28, - 31, + 16, + 17, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 5, + "line": 2, }, "start": Object { - "column": 4, - "line": 5, + "column": 2, + "line": 2, }, }, "range": Array [ - 32, - 33, + 18, + 21, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "**=", }, Object { "loc": Object { "end": Object { "column": 7, - "line": 5, + "line": 2, }, "start": Object { "column": 6, - "line": 5, + "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", +} +`; + +exports[`javascript fixtures/forOf/for-of-with-function-initializer.src 1`] = ` +Object { + "body": Array [ + Object { + "await": false, + "body": Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 62, + "line": 1, + }, + "start": Object { + "column": 61, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 61, + 62, + ], + "type": "Identifier", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 60, + "line": 1, + }, + "start": Object { + "column": 53, + "line": 1, + }, + }, + "name": "process", + "range": Array [ + 53, + 60, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 63, + "line": 1, + }, + "start": Object { + "column": 53, + "line": 1, + }, + }, + "range": Array [ + 53, + 63, + ], + "type": "CallExpression", + }, + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "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", + }, + "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, + ], + "type": "FunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 43, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, }, + "range": Array [ + 5, + 43, + ], + "type": "VariableDeclaration", }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "=", - }, - Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 64, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 36, - 37, + 0, + 64, ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, + "right": Object { + "loc": Object { + "end": Object { + "column": 51, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, }, + "name": "list", + "range": Array [ + 47, + 51, + ], + "type": "Identifier", }, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "value": "foo", + "type": "ForOfStatement", }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ":", + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 9, - "line": 6, - }, - }, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "value": "foo", + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 65, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 13, - "line": 6, + "column": 3, + "line": 1, }, "start": Object { - "column": 12, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 50, - 51, + 0, + 3, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 7, + "column": 5, + "line": 1, }, "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, + "line": 1, }, }, "range": Array [ - 62, - 63, + 4, + 5, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 8, + "column": 8, + "line": 1, }, "start": Object { - "column": 4, - "line": 8, + "column": 5, + "line": 1, }, }, "range": Array [ - 68, - 71, + 5, + 8, ], - "type": "Punctuator", - "value": "...", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { "column": 10, - "line": 8, + "line": 1, }, "start": Object { - "column": 7, - "line": 8, + "column": 9, + "line": 1, }, }, "range": Array [ - 71, - 74, + 9, + 10, ], "type": "Identifier", - "value": "set", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 12, + "line": 1, }, "start": Object { - "column": 0, - "line": 9, + "column": 11, + "line": 1, }, }, "range": Array [ - 75, - 76, + 11, + 12, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 21, + "line": 1, }, "start": Object { - "column": 1, - "line": 9, + "column": 13, + "line": 1, }, }, "range": Array [ - 76, - 77, + 13, + 21, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "function", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/experimentalOptionalCatchBinding/optional-catch-binding.src 1`] = ` -Object { - "body": Array [ Object { - "block": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 6, - ], - "type": "BlockStatement", - }, - "finalizer": null, - "handler": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "param": null, - "range": Array [ - 7, - 15, - ], - "type": "CatchClause", - }, "loc": Object { "end": Object { - "column": 15, + "column": 22, "line": 1, }, "start": Object { - "column": 0, + "column": 21, "line": 1, }, }, "range": Array [ - 0, - 15, + 21, + 22, ], - "type": "TryStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "(", }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 23, "line": 1, }, "start": Object { - "column": 0, + "column": 22, "line": 1, }, }, "range": Array [ - 0, - 3, + 22, + 23, ], - "type": "Keyword", - "value": "try", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 25, "line": 1, }, "start": Object { - "column": 4, + "column": 24, "line": 1, }, }, "range": Array [ - 4, - 5, + 24, + 25, ], "type": "Punctuator", "value": "{", @@ -73239,458 +78843,397 @@ Object { Object { "loc": Object { "end": Object { - "column": 6, + "column": 32, "line": 1, }, "start": Object { - "column": 5, + "column": 26, "line": 1, }, }, "range": Array [ - 5, - 6, + 26, + 32, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 35, "line": 1, }, "start": Object { - "column": 7, + "column": 33, "line": 1, }, }, "range": Array [ - 7, - 12, + 33, + 35, ], - "type": "Keyword", - "value": "catch", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 38, "line": 1, }, "start": Object { - "column": 13, + "column": 36, "line": 1, }, }, "range": Array [ - 13, - 14, + 36, + 38, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 40, "line": 1, }, "start": Object { - "column": 14, + "column": 39, "line": 1, }, }, "range": Array [ - 14, - 15, + 39, + 40, ], "type": "Punctuator", - "value": "}", + "value": "[", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/experimentalOptionalCatchBinding/optional-catch-binding-finally.src 1`] = ` -Object { - "body": Array [ Object { - "block": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 6, - ], - "type": "BlockStatement", - }, - "finalizer": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "BlockStatement", - }, - "handler": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "param": null, - "range": Array [ - 7, - 15, - ], - "type": "CatchClause", - }, "loc": Object { "end": Object { - "column": 26, + "column": 41, "line": 1, }, "start": Object { - "column": 0, + "column": 40, "line": 1, }, }, "range": Array [ - 0, - 26, - ], - "type": "TryStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "]", + }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 43, "line": 1, }, "start": Object { - "column": 0, + "column": 42, "line": 1, }, }, "range": Array [ - 0, - 3, + 42, + 43, ], - "type": "Keyword", - "value": "try", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 46, "line": 1, }, "start": Object { - "column": 4, + "column": 44, "line": 1, }, }, "range": Array [ - 4, - 5, + 44, + 46, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 51, "line": 1, }, "start": Object { - "column": 5, + "column": 47, "line": 1, }, }, "range": Array [ - 5, - 6, + 47, + 51, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "list", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 52, "line": 1, }, "start": Object { - "column": 7, + "column": 51, "line": 1, }, }, "range": Array [ - 7, - 12, + 51, + 52, ], - "type": "Keyword", - "value": "catch", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 60, "line": 1, }, "start": Object { - "column": 13, + "column": 53, "line": 1, }, }, "range": Array [ - 13, - 14, + 53, + 60, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "process", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 61, "line": 1, }, "start": Object { - "column": 14, + "column": 60, "line": 1, }, }, "range": Array [ - 14, - 15, + 60, + 61, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 62, "line": 1, }, "start": Object { - "column": 16, + "column": 61, "line": 1, }, }, "range": Array [ - 16, - 23, + 61, + 62, ], - "type": "Keyword", - "value": "finally", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 63, "line": 1, }, "start": Object { - "column": 24, + "column": 62, "line": 1, }, }, "range": Array [ - 24, - 25, + 62, + 63, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 64, "line": 1, }, "start": Object { - "column": 25, + "column": 63, "line": 1, }, }, "range": Array [ - 25, - 26, + 63, + 64, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/exponentiationOperators/exponential-operators.src 1`] = ` +exports[`javascript fixtures/forOf/for-of-with-var-and-braces.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "await": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "doSomething", + "range": Array [ + 25, + 36, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 25, + 38, + ], + "type": "CallExpression", + }, "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { "column": 4, - "line": 1, + "line": 2, }, }, - "name": "x", "range": Array [ - 4, - 5, + 25, + 39, ], - "type": "Identifier", + "type": "ExpressionStatement", }, - "init": Object { - "left": Object { + ], + "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 { + "id": Object { "loc": Object { "end": Object { - "column": 9, + "column": 10, "line": 1, }, "start": Object { - "column": 8, + "column": 9, "line": 1, }, }, + "name": "x", "range": Array [ - 8, 9, + 10, ], - "raw": "2", - "type": "Literal", - "value": 2, + "type": "Identifier", }, + "init": null, "loc": Object { "end": Object { - "column": 14, + "column": 10, "line": 1, }, "start": Object { - "column": 8, + "column": 9, "line": 1, }, }, - "operator": "**", "range": Array [ - 8, - 14, + 9, + 10, ], - "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", + "type": "VariableDeclarator", }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 4, - 14, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 5, + 10, + ], + "type": "VariableDeclaration", + }, "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -73699,87 +79242,33 @@ Object { }, "range": Array [ 0, - 15, + 41, ], - "type": "VariableDeclaration", - }, - Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "name": "x", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, + "right": Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 14, + "line": 1, }, }, - "operator": "**=", + "name": "foo", "range": Array [ - 16, - 23, + 14, + 17, ], - "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, - }, + "type": "Identifier", }, - "range": Array [ - 16, - 24, - ], - "type": "ExpressionStatement", + "type": "ForOfStatement", }, ], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 4, }, "start": Object { "column": 0, @@ -73788,7 +79277,7 @@ Object { }, "range": Array [ 0, - 25, + 42, ], "sourceType": "script", "tokens": Array [ @@ -73808,7 +79297,7 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { @@ -73825,250 +79314,267 @@ Object { 4, 5, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 8, "line": 1, }, "start": Object { - "column": 6, + "column": 5, "line": 1, }, }, "range": Array [ - 6, - 7, + 5, + 8, ], - "type": "Punctuator", - "value": "=", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 10, "line": 1, }, "start": Object { - "column": 8, + "column": 9, "line": 1, }, }, "range": Array [ - 8, 9, + 10, ], - "type": "Numeric", - "value": "2", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 13, "line": 1, }, "start": Object { - "column": 10, + "column": 11, "line": 1, }, }, "range": Array [ - 10, - 12, + 11, + 13, ], - "type": "Punctuator", - "value": "**", + "type": "Identifier", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 17, "line": 1, }, "start": Object { - "column": 13, + "column": 14, "line": 1, }, }, "range": Array [ - 13, 14, + 17, ], - "type": "Numeric", - "value": "3", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 18, "line": 1, }, "start": Object { - "column": 14, + "column": 17, "line": 1, }, }, "range": Array [ - 14, - 15, + 17, + 18, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 1, + "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": 0, + "column": 4, "line": 2, }, }, "range": Array [ - 16, - 17, + 25, + 36, ], "type": "Identifier", - "value": "x", + "value": "doSomething", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 16, "line": 2, }, "start": Object { - "column": 2, + "column": 15, "line": 2, }, }, "range": Array [ - 18, - 21, + 36, + 37, ], "type": "Punctuator", - "value": "**=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 17, "line": 2, }, "start": Object { - "column": 6, + "column": 16, "line": 2, }, }, "range": Array [ - 22, - 23, + 37, + 38, ], - "type": "Numeric", - "value": "4", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 18, "line": 2, }, "start": Object { - "column": 7, + "column": 17, "line": 2, }, }, "range": Array [ - 23, - 24, + 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", } `; -exports[`javascript fixtures/forOf/for-of-with-function-initializer.src 1`] = ` +exports[`javascript fixtures/forOf/for-of-with-var-and-no-braces.src 1`] = ` Object { "body": Array [ Object { "await": false, "body": Object { "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 61, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 61, - 62, - ], - "type": "Identifier", - }, - ], + "arguments": Array [], "callee": Object { "loc": Object { "end": Object { - "column": 60, - "line": 1, + "column": 15, + "line": 2, }, - "start": Object { - "column": 53, - "line": 1, + "start": Object { + "column": 4, + "line": 2, }, }, - "name": "process", + "name": "doSomething", "range": Array [ - 53, - 60, + 23, + 34, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 63, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 53, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 53, - 63, + 23, + 36, ], "type": "CallExpression", }, "loc": Object { "end": Object { - "column": 64, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { - "column": 53, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 53, - 64, + 23, + 37, ], "type": "ExpressionStatement", }, @@ -74086,129 +79592,17 @@ Object { "line": 1, }, }, - "name": "i", + "name": "x", "range": Array [ 9, 10, ], "type": "Identifier", }, - "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", - }, - "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, - ], - "type": "FunctionExpression", - }, + "init": null, "loc": Object { "end": Object { - "column": 43, + "column": 10, "line": 1, }, "start": Object { @@ -74218,7 +79612,7 @@ Object { }, "range": Array [ 9, - 43, + 10, ], "type": "VariableDeclarator", }, @@ -74226,7 +79620,7 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 43, + "column": 10, "line": 1, }, "start": Object { @@ -74236,14 +79630,14 @@ Object { }, "range": Array [ 5, - 43, + 10, ], "type": "VariableDeclaration", }, "loc": Object { "end": Object { - "column": 64, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { "column": 0, @@ -74252,23 +79646,23 @@ Object { }, "range": Array [ 0, - 64, + 37, ], "right": Object { "loc": Object { "end": Object { - "column": 51, + "column": 17, "line": 1, }, "start": Object { - "column": 47, + "column": 14, "line": 1, }, }, - "name": "list", + "name": "foo", "range": Array [ - 47, - 51, + 14, + 17, ], "type": "Identifier", }, @@ -74278,7 +79672,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 3, }, "start": Object { "column": 0, @@ -74287,7 +79681,7 @@ Object { }, "range": Array [ 0, - 65, + 38, ], "sourceType": "script", "tokens": Array [ @@ -74361,12 +79755,12 @@ Object { 10, ], "type": "Identifier", - "value": "i", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 13, "line": 1, }, "start": Object { @@ -74376,313 +79770,465 @@ Object { }, "range": Array [ 11, - 12, + 13, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 17, "line": 1, }, "start": Object { - "column": 13, + "column": 14, "line": 1, }, }, "range": Array [ - 13, - 21, + 14, + 17, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 18, "line": 1, }, "start": Object { - "column": 21, + "column": 17, "line": 1, }, }, "range": Array [ - 21, - 22, + 17, + 18, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 22, 23, + 34, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "doSomething", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 24, - 25, + 34, + 35, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 26, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 26, - 32, + 35, + 36, ], - "type": "Keyword", - "value": "return", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { - "column": 33, - "line": 1, + "column": 17, + "line": 2, }, }, "range": Array [ - 33, - 35, + 36, + 37, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/forOf/invalid-for-of-with-const-and-no-braces.src 1`] = ` +Object { + "body": Array [ Object { + "await": false, + "body": Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "doSomething", + "range": Array [ + 25, + 36, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 25, + 38, + ], + "type": "CallExpression", + }, + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "VariableDeclarator", + }, + ], + "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": 38, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { - "column": 36, + "column": 0, "line": 1, }, }, "range": Array [ - 36, - 38, + 0, + 39, ], - "type": "Keyword", - "value": "in", + "right": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 16, + 19, + ], + "type": "Identifier", + }, + "type": "ForOfStatement", + }, + ], + "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": 40, + "column": 3, "line": 1, }, "start": Object { - "column": 39, + "column": 0, "line": 1, }, }, "range": Array [ - 39, - 40, + 0, + 3, ], - "type": "Punctuator", - "value": "[", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 41, + "column": 5, "line": 1, }, "start": Object { - "column": 40, + "column": 4, "line": 1, }, }, "range": Array [ - 40, - 41, + 4, + 5, ], "type": "Punctuator", - "value": "]", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 43, + "column": 10, "line": 1, }, "start": Object { - "column": 42, + "column": 5, "line": 1, }, }, "range": Array [ - 42, - 43, + 5, + 10, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 46, + "column": 12, "line": 1, }, "start": Object { - "column": 44, + "column": 11, "line": 1, }, }, "range": Array [ - 44, - 46, + 11, + 12, ], "type": "Identifier", - "value": "of", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 51, + "column": 15, "line": 1, }, "start": Object { - "column": 47, + "column": 13, "line": 1, }, }, "range": Array [ - 47, - 51, + 13, + 15, ], "type": "Identifier", - "value": "list", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 52, + "column": 19, "line": 1, }, "start": Object { - "column": 51, + "column": 16, "line": 1, }, }, "range": Array [ - 51, - 52, + 16, + 19, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 60, + "column": 20, "line": 1, }, "start": Object { - "column": 53, + "column": 19, "line": 1, }, }, "range": Array [ - 53, - 60, + 19, + 20, ], - "type": "Identifier", - "value": "process", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 61, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 60, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 60, - 61, + 25, + 36, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "doSomething", }, Object { "loc": Object { "end": Object { - "column": 62, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 61, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 61, - 62, + 36, + 37, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 63, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 62, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 62, - 63, + 37, + 38, ], "type": "Punctuator", "value": ")", @@ -74690,17 +80236,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 64, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { - "column": 63, - "line": 1, + "column": 17, + "line": 2, }, }, "range": Array [ - 63, - 64, + 38, + 39, ], "type": "Punctuator", "value": ";", @@ -74710,53 +80256,18 @@ Object { } `; -exports[`javascript fixtures/forOf/for-of-with-var-and-braces.src 1`] = ` +exports[`javascript fixtures/forOf/invalid-for-of-with-let-and-no-braces.src 1`] = ` Object { "body": Array [ Object { "await": false, "body": Object { - "body": Array [ - Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "doSomething", - "range": Array [ - 25, - 36, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 38, - ], - "type": "CallExpression", - }, + "expression": Object { + "arguments": Array [], + "callee": Object { "loc": Object { "end": Object { - "column": 18, + "column": 15, "line": 2, }, "start": Object { @@ -74764,28 +80275,44 @@ Object { "line": 2, }, }, + "name": "doSomething", "range": Array [ - 25, - 39, + 23, + 34, ], - "type": "ExpressionStatement", + "type": "Identifier", }, - ], + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 23, + 36, + ], + "type": "CallExpression", + }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 18, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 19, - 41, + 23, + 37, ], - "type": "BlockStatement", + "type": "ExpressionStatement", }, "left": Object { "declarations": Array [ @@ -74826,7 +80353,7 @@ Object { "type": "VariableDeclarator", }, ], - "kind": "var", + "kind": "let", "loc": Object { "end": Object { "column": 10, @@ -74845,8 +80372,8 @@ Object { }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 18, + "line": 2, }, "start": Object { "column": 0, @@ -74855,7 +80382,7 @@ Object { }, "range": Array [ 0, - 41, + 37, ], "right": Object { "loc": Object { @@ -74881,7 +80408,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 3, }, "start": Object { "column": 0, @@ -74890,7 +80417,7 @@ Object { }, "range": Array [ 0, - 42, + 38, ], "sourceType": "script", "tokens": Array [ @@ -74946,7 +80473,7 @@ Object { 8, ], "type": "Keyword", - "value": "var", + "value": "let", }, Object { "loc": Object { @@ -75020,24 +80547,6 @@ Object { "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 { @@ -75050,8 +80559,8 @@ Object { }, }, "range": Array [ - 25, - 36, + 23, + 34, ], "type": "Identifier", "value": "doSomething", @@ -75068,8 +80577,8 @@ Object { }, }, "range": Array [ - 36, - 37, + 34, + 35, ], "type": "Punctuator", "value": "(", @@ -75086,8 +80595,8 @@ Object { }, }, "range": Array [ - 37, - 38, + 35, + 36, ], "type": "Punctuator", "value": ")", @@ -75104,358 +80613,514 @@ Object { }, }, "range": Array [ - 38, - 39, + 36, + 37, ], "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", } `; -exports[`javascript fixtures/forOf/for-of-with-var-and-no-braces.src 1`] = ` +exports[`javascript fixtures/generators/anonymous-generator.src 1`] = ` Object { "body": Array [ Object { - "await": false, - "body": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, + "expression": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "v", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "delegate": false, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 23, + ], + "type": "YieldExpression", }, - }, - "name": "doSomething", - "range": Array [ - 23, - 34, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 23, - 36, - ], - "type": "CallExpression", - }, - "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 { - "id": Object { "loc": Object { "end": Object { - "column": 10, + "column": 23, "line": 1, }, "start": Object { - "column": 9, + "column": 16, "line": 1, }, }, - "name": "x", "range": Array [ - 9, - 10, + 16, + 23, ], - "type": "Identifier", + "type": "ExpressionStatement", }, - "init": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, }, - "range": Array [ - 9, - 10, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 14, + 25, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": true, + "id": null, "loc": Object { "end": Object { - "column": 10, + "column": 25, "line": 1, }, "start": Object { - "column": 5, + "column": 1, "line": 1, }, }, + "params": Array [], "range": Array [ - 5, - 10, + 1, + 25, ], - "type": "VariableDeclaration", + "type": "FunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 27, + ], + "type": "ExpressionStatement", + }, + ], + "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": 18, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 0, + "column": 22, "line": 1, }, }, "range": Array [ - 0, - 37, + 22, + 23, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - "type": "ForOfStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "v", }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 25, "line": 1, }, "start": Object { - "column": 0, + "column": 24, "line": 1, }, }, "range": Array [ - 0, - 3, + 24, + 25, ], - "type": "Keyword", - "value": "for", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 26, "line": 1, }, "start": Object { - "column": 4, + "column": 25, "line": 1, }, }, "range": Array [ - 4, - 5, + 25, + 26, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 27, "line": 1, }, "start": Object { - "column": 5, + "column": 26, "line": 1, }, }, "range": Array [ - 5, - 8, + 26, + 27, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/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", + }, + "expression": false, + "generator": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 9, - "line": 1, + "column": 0, + "line": 2, }, }, + "params": Array [], "range": Array [ - 9, - 10, + 1, + 27, ], - "type": "Identifier", - "value": "x", + "type": "FunctionDeclaration", + }, + ], + "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": 13, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 11, - 13, + 1, + 6, ], "type": "Identifier", - "value": "of", + "value": "async", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 6, + "line": 2, }, }, "range": Array [ - 14, - 17, + 7, + 15, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ + 16, 17, - 18, ], "type": "Punctuator", - "value": ")", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 19, "line": 2, }, "start": Object { - "column": 4, + "column": 16, "line": 2, }, }, "range": Array [ - 23, - 34, + 17, + 20, ], "type": "Identifier", - "value": "doSomething", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 20, "line": 2, }, "start": Object { - "column": 15, + "column": 19, "line": 2, }, }, "range": Array [ - 34, - 35, + 20, + 21, ], "type": "Punctuator", "value": "(", @@ -75463,17 +81128,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, + "column": 21, "line": 2, }, "start": Object { - "column": 16, + "column": 20, "line": 2, }, }, "range": Array [ - 35, - 36, + 21, + 22, ], "type": "Punctuator", "value": ")", @@ -75481,144 +81146,277 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 23, "line": 2, }, "start": Object { - "column": 17, + "column": 22, "line": 2, }, }, "range": Array [ - 36, - 37, + 23, + 24, ], "type": "Punctuator", - "value": ";", + "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", } `; -exports[`javascript fixtures/forOf/invalid-for-of-with-const-and-no-braces.src 1`] = ` +exports[`javascript fixtures/generators/async-generator-method.src 1`] = ` Object { "body": Array [ Object { - "await": false, "body": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "doSomething", - "range": Array [ - 25, - 36, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 38, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 25, - 39, - ], - "type": "ExpressionStatement", - }, - "left": Object { - "declarations": Array [ + "body": Array [ Object { - "id": Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 12, + "line": 2, }, }, - "name": "x", + "name": "f", "range": Array [ - 11, - 12, + 22, + 23, ], "type": "Identifier", }, - "init": null, + "kind": "method", "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 11, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 11, - 12, + 14, + 63, ], - "type": "VariableDeclarator", + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": true, + "body": Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "name": "x", + "range": Array [ + 42, + 43, + ], + "type": "Identifier", + }, + "init": Object { + "argument": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 3, + }, + "start": Object { + "column": 25, + "line": 3, + }, + }, + "name": "g", + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 25, + "line": 3, + }, + }, + "range": Array [ + 53, + 56, + ], + "type": "CallExpression", + }, + "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", + }, + ], + "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", + }, + "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, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 1, }, + }, + "range": Array [ + 8, + 65, ], - "kind": "const", + "type": "ClassBody", + }, + "id": Object { "loc": Object { "end": Object { - "column": 12, + "column": 7, "line": 1, }, "start": Object { - "column": 5, + "column": 6, "line": 1, }, }, + "name": "C", "range": Array [ - 5, - 12, + 6, + 7, ], - "type": "VariableDeclaration", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 1, + "line": 5, }, "start": Object { "column": 0, @@ -75627,33 +81425,16 @@ Object { }, "range": Array [ 0, - 39, + 65, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - }, - "type": "ForOfStatement", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 6, }, "start": Object { "column": 0, @@ -75662,14 +81443,14 @@ Object { }, "range": Array [ 0, - 40, + 66, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -75679,151 +81460,115 @@ Object { }, "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", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 7, "line": 1, }, "start": Object { - "column": 11, + "column": 6, "line": 1, }, }, "range": Array [ - 11, - 12, + 6, + 7, ], "type": "Identifier", - "value": "x", + "value": "C", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 9, "line": 1, }, "start": Object { - "column": 13, + "column": 8, "line": 1, }, }, "range": Array [ - 13, - 15, + 8, + 9, ], - "type": "Identifier", - "value": "of", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 16, + 14, 19, ], "type": "Identifier", - "value": "foo", + "value": "async", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 19, 20, + 21, ], "type": "Punctuator", - "value": ")", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 13, "line": 2, }, "start": Object { - "column": 4, + "column": 12, "line": 2, }, }, "range": Array [ - 25, - 36, + 22, + 23, ], "type": "Identifier", - "value": "doSomething", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 14, "line": 2, }, "start": Object { - "column": 15, + "column": 13, "line": 2, }, }, "range": Array [ - 36, - 37, + 23, + 24, ], "type": "Punctuator", "value": "(", @@ -75831,17 +81576,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 2, }, "start": Object { - "column": 16, + "column": 14, "line": 2, }, }, "range": Array [ - 37, - 38, + 24, + 25, ], "type": "Punctuator", "value": ")", @@ -75849,313 +81594,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 17, "line": 2, }, "start": Object { - "column": 17, + "column": 16, "line": 2, }, }, "range": Array [ - 38, - 39, + 26, + 27, ], "type": "Punctuator", - "value": ";", + "value": "{", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/forOf/invalid-for-of-with-let-and-no-braces.src 1`] = ` -Object { - "body": Array [ Object { - "await": false, - "body": Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "doSomething", - "range": Array [ - 23, - 34, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 23, - 36, - ], - "type": "CallExpression", - }, - "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 { - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "VariableDeclarator", - }, - ], - "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, + "column": 13, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 0, - 37, + 36, + 41, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - "type": "ForOfStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Keyword", + "value": "const", }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 15, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 14, + "line": 3, }, }, "range": Array [ - 0, - 3, + 42, + 43, ], - "type": "Keyword", - "value": "for", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 17, + "line": 3, }, "start": Object { - "column": 4, - "line": 1, + "column": 16, + "line": 3, }, }, "range": Array [ - 4, - 5, + 44, + 45, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 23, + "line": 3, }, "start": Object { - "column": 5, - "line": 1, + "column": 18, + "line": 3, }, }, "range": Array [ - 5, - 8, + 46, + 51, ], "type": "Keyword", - "value": "let", + "value": "yield", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 24, + "line": 3, }, "start": Object { - "column": 9, - "line": 1, + "column": 23, + "line": 3, }, }, "range": Array [ - 9, - 10, + 51, + 52, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 26, + "line": 3, }, "start": Object { - "column": 11, - "line": 1, + "column": 25, + "line": 3, }, }, "range": Array [ - 11, - 13, + 53, + 54, ], "type": "Identifier", - "value": "of", + "value": "g", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 27, + "line": 3, }, "start": Object { - "column": 14, - "line": 1, + "column": 26, + "line": 3, }, }, "range": Array [ - 14, - 17, + 54, + 55, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 28, + "line": 3, }, "start": Object { - "column": 17, - "line": 1, + "column": 27, + "line": 3, }, }, "range": Array [ - 17, - 18, + 55, + 56, ], "type": "Punctuator", "value": ")", @@ -76163,81 +81756,63 @@ Object { 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, + "column": 29, + "line": 3, }, "start": Object { - "column": 15, - "line": 2, + "column": 28, + "line": 3, }, }, "range": Array [ - 34, - 35, + 56, + 57, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 5, + "line": 4, }, "start": Object { - "column": 16, - "line": 2, + "column": 4, + "line": 4, }, }, "range": Array [ - 35, - 36, + 62, + 63, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 1, + "line": 5, }, "start": Object { - "column": 17, - "line": 2, + "column": 0, + "line": 5, }, }, "range": Array [ - 36, - 37, + 64, + 65, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/generators/anonymous-generator.src 1`] = ` +exports[`javascript fixtures/generators/double-yield.src 1`] = ` Object { "body": Array [ Object { @@ -76248,9 +81823,29 @@ Object { Object { "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": 23, + "column": 30, "line": 1, }, "start": Object { @@ -76258,17 +81853,16 @@ Object { "line": 1, }, }, - "name": "v", "range": Array [ 22, - 23, + 30, ], - "type": "Identifier", + "type": "YieldExpression", }, "delegate": false, "loc": Object { "end": Object { - "column": 23, + "column": 30, "line": 1, }, "start": Object { @@ -76278,13 +81872,13 @@ Object { }, "range": Array [ 16, - 23, + 30, ], "type": "YieldExpression", }, "loc": Object { "end": Object { - "column": 23, + "column": 30, "line": 1, }, "start": Object { @@ -76294,14 +81888,14 @@ Object { }, "range": Array [ 16, - 23, + 30, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 25, + "column": 32, "line": 1, }, "start": Object { @@ -76311,7 +81905,7 @@ Object { }, "range": Array [ 14, - 25, + 32, ], "type": "BlockStatement", }, @@ -76320,7 +81914,7 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 25, + "column": 32, "line": 1, }, "start": Object { @@ -76331,13 +81925,13 @@ Object { "params": Array [], "range": Array [ 1, - 25, + 32, ], "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 27, + "column": 34, "line": 1, }, "start": Object { @@ -76347,14 +81941,14 @@ Object { }, "range": Array [ 0, - 27, + 34, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 27, + "column": 34, "line": 1, }, "start": Object { @@ -76364,7 +81958,7 @@ Object { }, "range": Array [ 0, - 27, + 34, ], "sourceType": "script", "tokens": Array [ @@ -76497,7 +82091,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, + "column": 27, "line": 1, }, "start": Object { @@ -76507,251 +82101,61 @@ Object { }, "range": Array [ 22, - 23, + 27, ], - "type": "Identifier", - "value": "v", + "type": "Keyword", + "value": "yield", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 30, "line": 1, }, "start": Object { - "column": 24, + "column": 28, "line": 1, }, }, "range": Array [ - 24, - 25, + 28, + 30, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 32, "line": 1, }, "start": Object { - "column": 25, + "column": 31, "line": 1, }, }, "range": Array [ - 25, - 26, + 31, + 32, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 33, "line": 1, }, "start": Object { - "column": 26, + "column": 32, "line": 1, }, }, "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/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", - }, - "expression": false, - "generator": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 1, - 27, - ], - "type": "FunctionDeclaration", - }, - ], - "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, + 32, + 33, ], "type": "Punctuator", "value": ")", @@ -76759,295 +82163,108 @@ Object { 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, + "column": 34, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 33, + "line": 1, }, }, "range": Array [ - 26, - 27, + 33, + 34, ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/generators/async-generator-method.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "name": "f", - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 63, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": true, - "body": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "name": "x", - "range": Array [ - 42, - 43, - ], - "type": "Identifier", - }, - "init": Object { - "argument": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 3, - }, - }, - "name": "g", - "range": Array [ - 53, - 54, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 3, - }, - }, - "range": Array [ - 53, - 56, - ], - "type": "CallExpression", - }, - "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", - }, - ], - "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", - }, - "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, - ], - "type": "FunctionExpression", - }, - }, - ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/generators/empty-generator-declaration.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 16, + "line": 1, }, "start": Object { - "column": 8, + "column": 14, "line": 1, }, }, "range": Array [ - 8, - 65, + 14, + 16, ], - "type": "ClassBody", + "type": "BlockStatement", }, + "expression": false, + "generator": true, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 11, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, - "name": "C", + "name": "t", "range": Array [ - 6, - 7, + 10, + 11, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 16, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, + "params": Array [], "range": Array [ 0, - 65, + 16, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "FunctionDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 6, + "column": 17, + "line": 1, }, "start": Object { "column": 0, @@ -77056,14 +82273,14 @@ Object { }, "range": Array [ 0, - 66, + 17, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -77073,331 +82290,466 @@ Object { }, "range": Array [ 0, - 5, + 8, ], "type": "Keyword", - "value": "class", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 1, }, "start": Object { - "column": 6, + "column": 8, "line": 1, }, }, "range": Array [ - 6, - 7, + 8, + 9, ], - "type": "Identifier", - "value": "C", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 11, "line": 1, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, "range": Array [ - 8, - 9, + 10, + 11, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "t", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 14, - 19, + 11, + 12, ], - "type": "Identifier", - "value": "async", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 20, - 21, + 12, + 13, ], "type": "Punctuator", - "value": "*", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 22, - 23, + 14, + 15, ], - "type": "Identifier", - "value": "f", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 13, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 23, - 24, + 15, + 16, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 24, - 25, + 16, + 17, ], "type": "Punctuator", - "value": ")", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/generators/generator-declaration.src 1`] = ` +Object { + "body": Array [ Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "name": "v", + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + }, + "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", + }, + "expression": false, + "generator": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "test", + "range": Array [ + 10, + 14, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 0, + "line": 1, }, }, + "params": Array [], "range": Array [ - 26, - 27, + 0, + 30, ], - "type": "Punctuator", - "value": "{", + "type": "FunctionDeclaration", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 31, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 30, + "line": 1, }, }, "range": Array [ - 36, - 41, + 30, + 31, ], - "type": "Keyword", - "value": "const", + "type": "EmptyStatement", + }, + ], + "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": 15, - "line": 3, + "column": 8, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 42, - 43, + 0, + 8, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 3, + "column": 9, + "line": 1, }, "start": Object { - "column": 16, - "line": 3, + "column": 8, + "line": 1, }, }, "range": Array [ - 44, - 45, + 8, + 9, ], "type": "Punctuator", - "value": "=", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 18, - "line": 3, + "column": 10, + "line": 1, }, }, "range": Array [ - 46, - 51, + 10, + 14, ], - "type": "Keyword", - "value": "yield", + "type": "Identifier", + "value": "test", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 3, + "column": 16, + "line": 1, }, "start": Object { - "column": 23, - "line": 3, + "column": 15, + "line": 1, }, }, "range": Array [ - 51, - 52, + 15, + 16, ], "type": "Punctuator", - "value": "*", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 25, - "line": 3, + "column": 16, + "line": 1, }, }, "range": Array [ - 53, - 54, + 16, + 17, ], - "type": "Identifier", - "value": "g", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 3, + "column": 19, + "line": 1, }, "start": Object { - "column": 26, - "line": 3, + "column": 18, + "line": 1, }, }, "range": Array [ - 54, - 55, + 18, + 19, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 3, + "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": 3, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, }, }, "range": Array [ - 55, - 56, + 26, + 27, ], "type": "Punctuator", - "value": ")", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { - "column": 28, - "line": 3, + "column": 27, + "line": 1, }, }, "range": Array [ - 56, - 57, + 27, + 28, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "v", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 30, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 29, + "line": 1, }, }, "range": Array [ - 62, - 63, + 29, + 30, ], "type": "Punctuator", "value": "}", @@ -77405,27 +82757,27 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 31, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 30, + "line": 1, }, }, "range": Array [ - 64, - 65, + 30, + 31, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/generators/double-yield.src 1`] = ` +exports[`javascript fixtures/generators/yield-delegation.src 1`] = ` Object { "body": Array [ Object { @@ -77436,46 +82788,27 @@ Object { Object { "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, + "column": 24, "line": 1, }, "start": Object { - "column": 22, + "column": 23, "line": 1, }, }, + "name": "v", "range": Array [ - 22, - 30, + 23, + 24, ], - "type": "YieldExpression", + "type": "Identifier", }, - "delegate": false, + "delegate": true, "loc": Object { "end": Object { - "column": 30, + "column": 24, "line": 1, }, "start": Object { @@ -77485,13 +82818,13 @@ Object { }, "range": Array [ 16, - 30, + 24, ], "type": "YieldExpression", }, "loc": Object { "end": Object { - "column": 30, + "column": 24, "line": 1, }, "start": Object { @@ -77501,14 +82834,14 @@ Object { }, "range": Array [ 16, - 30, + 24, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 32, + "column": 26, "line": 1, }, "start": Object { @@ -77518,7 +82851,7 @@ Object { }, "range": Array [ 14, - 32, + 26, ], "type": "BlockStatement", }, @@ -77527,7 +82860,7 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 32, + "column": 26, "line": 1, }, "start": Object { @@ -77538,13 +82871,13 @@ Object { "params": Array [], "range": Array [ 1, - 32, + 26, ], "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 34, + "column": 28, "line": 1, }, "start": Object { @@ -77554,14 +82887,14 @@ Object { }, "range": Array [ 0, - 34, + 28, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 34, + "column": 28, "line": 1, }, "start": Object { @@ -77571,7 +82904,7 @@ Object { }, "range": Array [ 0, - 34, + 28, ], "sourceType": "script", "tokens": Array [ @@ -77704,7 +83037,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 27, + "column": 23, "line": 1, }, "start": Object { @@ -77714,43 +83047,43 @@ Object { }, "range": Array [ 22, - 27, + 23, ], - "type": "Keyword", - "value": "yield", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 24, "line": 1, }, "start": Object { - "column": 28, + "column": 23, "line": 1, }, }, "range": Array [ - 28, - 30, + 23, + 24, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "v", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 26, "line": 1, }, "start": Object { - "column": 31, + "column": 25, "line": 1, }, }, "range": Array [ - 31, - 32, + 25, + 26, ], "type": "Punctuator", "value": "}", @@ -77758,17 +83091,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 33, + "column": 27, "line": 1, }, "start": Object { - "column": 32, + "column": 26, "line": 1, }, }, "range": Array [ - 32, - 33, + 26, + 27, ], "type": "Punctuator", "value": ")", @@ -77776,17 +83109,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 34, + "column": 28, "line": 1, }, "start": Object { - "column": 33, + "column": 27, "line": 1, }, }, "range": Array [ - 33, - 34, + 27, + 28, ], "type": "Punctuator", "value": ";", @@ -77796,52 +83129,90 @@ Object { } `; -exports[`javascript fixtures/generators/empty-generator-declaration.src 1`] = ` +exports[`javascript fixtures/generators/yield-without-value.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, + "expression": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "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", }, - "range": Array [ - 14, - 16, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": true, - "id": Object { + "expression": false, + "generator": true, + "id": null, "loc": Object { "end": Object { - "column": 11, + "column": 24, "line": 1, }, "start": Object { - "column": 10, + "column": 1, "line": 1, }, }, - "name": "t", + "params": Array [], "range": Array [ - 10, - 11, + 1, + 24, ], - "type": "Identifier", + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 16, + "column": 26, "line": 1, }, "start": Object { @@ -77849,35 +83220,17 @@ Object { "line": 1, }, }, - "params": Array [], "range": Array [ 0, - 16, - ], - "type": "FunctionDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, + 26, ], - "type": "EmptyStatement", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -77886,14 +83239,14 @@ Object { }, "range": Array [ 0, - 17, + 27, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 1, "line": 1, }, "start": Object { @@ -77903,10 +83256,10 @@ Object { }, "range": Array [ 0, - 8, + 1, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -77915,34 +83268,34 @@ Object { "line": 1, }, "start": Object { - "column": 8, + "column": 1, "line": 1, }, }, "range": Array [ - 8, + 1, 9, ], - "type": "Punctuator", - "value": "*", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, "range": Array [ + 9, 10, - 11, ], - "type": "Identifier", - "value": "t", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { @@ -78001,17 +83354,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, + "column": 21, "line": 1, }, "start": Object { - "column": 15, + "column": 16, "line": 1, }, }, "range": Array [ - 15, 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": "}", @@ -78019,17 +83408,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, + "column": 25, "line": 1, }, "start": Object { - "column": 16, + "column": 24, "line": 1, }, }, "range": Array [ - 16, - 17, + 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": ";", @@ -78039,102 +83446,123 @@ Object { } `; -exports[`javascript fixtures/generators/generator-declaration.src 1`] = ` +exports[`javascript fixtures/generators/yield-without-value-in-call.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "argument": Object { + "expression": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "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 { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "fn", + "range": Array [ + 16, + 18, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 28, + "column": 25, "line": 1, }, "start": Object { - "column": 27, + "column": 16, "line": 1, }, }, - "name": "v", "range": Array [ - 27, - 28, + 16, + 25, ], - "type": "Identifier", + "type": "CallExpression", }, - "delegate": true, "loc": Object { "end": Object { - "column": 28, + "column": 26, "line": 1, }, "start": Object { - "column": 20, + "column": 16, "line": 1, }, }, "range": Array [ - 20, - 28, + 16, + 26, ], - "type": "YieldExpression", + "type": "ExpressionStatement", }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, }, - "range": Array [ - 20, - 28, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, }, + "range": Array [ + 14, + 28, + ], + "type": "BlockStatement", }, - "range": Array [ - 18, - 30, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": true, - "id": Object { + "expression": false, + "generator": true, + "id": null, "loc": Object { "end": Object { - "column": 14, + "column": 28, "line": 1, }, "start": Object { - "column": 10, + "column": 1, "line": 1, }, }, - "name": "test", + "params": Array [], "range": Array [ - 10, - 14, + 1, + 28, ], - "type": "Identifier", + "type": "FunctionExpression", }, "loc": Object { "end": Object { @@ -78146,35 +83574,17 @@ Object { "line": 1, }, }, - "params": Array [], "range": Array [ 0, 30, ], - "type": "FunctionDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "EmptyStatement", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -78190,7 +83600,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 1, "line": 1, }, "start": Object { @@ -78200,7 +83610,25 @@ Object { }, "range": Array [ 0, - 8, + 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", @@ -78208,92 +83636,128 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "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": 8, + "column": 12, "line": 1, }, }, "range": Array [ - 8, - 9, + 12, + 13, ], "type": "Punctuator", - "value": "*", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { - "column": 10, + "column": 14, "line": 1, }, }, "range": Array [ - 10, 14, + 15, ], - "type": "Identifier", - "value": "test", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { - "column": 15, + "column": 16, "line": 1, }, }, "range": Array [ - 15, 16, + 18, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "fn", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 19, "line": 1, }, "start": Object { - "column": 16, + "column": 18, "line": 1, }, }, "range": Array [ - 16, - 17, + 18, + 19, ], "type": "Punctuator", - "value": ")", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 24, "line": 1, }, "start": Object { - "column": 18, + "column": 19, "line": 1, }, }, "range": Array [ - 18, 19, + 24, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "yield", }, Object { "loc": Object { @@ -78302,34 +83766,34 @@ Object { "line": 1, }, "start": Object { - "column": 20, + "column": 24, "line": 1, }, }, "range": Array [ - 20, + 24, 25, ], - "type": "Keyword", - "value": "yield", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 26, "line": 1, }, "start": Object { - "column": 26, + "column": 25, "line": 1, }, }, "range": Array [ + 25, 26, - 27, ], "type": "Punctuator", - "value": "*", + "value": ";", }, Object { "loc": Object { @@ -78346,41 +83810,41 @@ Object { 27, 28, ], - "type": "Identifier", - "value": "v", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 29, "line": 1, }, "start": Object { - "column": 29, + "column": 28, "line": 1, }, }, "range": Array [ + 28, 29, - 30, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 30, "line": 1, }, "start": Object { - "column": 30, + "column": 29, "line": 1, }, }, "range": Array [ + 29, 30, - 31, ], "type": "Punctuator", "value": ";", @@ -78390,7 +83854,7 @@ Object { } `; -exports[`javascript fixtures/generators/yield-delegation.src 1`] = ` +exports[`javascript fixtures/generators/yield-without-value-no-semi.src 1`] = ` Object { "body": Array [ Object { @@ -78400,28 +83864,11 @@ Object { "body": Array [ Object { "expression": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "v", - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - }, - "delegate": true, + "argument": null, + "delegate": false, "loc": Object { "end": Object { - "column": 24, + "column": 21, "line": 1, }, "start": Object { @@ -78431,13 +83878,13 @@ Object { }, "range": Array [ 16, - 24, + 21, ], "type": "YieldExpression", }, "loc": Object { "end": Object { - "column": 24, + "column": 21, "line": 1, }, "start": Object { @@ -78447,14 +83894,14 @@ Object { }, "range": Array [ 16, - 24, + 21, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 26, + "column": 23, "line": 1, }, "start": Object { @@ -78464,7 +83911,7 @@ Object { }, "range": Array [ 14, - 26, + 23, ], "type": "BlockStatement", }, @@ -78473,7 +83920,7 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 26, + "column": 23, "line": 1, }, "start": Object { @@ -78484,13 +83931,13 @@ Object { "params": Array [], "range": Array [ 1, - 26, + 23, ], "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 28, + "column": 25, "line": 1, }, "start": Object { @@ -78500,15 +83947,15 @@ Object { }, "range": Array [ 0, - 28, + 25, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -78517,7 +83964,7 @@ Object { }, "range": Array [ 0, - 28, + 26, ], "sourceType": "script", "tokens": Array [ @@ -78663,7 +84110,7 @@ Object { 23, ], "type": "Punctuator", - "value": "*", + "value": "}", }, Object { "loc": Object { @@ -78680,59 +84127,23 @@ Object { 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, + "column": 25, "line": 1, }, "start": Object { - "column": 27, + "column": 24, "line": 1, }, }, "range": Array [ - 27, - 28, + 24, + 25, ], "type": "Punctuator", "value": ";", @@ -78742,90 +84153,31 @@ Object { } `; -exports[`javascript fixtures/generators/yield-without-value.src 1`] = ` +exports[`javascript fixtures/globalReturn/return-identifier.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "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", - }, - "expression": false, - "generator": true, - "id": null, + "argument": Object { "loc": Object { "end": Object { - "column": 24, + "column": 11, "line": 1, }, "start": Object { - "column": 1, + "column": 7, "line": 1, }, }, - "params": Array [], + "name": "fooz", "range": Array [ - 1, - 24, + 7, + 11, ], - "type": "FunctionExpression", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 26, + "column": 12, "line": 1, }, "start": Object { @@ -78835,9 +84187,9 @@ Object { }, "range": Array [ 0, - 26, + 12, ], - "type": "ExpressionStatement", + "type": "ReturnStatement", }, ], "loc": Object { @@ -78852,14 +84204,14 @@ Object { }, "range": Array [ 0, - 27, + 13, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 6, "line": 1, }, "start": Object { @@ -78869,46 +84221,28 @@ Object { }, "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, + 6, ], "type": "Keyword", - "value": "function", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, "range": Array [ - 9, - 10, + 7, + 11, ], - "type": "Punctuator", - "value": "*", + "type": "Identifier", + "value": "fooz", }, Object { "loc": Object { @@ -78926,130 +84260,198 @@ Object { 12, ], "type": "Punctuator", - "value": "(", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/globalReturn/return-no-arg.src 1`] = ` +Object { + "body": Array [ Object { + "argument": null, "loc": Object { "end": Object { - "column": 13, + "column": 7, "line": 1, }, "start": Object { - "column": 12, + "column": 0, "line": 1, }, }, "range": Array [ - 12, - 13, + 0, + 7, ], - "type": "Punctuator", - "value": ")", + "type": "ReturnStatement", + }, + ], + "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": 15, + "column": 6, "line": 1, }, "start": Object { - "column": 14, + "column": 0, "line": 1, }, }, "range": Array [ - 14, - 15, + 0, + 6, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 7, "line": 1, }, "start": Object { - "column": 16, + "column": 6, "line": 1, }, }, "range": Array [ - 16, - 21, + 6, + 7, ], - "type": "Keyword", - "value": "yield", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/globalReturn/return-true.src 1`] = ` +Object { + "body": Array [ Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 11, + ], + "raw": "true", + "type": "Literal", + "value": true, + }, "loc": Object { "end": Object { - "column": 22, + "column": 12, "line": 1, }, "start": Object { - "column": 21, + "column": 0, "line": 1, }, }, "range": Array [ - 21, - 22, + 0, + 12, ], - "type": "Punctuator", - "value": ";", + "type": "ReturnStatement", }, + ], + "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": 24, + "column": 6, "line": 1, }, "start": Object { - "column": 23, + "column": 0, "line": 1, }, }, "range": Array [ - 23, - 24, + 0, + 6, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 11, "line": 1, }, "start": Object { - "column": 24, + "column": 7, "line": 1, }, }, "range": Array [ - 24, - 25, + 7, + 11, ], - "type": "Punctuator", - "value": ")", + "type": "Boolean", + "value": "true", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 12, "line": 1, }, "start": Object { - "column": 25, + "column": 11, "line": 1, }, }, "range": Array [ - 25, - 26, + 11, + 12, ], "type": "Punctuator", "value": ";", @@ -79059,127 +84461,102 @@ Object { } `; -exports[`javascript fixtures/generators/yield-without-value-in-call.src 1`] = ` +exports[`javascript fixtures/importMeta/simple-import-meta.src 1`] = ` Object { "body": Array [ Object { "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "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 { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "fn", - "range": Array [ - 16, - 18, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 25, - ], - "type": "CallExpression", + "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 { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "import", + "range": Array [ + 0, + 6, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, }, - "range": Array [ - 16, - 26, - ], - "type": "ExpressionStatement", }, + "name": "meta", + "range": Array [ + 7, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 0, + 11, ], + "type": "MetaProperty", + }, + "property": Object { "loc": Object { "end": Object { - "column": 28, + "column": 15, "line": 1, }, "start": Object { - "column": 14, + "column": 12, "line": 1, }, }, + "name": "url", "range": Array [ - 14, - 28, + 12, + 15, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": true, - "id": null, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, + "type": "Identifier", }, - "params": Array [], "range": Array [ - 1, - 28, + 0, + 15, ], - "type": "FunctionExpression", + "type": "MemberExpression", }, "loc": Object { "end": Object { - "column": 30, + "column": 16, "line": 1, }, "start": Object { @@ -79189,7 +84566,7 @@ Object { }, "range": Array [ 0, - 30, + 16, ], "type": "ExpressionStatement", }, @@ -79206,14 +84583,14 @@ Object { }, "range": Array [ 0, - 31, + 17, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 6, "line": 1, }, "start": Object { @@ -79223,46 +84600,46 @@ Object { }, "range": Array [ 0, - 1, + 6, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { - "column": 1, + "column": 6, "line": 1, }, }, "range": Array [ - 1, - 9, + 6, + 7, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, "range": Array [ - 9, - 10, + 7, + 11, ], - "type": "Punctuator", - "value": "*", + "type": "Identifier", + "value": "meta", }, Object { "loc": Object { @@ -79280,12 +84657,12 @@ Object { 12, ], "type": "Punctuator", - "value": "(", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 1, }, "start": Object { @@ -79295,29 +84672,37 @@ Object { }, "range": Array [ 12, - 13, + 15, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "url", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 16, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, 15, + 16, ], "type": "Punctuator", - "value": "{", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/error-delete.src 1`] = ` +Object { + "body": Array [ Object { "loc": Object { "end": Object { @@ -79325,139 +84710,283 @@ Object { "line": 1, }, "start": Object { - "column": 16, + "column": 0, "line": 1, }, }, "range": Array [ - 16, + 0, 18, ], - "type": "Identifier", - "value": "fn", + "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 { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "range": Array [ + 7, + 8, + ], + "type": "ImportDefaultSpecifier", + }, + ], + "type": "ImportDeclaration", }, Object { + "expression": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "name": "x", + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + }, + "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": 19, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 18, 19, + 28, ], - "type": "Punctuator", - "value": "(", + "type": "ExpressionStatement", + }, + ], + "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": 24, + "column": 6, "line": 1, }, "start": Object { - "column": 19, + "column": 0, "line": 1, }, }, "range": Array [ - 19, - 24, + 0, + 6, ], "type": "Keyword", - "value": "yield", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 8, "line": 1, }, "start": Object { - "column": 24, + "column": 7, "line": 1, }, }, "range": Array [ - 24, - 25, + 7, + 8, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 13, "line": 1, }, "start": Object { - "column": 25, + "column": 9, "line": 1, }, }, "range": Array [ - 25, - 26, + 9, + 13, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 17, "line": 1, }, "start": Object { - "column": 27, + "column": 14, "line": 1, }, }, "range": Array [ - 27, - 28, + 14, + 17, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"x\\"", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 18, "line": 1, }, "start": Object { - "column": 28, + "column": 17, "line": 1, }, }, "range": Array [ - 28, - 29, + 17, + 18, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 6, + "line": 2, }, "start": Object { - "column": 29, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 29, - 30, + 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": ";", @@ -79467,108 +84996,107 @@ Object { } `; -exports[`javascript fixtures/generators/yield-without-value-no-semi.src 1`] = ` +exports[`javascript fixtures/modules/error-function.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "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", - }, + "async": false, + "body": Object { + "body": Array [ + Object { + "declaration": Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { "column": 16, - "line": 1, + "line": 2, }, }, + "name": "friends", "range": Array [ - 16, - 21, + 31, + 38, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, + "type": "Identifier", }, - "start": Object { - "column": 14, - "line": 1, + "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 [ - 14, - 23, - ], - "type": "BlockStatement", }, - "expression": false, - "generator": true, - "id": null, + "range": Array [ + 13, + 41, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { "loc": Object { "end": Object { - "column": 23, + "column": 10, "line": 1, }, "start": Object { - "column": 1, + "column": 9, "line": 1, }, }, - "params": Array [], + "name": "x", "range": Array [ - 1, - 23, + 9, + 10, ], - "type": "FunctionExpression", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, "line": 1, }, }, + "params": Array [], "range": Array [ 0, - 25, + 41, ], - "type": "ExpressionStatement", + "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 5, }, "start": Object { "column": 0, @@ -79577,14 +85105,14 @@ Object { }, "range": Array [ 0, - 26, + 43, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 8, "line": 1, }, "start": Object { @@ -79594,46 +85122,46 @@ Object { }, "range": Array [ 0, - 1, + 8, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 10, "line": 1, }, "start": Object { - "column": 1, + "column": 9, "line": 1, }, }, "range": Array [ - 1, 9, + 10, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { - "column": 9, + "column": 10, "line": 1, }, }, "range": Array [ - 9, 10, + 11, ], "type": "Punctuator", - "value": "*", + "value": "(", }, Object { "loc": Object { @@ -79651,164 +85179,364 @@ Object { 12, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 1, }, "start": Object { - "column": 12, + "column": 13, "line": 1, }, }, "range": Array [ - 12, 13, + 14, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 1, + "line": 2, }, }, "range": Array [ - 14, - 15, + 16, + 22, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 16, - 21, + 23, + 30, ], "type": "Keyword", - "value": "yield", + "value": "default", }, Object { "loc": Object { "end": Object { "column": 23, - "line": 1, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 22, - 23, + 31, + 38, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "friends", }, Object { "loc": Object { "end": Object { "column": 24, - "line": 1, + "line": 2, }, "start": Object { "column": 23, - "line": 1, + "line": 2, }, }, "range": Array [ - 23, - 24, + 38, + 39, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 24, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 24, - 25, + 40, + 41, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/globalReturn/return-identifier.src 1`] = ` +exports[`javascript fixtures/modules/error-strict.src 1`] = ` Object { "body": Array [ Object { - "argument": Object { + "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": 11, + "column": 25, "line": 1, }, "start": Object { - "column": 7, + "column": 18, "line": 1, }, }, - "name": "fooz", "range": Array [ - 7, - 11, + 18, + 25, ], - "type": "Identifier", + "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 { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "house", + "range": Array [ + 7, + 12, + ], + "type": "Identifier", + }, + "range": Array [ + 7, + 12, + ], + "type": "ImportDefaultSpecifier", + }, + ], + "type": "ImportDeclaration", + }, + Object { + "body": Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 4, + }, + }, + "name": "roof", + "range": Array [ + 56, + 60, + ], + "type": "Identifier", + }, + ], + "callee": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 12, + "line": 4, + }, + "start": Object { + "column": 1, + "line": 4, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 1, + "line": 4, + }, + }, + "name": "console", + "range": Array [ + 44, + 51, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "name": "log", + "range": Array [ + 52, + 55, + ], + "type": "Identifier", + }, + "range": Array [ + 44, + 55, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 4, + }, + "start": Object { + "column": 1, + "line": 4, + }, + }, + "range": Array [ + 44, + 61, + ], + "type": "CallExpression", + }, + "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": 12, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { "column": 0, - "line": 1, + "line": 3, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, }, + "name": "house", + "range": Array [ + 34, + 39, + ], + "type": "Identifier", }, "range": Array [ - 0, - 12, + 28, + 64, ], - "type": "ReturnStatement", + "type": "WithStatement", }, ], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 6, }, "start": Object { "column": 0, @@ -79817,9 +85545,9 @@ Object { }, "range": Array [ 0, - 13, + 65, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { @@ -79837,12 +85565,12 @@ Object { 6, ], "type": "Keyword", - "value": "return", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 12, "line": 1, }, "start": Object { @@ -79852,324 +85580,329 @@ Object { }, "range": Array [ 7, - 11, + 12, ], "type": "Identifier", - "value": "fooz", + "value": "house", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 17, "line": 1, }, "start": Object { - "column": 11, + "column": 13, "line": 1, }, }, "range": Array [ - 11, - 12, + 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": ";", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/globalReturn/return-no-arg.src 1`] = ` -Object { - "body": Array [ Object { - "argument": null, "loc": Object { "end": Object { - "column": 7, - "line": 1, + "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": 0, - "line": 1, + "column": 8, + "line": 4, }, }, "range": Array [ - 0, - 7, + 51, + 52, ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ".", }, - }, - "range": Array [ - 0, - 8, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 12, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 9, + "line": 4, }, }, "range": Array [ - 0, - 6, + 52, + 55, ], - "type": "Keyword", - "value": "return", + "type": "Identifier", + "value": "log", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 13, + "line": 4, }, "start": Object { - "column": 6, - "line": 1, + "column": 12, + "line": 4, }, }, "range": Array [ - 6, - 7, + 55, + 56, ], "type": "Punctuator", - "value": ";", + "value": "(", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/globalReturn/return-true.src 1`] = ` -Object { - "body": Array [ Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "raw": "true", - "type": "Literal", - "value": true, - }, "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 17, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 13, + "line": 4, }, }, "range": Array [ - 0, - 12, + 56, + 60, ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "roof", }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 18, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 17, + "line": 4, }, }, "range": Array [ - 0, - 6, + 60, + 61, ], - "type": "Keyword", - "value": "return", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 19, + "line": 4, }, "start": Object { - "column": 7, - "line": 1, + "column": 18, + "line": 4, }, }, "range": Array [ - 7, - 11, + 61, + 62, ], - "type": "Boolean", - "value": "true", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 11, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 11, - 12, + 63, + 64, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/importMeta/simple-import-meta.src 1`] = ` +exports[`javascript fixtures/modules/export-default-array.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "computed": false, + "declaration": Object { + "elements": Array [], "loc": Object { "end": Object { - "column": 15, + "column": 17, "line": 1, }, "start": Object { - "column": 0, + "column": 15, "line": 1, }, }, - "object": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "meta": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "import", - "range": Array [ - 0, - 6, - ], - "type": "Identifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "meta", - "range": Array [ - 7, - 11, - ], - "type": "Identifier", - }, - "range": Array [ - 0, - 11, - ], - "type": "MetaProperty", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "url", - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - }, "range": Array [ - 0, 15, + 17, ], - "type": "MemberExpression", + "type": "ArrayExpression", }, "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { @@ -80179,9 +85912,9 @@ Object { }, "range": Array [ 0, - 16, + 18, ], - "type": "ExpressionStatement", + "type": "ExportDefaultDeclaration", }, ], "loc": Object { @@ -80196,7 +85929,7 @@ Object { }, "range": Array [ 0, - 17, + 19, ], "sourceType": "module", "tokens": Array [ @@ -80216,30 +85949,12 @@ Object { 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": ".", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 14, "line": 1, }, "start": Object { @@ -80249,61 +85964,61 @@ Object { }, "range": Array [ 7, - 11, + 14, ], - "type": "Identifier", - "value": "meta", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 16, "line": 1, }, "start": Object { - "column": 11, + "column": 15, "line": 1, }, }, "range": Array [ - 11, - 12, + 15, + 16, ], "type": "Punctuator", - "value": ".", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 17, "line": 1, }, "start": Object { - "column": 12, + "column": 16, "line": 1, }, }, "range": Array [ - 12, - 15, + 16, + 17, ], - "type": "Identifier", - "value": "url", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { - "column": 15, + "column": 17, "line": 1, }, }, "range": Array [ - 15, - 16, + 17, + 18, ], "type": "Punctuator", "value": ";", @@ -80313,141 +86028,68 @@ Object { } `; -exports[`javascript fixtures/modules/error-delete.src 1`] = ` +exports[`javascript fixtures/modules/export-default-class.src 1`] = ` Object { "body": Array [ Object { - "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 { + "declaration": Object { + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 7, + "column": 21, "line": 1, }, }, - "local": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, - "range": Array [ - 7, - 8, - ], - "type": "ImportDefaultSpecifier", - }, - ], - "type": "ImportDeclaration", - }, - Object { - "expression": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "name": "x", "range": Array [ - 26, - 27, + 21, + 25, ], - "type": "Identifier", + "type": "ClassBody", }, + "id": null, "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { - "column": 0, - "line": 2, + "column": 15, + "line": 1, }, }, - "operator": "delete", - "prefix": true, "range": Array [ - 19, - 27, + 15, + 25, ], - "type": "UnaryExpression", + "superClass": null, + "type": "ClassDeclaration", }, "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 19, - 28, + 0, + 25, ], - "type": "ExpressionStatement", + "type": "ExportDefaultDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 4, }, "start": Object { "column": 0, @@ -80456,7 +86098,7 @@ Object { }, "range": Array [ 0, - 29, + 26, ], "sourceType": "module", "tokens": Array [ @@ -80476,12 +86118,12 @@ Object { 6, ], "type": "Keyword", - "value": "import", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 14, "line": 1, }, "start": Object { @@ -80491,225 +86133,151 @@ Object { }, "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": ";", + ], + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 19, - 25, + 15, + 20, ], "type": "Keyword", - "value": "delete", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 26, - 27, + 21, + 22, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { - "column": 8, - "line": 2, + "column": 0, + "line": 3, }, }, "range": Array [ - 27, - 28, + 24, + 25, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/error-function.src 1`] = ` +exports[`javascript fixtures/modules/export-default-expression.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "declaration": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "friends", - "range": Array [ - 31, - 38, - ], - "type": "Identifier", + "declaration": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, + "start": Object { + "column": 16, + "line": 1, }, - "range": Array [ - 16, - 39, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 1, }, + "range": Array [ + 16, + 17, + ], + "raw": "1", + "type": "Literal", + "value": 1, }, - "range": Array [ - 13, - 41, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { "loc": Object { "end": Object { - "column": 10, + "column": 21, "line": 1, }, "start": Object { - "column": 9, + "column": 16, "line": 1, }, }, - "name": "x", + "operator": "+", "range": Array [ - 9, - 10, + 16, + 21, ], - "type": "Identifier", + "right": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + "type": "BinaryExpression", }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 23, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [], "range": Array [ 0, - 41, + 23, ], - "type": "FunctionDeclaration", + "type": "ExportDefaultDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 2, }, "start": Object { "column": 0, @@ -80718,14 +86286,14 @@ Object { }, "range": Array [ 0, - 43, + 24, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 6, "line": 1, }, "start": Object { @@ -80735,43 +86303,43 @@ Object { }, "range": Array [ 0, - 8, + 6, ], "type": "Keyword", - "value": "function", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 14, "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, "range": Array [ - 9, - 10, + 7, + 14, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 16, "line": 1, }, "start": Object { - "column": 10, + "column": 15, "line": 1, }, }, "range": Array [ - 10, - 11, + 15, + 16, ], "type": "Punctuator", "value": "(", @@ -80779,377 +86347,163 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 17, "line": 1, }, "start": Object { - "column": 11, + "column": 16, "line": 1, }, }, "range": Array [ - 11, - 12, + 16, + 17, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 19, "line": 1, }, "start": Object { - "column": 13, + "column": 18, "line": 1, }, }, "range": Array [ - 13, - 14, + 18, + 19, ], "type": "Punctuator", - "value": "{", + "value": "+", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 1, - "line": 2, + "column": 20, + "line": 1, }, }, "range": Array [ - 16, - 22, + 20, + 21, ], - "type": "Keyword", - "value": "export", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 23, - 30, + 21, + 22, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": ")", }, 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, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 38, - 39, + 22, + 23, ], "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", } `; -exports[`javascript fixtures/modules/error-strict.src 1`] = ` +exports[`javascript fixtures/modules/export-default-function.src 1`] = ` Object { "body": Array [ Object { - "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 { + "declaration": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 12, + "column": 29, "line": 1, }, "start": Object { - "column": 7, + "column": 27, "line": 1, }, }, - "local": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "house", - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - }, "range": Array [ - 7, - 12, + 27, + 29, ], - "type": "ImportDefaultSpecifier", + "type": "BlockStatement", }, - ], - "type": "ImportDeclaration", - }, - Object { - "body": Object { - "body": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "name": "roof", - "range": Array [ - 56, - 60, - ], - "type": "Identifier", - }, - ], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "name": "console", - "range": Array [ - 44, - 51, - ], - "type": "Identifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 9, - "line": 4, - }, - }, - "name": "log", - "range": Array [ - 52, - 55, - ], - "type": "Identifier", - }, - "range": Array [ - 44, - 55, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 44, - 61, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 44, - 62, - ], - "type": "ExpressionStatement", - }, - ], + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 29, + "line": 1, }, "start": Object { - "column": 13, - "line": 3, + "column": 15, + "line": 1, }, }, + "params": Array [], "range": Array [ - 41, - 64, + 15, + 29, ], - "type": "BlockStatement", + "type": "FunctionDeclaration", }, "loc": Object { "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 3, + "column": 29, + "line": 1, }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, + "start": Object { + "column": 0, + "line": 1, }, - "name": "house", - "range": Array [ - 34, - 39, - ], - "type": "Identifier", }, "range": Array [ - 28, - 64, + 0, + 29, ], - "type": "WithStatement", + "type": "ExportDefaultDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 2, }, "start": Object { "column": 0, @@ -81158,7 +86512,7 @@ Object { }, "range": Array [ 0, - 65, + 30, ], "sourceType": "module", "tokens": Array [ @@ -81178,12 +86532,12 @@ Object { 6, ], "type": "Keyword", - "value": "import", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { @@ -81193,28 +86547,28 @@ Object { }, "range": Array [ 7, - 12, + 14, ], - "type": "Identifier", - "value": "house", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 23, "line": 1, }, "start": Object { - "column": 13, + "column": 15, "line": 1, }, }, "range": Array [ - 13, - 17, + 15, + 23, ], - "type": "Identifier", - "value": "from", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { @@ -81223,16 +86577,16 @@ Object { "line": 1, }, "start": Object { - "column": 18, + "column": 24, "line": 1, }, }, "range": Array [ - 18, + 24, 25, ], - "type": "String", - "value": "\\"house\\"", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -81250,238 +86604,244 @@ Object { 26, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 27, + "line": 1, }, }, "range": Array [ + 27, 28, - 32, ], - "type": "Keyword", - "value": "with", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 3, + "column": 29, + "line": 1, }, "start": Object { - "column": 5, - "line": 3, + "column": 28, + "line": 1, }, }, "range": Array [ - 33, - 34, + 28, + 29, ], "type": "Punctuator", - "value": "(", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-default-named-class.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, + "declaration": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 30, + ], + "type": "ClassBody", }, - }, - "range": Array [ - 34, - 39, - ], - "type": "Identifier", - "value": "house", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, + "id": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "Test", + "range": Array [ + 21, + 25, + ], + "type": "Identifier", }, - "start": Object { - "column": 11, - "line": 3, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 1, + }, }, + "range": Array [ + 15, + 30, + ], + "superClass": null, + "type": "ClassDeclaration", }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ")", - }, - Object { "loc": Object { "end": Object { - "column": 14, + "column": 1, "line": 3, }, "start": Object { - "column": 13, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 41, - 42, + 0, + 30, ], - "type": "Punctuator", - "value": "{", + "type": "ExportDefaultDeclaration", }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "range": Array [ - 44, - 51, - ], - "type": "Identifier", - "value": "console", + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ".", + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 31, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, - "line": 4, + "column": 6, + "line": 1, }, "start": Object { - "column": 9, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 52, - 55, + 0, + 6, ], - "type": "Identifier", - "value": "log", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 14, + "line": 1, }, "start": Object { - "column": 12, - "line": 4, + "column": 7, + "line": 1, }, }, "range": Array [ - 55, - 56, + 7, + 14, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 4, + "column": 20, + "line": 1, }, "start": Object { - "column": 13, - "line": 4, + "column": 15, + "line": 1, }, }, "range": Array [ - 56, - 60, + 15, + 20, ], - "type": "Identifier", - "value": "roof", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 4, + "column": 25, + "line": 1, }, "start": Object { - "column": 17, - "line": 4, + "column": 21, + "line": 1, }, }, "range": Array [ - 60, - 61, + 21, + 25, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "Test", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 4, + "column": 27, + "line": 1, }, "start": Object { - "column": 18, - "line": 4, + "column": 26, + "line": 1, }, }, "range": Array [ - 61, - 62, + 26, + 27, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 3, }, "start": Object { "column": 0, - "line": 5, + "line": 3, }, }, "range": Array [ - 63, - 64, + 29, + 30, ], "type": "Punctuator", "value": "}", @@ -81491,15 +86851,53 @@ Object { } `; -exports[`javascript fixtures/modules/export-default-array.src 1`] = ` +exports[`javascript fixtures/modules/export-default-named-function.src 1`] = ` Object { "body": Array [ Object { "declaration": Object { - "elements": Array [], + "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", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 24, + 27, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 17, + "column": 32, "line": 1, }, "start": Object { @@ -81507,15 +86905,16 @@ Object { "line": 1, }, }, + "params": Array [], "range": Array [ 15, - 17, + 32, ], - "type": "ArrayExpression", + "type": "FunctionDeclaration", }, "loc": Object { "end": Object { - "column": 18, + "column": 32, "line": 1, }, "start": Object { @@ -81525,7 +86924,7 @@ Object { }, "range": Array [ 0, - 18, + 32, ], "type": "ExportDefaultDeclaration", }, @@ -81542,7 +86941,7 @@ Object { }, "range": Array [ 0, - 19, + 33, ], "sourceType": "module", "tokens": Array [ @@ -81585,7 +86984,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, + "column": 23, "line": 1, }, "start": Object { @@ -81595,80 +86994,115 @@ Object { }, "range": Array [ 15, - 16, + 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": "[", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 29, "line": 1, }, "start": Object { - "column": 16, + "column": 28, "line": 1, }, }, "range": Array [ - 16, - 17, + 28, + 29, ], "type": "Punctuator", - "value": "]", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 31, "line": 1, }, "start": Object { - "column": 17, + "column": 30, "line": 1, }, }, "range": Array [ - 17, - 18, + 30, + 31, ], "type": "Punctuator", - "value": ";", + "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", } `; -exports[`javascript fixtures/modules/export-default-class.src 1`] = ` +exports[`javascript fixtures/modules/export-default-number.src 1`] = ` Object { "body": Array [ Object { "declaration": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 25, - ], - "type": "ClassBody", - }, - "id": null, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { "column": 15, @@ -81677,15 +87111,16 @@ Object { }, "range": Array [ 15, - 25, + 17, ], - "superClass": null, - "type": "ClassDeclaration", + "raw": "42", + "type": "Literal", + "value": 42, }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 18, + "line": 1, }, "start": Object { "column": 0, @@ -81694,7 +87129,7 @@ Object { }, "range": Array [ 0, - 25, + 18, ], "type": "ExportDefaultDeclaration", }, @@ -81702,7 +87137,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -81711,7 +87146,7 @@ Object { }, "range": Array [ 0, - 26, + 19, ], "sourceType": "module", "tokens": Array [ @@ -81749,130 +87184,133 @@ Object { 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", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 17, "line": 1, }, "start": Object { - "column": 21, + "column": 15, "line": 1, }, }, "range": Array [ - 21, - 22, + 15, + 17, ], - "type": "Punctuator", - "value": "{", + "type": "Numeric", + "value": "42", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 18, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 17, + "line": 1, }, }, "range": Array [ - 24, - 25, + 17, + 18, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/export-default-expression.src 1`] = ` +exports[`javascript fixtures/modules/export-default-object.src 1`] = ` Object { "body": Array [ Object { "declaration": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, "loc": Object { "end": Object { - "column": 21, + "column": 25, "line": 1, }, "start": Object { - "column": 16, + "column": 15, "line": 1, }, }, - "operator": "+", - "range": Array [ - 16, - 21, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 17, + 20, + ], + "type": "Identifier", }, - "start": Object { - "column": 20, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "method": 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 [ - 20, - 21, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "type": "BinaryExpression", + ], + "range": Array [ + 15, + 25, + ], + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 23, + "column": 26, "line": 1, }, "start": Object { @@ -81882,7 +87320,7 @@ Object { }, "range": Array [ 0, - 23, + 26, ], "type": "ExportDefaultDeclaration", }, @@ -81899,7 +87337,7 @@ Object { }, "range": Array [ 0, - 24, + 27, ], "sourceType": "module", "tokens": Array [ @@ -81955,94 +87393,94 @@ Object { 16, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 20, "line": 1, }, "start": Object { - "column": 16, + "column": 17, "line": 1, }, }, "range": Array [ - 16, 17, + 20, ], - "type": "Numeric", - "value": "1", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 21, "line": 1, }, "start": Object { - "column": 18, + "column": 20, "line": 1, }, }, "range": Array [ - 18, - 19, + 20, + 21, ], "type": "Punctuator", - "value": "+", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 23, "line": 1, }, "start": Object { - "column": 20, + "column": 22, "line": 1, }, }, "range": Array [ - 20, - 21, + 22, + 23, ], "type": "Numeric", - "value": "2", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 25, "line": 1, }, "start": Object { - "column": 21, + "column": 24, "line": 1, }, }, "range": Array [ - 21, - 22, + 24, + 25, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 26, "line": 1, }, "start": Object { - "column": 22, + "column": 25, "line": 1, }, }, "range": Array [ - 22, - 23, + 25, + 26, ], "type": "Punctuator", "value": ";", @@ -82052,36 +87490,14 @@ Object { } `; -exports[`javascript fixtures/modules/export-default-function.src 1`] = ` +exports[`javascript fixtures/modules/export-default-value.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", - }, - "expression": false, - "generator": false, - "id": null, "loc": Object { "end": Object { - "column": 29, + "column": 18, "line": 1, }, "start": Object { @@ -82089,16 +87505,16 @@ Object { "line": 1, }, }, - "params": Array [], + "name": "foo", "range": Array [ 15, - 29, + 18, ], - "type": "FunctionDeclaration", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 29, + "column": 19, "line": 1, }, "start": Object { @@ -82108,7 +87524,7 @@ Object { }, "range": Array [ 0, - 29, + 19, ], "type": "ExportDefaultDeclaration", }, @@ -82125,7 +87541,7 @@ Object { }, "range": Array [ 0, - 30, + 20, ], "sourceType": "module", "tokens": Array [ @@ -82168,7 +87584,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, + "column": 18, "line": 1, }, "start": Object { @@ -82178,167 +87594,78 @@ Object { }, "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, + 18, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 19, "line": 1, }, "start": Object { - "column": 27, + "column": 18, "line": 1, }, }, "range": Array [ - 27, - 28, + 18, + 19, ], "type": "Punctuator", - "value": "{", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-from-batch.src 1`] = ` +Object { + "body": Array [ Object { "loc": Object { "end": Object { - "column": 29, + "column": 20, "line": 1, }, "start": Object { - "column": 28, + "column": 0, "line": 1, }, }, "range": Array [ - 28, - 29, + 0, + 20, ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/modules/export-default-named-class.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 30, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "Test", - "range": Array [ - 21, - 25, - ], - "type": "Identifier", - }, + "source": Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 19, + "line": 1, }, "start": Object { - "column": 15, + "column": 14, "line": 1, }, }, "range": Array [ - 15, - 30, + 14, + 19, ], - "superClass": null, - "type": "ClassDeclaration", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", }, - "range": Array [ - 0, - 30, - ], - "type": "ExportDefaultDeclaration", + "type": "ExportAllDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -82347,7 +87674,7 @@ Object { }, "range": Array [ 0, - 31, + 21, ], "sourceType": "module", "tokens": Array [ @@ -82372,7 +87699,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -82382,164 +87709,164 @@ Object { }, "range": Array [ 7, - 14, + 8, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 13, "line": 1, }, "start": Object { - "column": 15, + "column": 9, "line": 1, }, }, "range": Array [ - 15, - 20, + 9, + 13, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 19, "line": 1, }, "start": Object { - "column": 21, + "column": 14, "line": 1, }, }, "range": Array [ - 21, - 25, + 14, + 19, ], - "type": "Identifier", - "value": "Test", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 20, "line": 1, }, "start": Object { - "column": 26, + "column": 19, "line": 1, }, }, "range": Array [ - 26, - 27, + 19, + 20, ], "type": "Punctuator", - "value": "{", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-from-default.src 1`] = ` +Object { + "body": Array [ Object { + "declaration": null, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { "column": 0, - "line": 3, + "line": 1, }, }, "range": Array [ - 29, - 30, + 0, + 28, ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/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, - }, + "source": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, }, - "range": Array [ - 30, - 32, - ], - "type": "BlockStatement", }, - "expression": false, - "generator": false, - "id": Object { + "range": Array [ + 22, + 27, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, + "specifiers": Array [ + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "default", + "range": Array [ + 8, + 15, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 27, + "column": 15, "line": 1, }, "start": Object { - "column": 24, + "column": 8, "line": 1, }, }, - "name": "foo", + "local": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "default", + "range": Array [ + 8, + 15, + ], + "type": "Identifier", + }, "range": Array [ - 24, - 27, + 8, + 15, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 15, - 32, - ], - "type": "FunctionDeclaration", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "ExportSpecifier", }, - }, - "range": Array [ - 0, - 32, ], - "type": "ExportDefaultDeclaration", + "type": "ExportNamedDeclaration", }, ], "loc": Object { @@ -82554,7 +87881,7 @@ Object { }, "range": Array [ 0, - 33, + 29, ], "sourceType": "module", "tokens": Array [ @@ -82579,7 +87906,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -82589,162 +87916,200 @@ Object { }, "range": Array [ 7, - 14, + 8, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 15, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, "range": Array [ + 8, 15, - 23, ], "type": "Keyword", - "value": "function", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 16, "line": 1, }, "start": Object { - "column": 24, + "column": 15, "line": 1, }, }, "range": Array [ - 24, - 27, + 15, + 16, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 21, "line": 1, }, "start": Object { - "column": 27, + "column": 17, "line": 1, }, }, "range": Array [ - 27, - 28, + 17, + 21, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 27, "line": 1, }, "start": Object { - "column": 28, + "column": 22, "line": 1, }, }, "range": Array [ - 28, - 29, + 22, + 27, ], - "type": "Punctuator", - "value": ")", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 28, "line": 1, }, "start": Object { - "column": 30, + "column": 27, "line": 1, }, }, "range": Array [ - 30, - 31, + 27, + 28, ], "type": "Punctuator", - "value": "{", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-from-named-as-default.src 1`] = ` +Object { + "body": Array [ Object { + "declaration": null, "loc": Object { "end": Object { - "column": 32, + "column": 35, "line": 1, }, "start": Object { - "column": 31, + "column": 0, "line": 1, }, }, "range": Array [ - 31, - 32, + 0, + 35, ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/modules/export-default-number.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { + "source": Object { "loc": Object { "end": Object { - "column": 17, + "column": 34, "line": 1, }, "start": Object { - "column": 15, + "column": 29, "line": 1, }, }, "range": Array [ - 15, - 17, + 29, + 34, ], - "raw": "42", + "raw": "\\"foo\\"", "type": "Literal", - "value": 42, + "value": "foo", }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "specifiers": Array [ + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "default", + "range": Array [ + 15, + 22, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 8, + 22, + ], + "type": "ExportSpecifier", }, - }, - "range": Array [ - 0, - 18, ], - "type": "ExportDefaultDeclaration", + "type": "ExportNamedDeclaration", }, ], "loc": Object { @@ -82759,7 +88124,7 @@ Object { }, "range": Array [ 0, - 19, + 36, ], "sourceType": "module", "tokens": Array [ @@ -82784,7 +88149,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -82794,15 +88159,51 @@ Object { }, "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": "Keyword", - "value": "default", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 22, "line": 1, }, "start": Object { @@ -82812,25 +88213,79 @@ Object { }, "range": Array [ 15, - 17, + 22, ], - "type": "Numeric", - "value": "42", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 23, "line": 1, }, "start": Object { - "column": 17, + "column": 22, "line": 1, }, }, "range": Array [ - 17, - 18, + 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": ";", @@ -82840,102 +88295,100 @@ Object { } `; -exports[`javascript fixtures/modules/export-default-object.src 1`] = ` +exports[`javascript fixtures/modules/export-from-named-as-specifier.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { + "declaration": null, + "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": 25, + "column": 30, "line": 1, }, "start": Object { - "column": 15, + "column": 25, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - }, - "kind": "init", + "range": Array [ + 25, + 30, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, + "specifiers": Array [ + Object { + "exported": Object { "loc": Object { "end": Object { - "column": 23, + "column": 18, "line": 1, }, "start": Object { - "column": 17, + "column": 15, "line": 1, }, }, - "method": false, + "name": "bar", "range": Array [ - 17, - 23, + 15, + 18, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, }, - "range": Array [ - 22, - 23, - ], - "raw": "1", - "type": "Literal", - "value": 1, }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", }, - ], - "range": Array [ - 15, - 25, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "range": Array [ + 8, + 18, + ], + "type": "ExportSpecifier", }, - }, - "range": Array [ - 0, - 26, ], - "type": "ExportDefaultDeclaration", + "type": "ExportNamedDeclaration", }, ], "loc": Object { @@ -82950,7 +88403,7 @@ Object { }, "range": Array [ 0, - 27, + 32, ], "sourceType": "module", "tokens": Array [ @@ -82966,134 +88419,152 @@ Object { }, }, "range": Array [ - 0, - 6, + 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": "Keyword", - "value": "export", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 11, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "range": Array [ - 7, - 14, + 8, + 11, ], - "type": "Keyword", - "value": "default", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 14, "line": 1, }, "start": Object { - "column": 15, + "column": 12, "line": 1, }, }, "range": Array [ - 15, - 16, + 12, + 14, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 18, "line": 1, }, "start": Object { - "column": 17, + "column": 15, "line": 1, }, }, "range": Array [ - 17, - 20, + 15, + 18, ], "type": "Identifier", - "value": "foo", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 19, "line": 1, }, "start": Object { - "column": 20, + "column": 18, "line": 1, }, }, "range": Array [ - 20, - 21, + 18, + 19, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 24, "line": 1, }, "start": Object { - "column": 22, + "column": 20, "line": 1, }, }, "range": Array [ - 22, - 23, + 20, + 24, ], - "type": "Numeric", - "value": "1", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 30, "line": 1, }, "start": Object { - "column": 24, + "column": 25, "line": 1, }, }, "range": Array [ - 24, 25, + 30, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 31, "line": 1, }, "start": Object { - "column": 25, + "column": 30, "line": 1, }, }, "range": Array [ - 25, - 26, + 30, + 31, ], "type": "Punctuator", "value": ";", @@ -83103,43 +88574,153 @@ Object { } `; -exports[`javascript fixtures/modules/export-default-value.src 1`] = ` +exports[`javascript fixtures/modules/export-from-named-as-specifiers.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { + "declaration": null, + "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": 18, + "column": 39, "line": 1, }, "start": Object { - "column": 15, + "column": 34, "line": 1, }, }, - "name": "foo", "range": Array [ - 15, - 18, + 34, + 39, ], - "type": "Identifier", + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, + "specifiers": Array [ + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "default", + "range": Array [ + 15, + 22, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 8, + 22, + ], + "type": "ExportSpecifier", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 24, + 27, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 24, + 27, + ], + "type": "Identifier", + }, + "range": Array [ + 24, + 27, + ], + "type": "ExportSpecifier", }, - }, - "range": Array [ - 0, - 19, ], - "type": "ExportDefaultDeclaration", + "type": "ExportNamedDeclaration", }, ], "loc": Object { @@ -83154,7 +88735,7 @@ Object { }, "range": Array [ 0, - 20, + 41, ], "sourceType": "module", "tokens": Array [ @@ -83179,7 +88760,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -83189,25 +88770,25 @@ Object { }, "range": Array [ 7, - 14, + 8, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, "range": Array [ - 15, - 18, + 8, + 11, ], "type": "Identifier", "value": "foo", @@ -83215,132 +88796,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 14, "line": 1, }, "start": Object { - "column": 18, + "column": 12, "line": 1, }, }, "range": Array [ - 18, - 19, + 12, + 14, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "as", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/modules/export-from-batch.src 1`] = ` -Object { - "body": Array [ Object { "loc": Object { "end": Object { - "column": 20, + "column": 22, "line": 1, }, "start": Object { - "column": 0, + "column": 15, "line": 1, }, }, "range": Array [ - 0, - 20, + 15, + 22, ], - "source": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, + "type": "Keyword", + "value": "default", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, }, - "range": Array [ - 14, - 19, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", }, - "type": "ExportAllDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ",", }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 27, "line": 1, }, "start": Object { - "column": 0, + "column": 24, "line": 1, }, }, "range": Array [ - 0, - 6, + 24, + 27, ], - "type": "Keyword", - "value": "export", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 28, "line": 1, }, "start": Object { - "column": 7, + "column": 27, "line": 1, }, }, "range": Array [ - 7, - 8, + 27, + 28, ], "type": "Punctuator", - "value": "*", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 33, "line": 1, }, "start": Object { - "column": 9, + "column": 29, "line": 1, }, }, "range": Array [ - 9, - 13, + 29, + 33, ], "type": "Identifier", "value": "from", @@ -83348,17 +88904,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 39, "line": 1, }, "start": Object { - "column": 14, + "column": 34, "line": 1, }, }, "range": Array [ - 14, - 19, + 34, + 39, ], "type": "String", "value": "\\"foo\\"", @@ -83366,17 +88922,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 40, "line": 1, }, "start": Object { - "column": 19, + "column": 39, "line": 1, }, }, "range": Array [ - 19, - 20, + 39, + 40, ], "type": "Punctuator", "value": ";", @@ -83386,14 +88942,14 @@ Object { } `; -exports[`javascript fixtures/modules/export-from-default.src 1`] = ` +exports[`javascript fixtures/modules/export-from-specifier.src 1`] = ` Object { "body": Array [ Object { "declaration": null, "loc": Object { "end": Object { - "column": 28, + "column": 24, "line": 1, }, "start": Object { @@ -83403,22 +88959,22 @@ Object { }, "range": Array [ 0, - 28, + 24, ], "source": Object { "loc": Object { "end": Object { - "column": 27, + "column": 23, "line": 1, }, "start": Object { - "column": 22, + "column": 18, "line": 1, }, }, "range": Array [ - 22, - 27, + 18, + 23, ], "raw": "\\"foo\\"", "type": "Literal", @@ -83429,7 +88985,7 @@ Object { "exported": Object { "loc": Object { "end": Object { - "column": 15, + "column": 11, "line": 1, }, "start": Object { @@ -83437,16 +88993,16 @@ Object { "line": 1, }, }, - "name": "default", + "name": "foo", "range": Array [ 8, - 15, + 11, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 15, + "column": 11, "line": 1, }, "start": Object { @@ -83457,7 +89013,7 @@ Object { "local": Object { "loc": Object { "end": Object { - "column": 15, + "column": 11, "line": 1, }, "start": Object { @@ -83465,16 +89021,16 @@ Object { "line": 1, }, }, - "name": "default", + "name": "foo", "range": Array [ 8, - 15, + 11, ], "type": "Identifier", }, "range": Array [ 8, - 15, + 11, ], "type": "ExportSpecifier", }, @@ -83494,7 +89050,7 @@ Object { }, "range": Array [ 0, - 29, + 25, ], "sourceType": "module", "tokens": Array [ @@ -83537,7 +89093,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 11, "line": 1, }, "start": Object { @@ -83547,25 +89103,25 @@ Object { }, "range": Array [ 8, - 15, + 11, ], - "type": "Keyword", - "value": "default", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 12, "line": 1, }, "start": Object { - "column": 15, + "column": 11, "line": 1, }, }, "range": Array [ - 15, - 16, + 11, + 12, ], "type": "Punctuator", "value": "}", @@ -83573,17 +89129,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 17, "line": 1, }, "start": Object { - "column": 17, + "column": 13, "line": 1, }, }, "range": Array [ + 13, 17, - 21, ], "type": "Identifier", "value": "from", @@ -83591,17 +89147,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 27, + "column": 23, "line": 1, }, "start": Object { - "column": 22, + "column": 18, "line": 1, }, }, "range": Array [ - 22, - 27, + 18, + 23, ], "type": "String", "value": "\\"foo\\"", @@ -83609,17 +89165,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 24, "line": 1, }, "start": Object { - "column": 27, + "column": 23, "line": 1, }, }, "range": Array [ - 27, - 28, + 23, + 24, ], "type": "Punctuator", "value": ";", @@ -83629,14 +89185,14 @@ Object { } `; -exports[`javascript fixtures/modules/export-from-named-as-default.src 1`] = ` +exports[`javascript fixtures/modules/export-from-specifiers.src 1`] = ` Object { "body": Array [ Object { "declaration": null, "loc": Object { "end": Object { - "column": 35, + "column": 29, "line": 1, }, "start": Object { @@ -83646,78 +89202,131 @@ Object { }, "range": Array [ 0, - 35, + 29, ], "source": Object { "loc": Object { "end": Object { - "column": 34, + "column": 28, "line": 1, }, "start": Object { - "column": 29, + "column": 23, "line": 1, }, }, - "range": Array [ - 29, - 34, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ + "range": Array [ + 23, + 28, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, + "specifiers": Array [ + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 8, + 11, + ], + "type": "ExportSpecifier", + }, Object { "exported": Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 15, + "column": 13, "line": 1, }, }, - "name": "default", + "name": "bar", "range": Array [ - 15, - 22, + 13, + 16, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 8, + "column": 13, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 11, + "column": 16, "line": 1, }, "start": Object { - "column": 8, + "column": 13, "line": 1, }, }, - "name": "foo", + "name": "bar", "range": Array [ - 8, - 11, + 13, + 16, ], "type": "Identifier", }, "range": Array [ - 8, - 22, + 13, + 16, ], "type": "ExportSpecifier", }, @@ -83737,7 +89346,7 @@ Object { }, "range": Array [ 0, - 36, + 30, ], "sourceType": "module", "tokens": Array [ @@ -83798,53 +89407,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 12, "line": 1, }, "start": Object { - "column": 12, + "column": 11, "line": 1, }, }, "range": Array [ + 11, 12, - 14, ], - "type": "Identifier", - "value": "as", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 15, + "column": 13, "line": 1, }, }, "range": Array [ - 15, - 22, + 13, + 16, ], - "type": "Keyword", - "value": "default", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 17, "line": 1, }, "start": Object { - "column": 22, + "column": 16, "line": 1, }, }, "range": Array [ - 22, - 23, + 16, + 17, ], "type": "Punctuator", "value": "}", @@ -83852,17 +89461,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 22, "line": 1, }, "start": Object { - "column": 24, + "column": 18, "line": 1, }, }, "range": Array [ - 24, - 28, + 18, + 22, ], "type": "Identifier", "value": "from", @@ -83870,17 +89479,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 34, + "column": 28, "line": 1, }, "start": Object { - "column": 29, + "column": 23, "line": 1, }, }, "range": Array [ - 29, - 34, + 23, + 28, ], "type": "String", "value": "\\"foo\\"", @@ -83888,17 +89497,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 35, + "column": 29, "line": 1, }, "start": Object { - "column": 34, + "column": 28, "line": 1, }, }, "range": Array [ - 34, - 35, + 28, + 29, ], "type": "Punctuator", "value": ";", @@ -83908,99 +89517,83 @@ Object { } `; -exports[`javascript fixtures/modules/export-from-named-as-specifier.src 1`] = ` +exports[`javascript fixtures/modules/export-function.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, + "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", }, - "start": Object { - "column": 0, - "line": 1, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 16, + 19, + ], + "type": "Identifier", }, - }, - "range": Array [ - 0, - 31, - ], - "source": Object { "loc": Object { "end": Object { - "column": 30, + "column": 25, "line": 1, }, "start": Object { - "column": 25, + "column": 7, "line": 1, }, }, + "params": Array [], "range": Array [ + 7, 25, - 30, ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", + "type": "FunctionDeclaration", }, - "specifiers": Array [ - Object { - "exported": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "range": Array [ - 8, - 18, - ], - "type": "ExportSpecifier", + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 25, ], + "source": null, + "specifiers": Array [], "type": "ExportNamedDeclaration", }, ], @@ -84016,7 +89609,7 @@ Object { }, "range": Array [ 0, - 32, + 26, ], "sourceType": "module", "tokens": Array [ @@ -84041,7 +89634,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 15, "line": 1, }, "start": Object { @@ -84051,25 +89644,25 @@ Object { }, "range": Array [ 7, - 8, + 15, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 19, "line": 1, }, "start": Object { - "column": 8, + "column": 16, "line": 1, }, }, "range": Array [ - 8, - 11, + 16, + 19, ], "type": "Identifier", "value": "foo", @@ -84077,56 +89670,38 @@ Object { 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, + "column": 21, "line": 1, }, "start": Object { - "column": 15, + "column": 20, "line": 1, }, }, "range": Array [ - 15, - 18, + 20, + 21, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 22, "line": 1, }, "start": Object { - "column": 18, + "column": 21, "line": 1, }, }, "range": Array [ - 18, - 19, + 21, + 22, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { @@ -84135,66 +89710,48 @@ Object { "line": 1, }, "start": Object { - "column": 20, + "column": 23, "line": 1, }, }, "range": Array [ - 20, + 23, 24, ], - "type": "Identifier", - "value": "from", + "type": "Punctuator", + "value": "{", }, 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, + "column": 24, "line": 1, }, }, "range": Array [ - 30, - 31, + 24, + 25, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/export-from-named-as-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/export-named-as-default.src 1`] = ` Object { "body": Array [ Object { "declaration": null, "loc": Object { "end": Object { - "column": 40, + "column": 24, "line": 1, }, "start": Object { @@ -84204,27 +89761,9 @@ Object { }, "range": Array [ 0, - 40, + 24, ], - "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", - }, + "source": null, "specifiers": Array [ Object { "exported": Object { @@ -84279,59 +89818,6 @@ Object { ], "type": "ExportSpecifier", }, - Object { - "exported": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - }, - "range": Array [ - 24, - 27, - ], - "type": "ExportSpecifier", - }, ], "type": "ExportNamedDeclaration", }, @@ -84348,7 +89834,7 @@ Object { }, "range": Array [ 0, - 41, + 25, ], "sourceType": "module", "tokens": Array [ @@ -84458,94 +89944,22 @@ Object { 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, + "column": 24, "line": 1, }, "start": Object { - "column": 39, + "column": 23, "line": 1, }, }, "range": Array [ - 39, - 40, + 23, + 24, ], "type": "Punctuator", "value": ";", @@ -84555,67 +89969,49 @@ Object { } `; -exports[`javascript fixtures/modules/export-from-specifier.src 1`] = ` +exports[`javascript fixtures/modules/export-named-as-specifier.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, - "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, - }, + "declaration": null, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, - "range": Array [ - 18, - 23, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", }, + "range": Array [ + 0, + 20, + ], + "source": null, "specifiers": Array [ Object { "exported": Object { "loc": Object { "end": Object { - "column": 11, + "column": 18, "line": 1, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, - "name": "foo", + "name": "bar", "range": Array [ - 8, - 11, + 15, + 18, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 11, + "column": 18, "line": 1, }, "start": Object { @@ -84643,7 +90039,7 @@ Object { }, "range": Array [ 8, - 11, + 18, ], "type": "ExportSpecifier", }, @@ -84663,7 +90059,7 @@ Object { }, "range": Array [ 0, - 25, + 21, ], "sourceType": "module", "tokens": Array [ @@ -84724,43 +90120,43 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, 12, + 14, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 18, "line": 1, }, "start": Object { - "column": 13, + "column": 15, "line": 1, }, }, "range": Array [ - 13, - 17, + 15, + 18, ], "type": "Identifier", - "value": "from", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 19, "line": 1, }, "start": Object { @@ -84770,25 +90166,25 @@ Object { }, "range": Array [ 18, - 23, + 19, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 20, "line": 1, }, "start": Object { - "column": 23, + "column": 19, "line": 1, }, }, "range": Array [ - 23, - 24, + 19, + 20, ], "type": "Punctuator", "value": ";", @@ -84798,7 +90194,7 @@ Object { } `; -exports[`javascript fixtures/modules/export-from-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/export-named-as-specifiers.src 1`] = ` Object { "body": Array [ Object { @@ -84817,48 +90213,30 @@ Object { 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", - }, + "source": null, "specifiers": Array [ Object { "exported": Object { "loc": Object { "end": Object { - "column": 11, + "column": 22, "line": 1, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, - "name": "foo", + "name": "default", "range": Array [ - 8, - 11, + 15, + 22, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 11, + "column": 22, "line": 1, }, "start": Object { @@ -84886,7 +90264,7 @@ Object { }, "range": Array [ 8, - 11, + 22, ], "type": "ExportSpecifier", }, @@ -84894,52 +90272,52 @@ Object { "exported": Object { "loc": Object { "end": Object { - "column": 16, + "column": 27, "line": 1, }, "start": Object { - "column": 13, + "column": 24, "line": 1, }, }, "name": "bar", "range": Array [ - 13, - 16, + 24, + 27, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 16, + "column": 27, "line": 1, }, "start": Object { - "column": 13, + "column": 24, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 16, + "column": 27, "line": 1, }, "start": Object { - "column": 13, + "column": 24, "line": 1, }, }, "name": "bar", "range": Array [ - 13, - 16, + 24, + 27, ], "type": "Identifier", }, "range": Array [ - 13, - 16, + 24, + 27, ], "type": "ExportSpecifier", }, @@ -85020,74 +90398,74 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, 12, + 14, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 22, "line": 1, }, "start": Object { - "column": 13, + "column": 15, "line": 1, }, }, "range": Array [ - 13, - 16, + 15, + 22, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 23, "line": 1, }, "start": Object { - "column": 16, + "column": 22, "line": 1, }, }, "range": Array [ - 16, - 17, + 22, + 23, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 27, "line": 1, }, "start": Object { - "column": 18, + "column": 24, "line": 1, }, }, "range": Array [ - 18, - 22, + 24, + 27, ], "type": "Identifier", - "value": "from", + "value": "bar", }, Object { "loc": Object { @@ -85096,16 +90474,16 @@ Object { "line": 1, }, "start": Object { - "column": 23, + "column": 27, "line": 1, }, }, "range": Array [ - 23, + 27, 28, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { @@ -85130,71 +90508,68 @@ Object { } `; -exports[`javascript fixtures/modules/export-function.src 1`] = ` +exports[`javascript fixtures/modules/export-named-class.src 1`] = ` Object { "body": Array [ Object { "declaration": Object { - "async": false, "body": Object { "body": Array [], "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 23, + "column": 18, "line": 1, }, }, "range": Array [ - 23, - 25, + 18, + 22, ], - "type": "BlockStatement", + "type": "ClassBody", }, - "expression": false, - "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 19, + "column": 17, "line": 1, }, "start": Object { - "column": 16, + "column": 13, "line": 1, }, }, - "name": "foo", + "name": "Test", "range": Array [ - 16, - 19, + 13, + 17, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 7, "line": 1, }, }, - "params": Array [], "range": Array [ 7, - 25, + 22, ], - "type": "FunctionDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -85203,7 +90578,7 @@ Object { }, "range": Array [ 0, - 25, + 22, ], "source": null, "specifiers": Array [], @@ -85213,7 +90588,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -85222,7 +90597,7 @@ Object { }, "range": Array [ 0, - 26, + 23, ], "sourceType": "module", "tokens": Array [ @@ -85247,7 +90622,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 12, "line": 1, }, "start": Object { @@ -85257,10 +90632,28 @@ Object { }, "range": Array [ 7, - 15, + 12, ], "type": "Keyword", - "value": "function", + "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 { @@ -85269,102 +90662,354 @@ Object { "line": 1, }, "start": Object { - "column": 16, + "column": 18, "line": 1, }, }, "range": Array [ - 16, + 18, 19, ], - "type": "Identifier", - "value": "foo", + "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", +} +`; + +exports[`javascript fixtures/modules/export-named-empty.src 1`] = ` +Object { + "body": Array [ + Object { + "declaration": null, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 10, + ], + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "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": 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", +} +`; + +exports[`javascript fixtures/modules/export-named-specifier.src 1`] = ` +Object { + "body": Array [ + Object { + "declaration": null, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "source": null, + "specifiers": Array [ + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 8, + 11, + ], + "type": "ExportSpecifier", + }, + ], + "type": "ExportNamedDeclaration", + }, + ], + "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": 21, + "column": 8, "line": 1, }, "start": Object { - "column": 20, + "column": 7, "line": 1, }, }, "range": Array [ - 20, - 21, + 7, + 8, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 11, "line": 1, }, "start": Object { - "column": 21, + "column": 8, "line": 1, }, }, "range": Array [ - 21, - 22, + 8, + 11, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 12, "line": 1, }, "start": Object { - "column": 23, + "column": 11, "line": 1, }, }, "range": Array [ - 23, - 24, + 11, + 12, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 13, "line": 1, }, "start": Object { - "column": 24, + "column": 12, "line": 1, }, }, "range": Array [ - 24, - 25, + 12, + 13, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/export-named-as-default.src 1`] = ` +exports[`javascript fixtures/modules/export-named-specifiers.src 1`] = ` Object { "body": Array [ Object { "declaration": null, "loc": Object { "end": Object { - "column": 24, + "column": 18, "line": 1, }, "start": Object { @@ -85374,7 +91019,7 @@ Object { }, "range": Array [ 0, - 24, + 18, ], "source": null, "specifiers": Array [ @@ -85382,24 +91027,24 @@ Object { "exported": Object { "loc": Object { "end": Object { - "column": 22, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, - "name": "default", + "name": "foo", "range": Array [ - 15, - 22, + 8, + 11, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 22, + "column": 11, "line": 1, }, "start": Object { @@ -85427,7 +91072,60 @@ Object { }, "range": Array [ 8, - 22, + 11, + ], + "type": "ExportSpecifier", + }, + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "range": Array [ + 13, + 16, ], "type": "ExportSpecifier", }, @@ -85447,7 +91145,7 @@ Object { }, "range": Array [ 0, - 25, + 19, ], "sourceType": "module", "tokens": Array [ @@ -85508,53 +91206,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 12, "line": 1, }, "start": Object { - "column": 12, + "column": 11, "line": 1, }, }, "range": Array [ + 11, 12, - 14, ], - "type": "Identifier", - "value": "as", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 15, + "column": 13, "line": 1, }, }, "range": Array [ - 15, - 22, + 13, + 16, ], - "type": "Keyword", - "value": "default", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 17, "line": 1, }, "start": Object { - "column": 22, + "column": 16, "line": 1, }, }, "range": Array [ - 22, - 23, + 16, + 17, ], "type": "Punctuator", "value": "}", @@ -85562,17 +91260,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, + "column": 18, "line": 1, }, "start": Object { - "column": 23, + "column": 17, "line": 1, }, }, "range": Array [ - 23, - 24, + 17, + 18, ], "type": "Punctuator", "value": ";", @@ -85582,14 +91280,14 @@ Object { } `; -exports[`javascript fixtures/modules/export-named-as-specifier.src 1`] = ` +exports[`javascript fixtures/modules/export-named-specifiers-comma.src 1`] = ` Object { "body": Array [ Object { "declaration": null, "loc": Object { "end": Object { - "column": 20, + "column": 19, "line": 1, }, "start": Object { @@ -85599,7 +91297,7 @@ Object { }, "range": Array [ 0, - 20, + 19, ], "source": null, "specifiers": Array [ @@ -85607,24 +91305,24 @@ Object { "exported": Object { "loc": Object { "end": Object { - "column": 18, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, - "name": "bar", + "name": "foo", "range": Array [ - 15, - 18, + 8, + 11, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 18, + "column": 11, "line": 1, }, "start": Object { @@ -85652,7 +91350,60 @@ Object { }, "range": Array [ 8, - 18, + 11, + ], + "type": "ExportSpecifier", + }, + Object { + "exported": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "range": Array [ + 13, + 16, ], "type": "ExportSpecifier", }, @@ -85672,7 +91423,7 @@ Object { }, "range": Array [ 0, - 21, + 20, ], "sourceType": "module", "tokens": Array [ @@ -85733,35 +91484,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 12, "line": 1, }, "start": Object { - "column": 12, + "column": 11, "line": 1, }, }, "range": Array [ + 11, 12, - 14, ], - "type": "Identifier", - "value": "as", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 16, "line": 1, }, "start": Object { - "column": 15, + "column": 13, "line": 1, }, }, "range": Array [ - 15, - 18, + 13, + 16, ], "type": "Identifier", "value": "bar", @@ -85769,17 +91520,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "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, - 19, ], "type": "Punctuator", "value": "}", @@ -85787,17 +91556,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 19, "line": 1, }, "start": Object { - "column": 19, + "column": 18, "line": 1, }, }, "range": Array [ + 18, 19, - 20, ], "type": "Punctuator", "value": ";", @@ -85807,14 +91576,69 @@ Object { } `; -exports[`javascript fixtures/modules/export-named-as-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/export-var.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, + "declaration": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 11, + 14, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 14, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 15, + ], + "type": "VariableDeclaration", + }, "loc": Object { "end": Object { - "column": 29, + "column": 15, "line": 1, }, "start": Object { @@ -85824,117 +91648,221 @@ Object { }, "range": Array [ 0, - 29, + 15, ], "source": null, - "specifiers": Array [ - Object { - "exported": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/modules/export-var-anonymous-function.src 1`] = ` +Object { + "body": Array [ + Object { + "declaration": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, }, + "name": "foo", + "range": Array [ + 11, + 14, + ], + "type": "Identifier", }, - "name": "default", - "range": Array [ - 15, - 22, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, + "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", }, - "start": Object { - "column": 8, - "line": 1, + "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, + ], + "type": "FunctionExpression", }, - "name": "foo", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "range": Array [ - 8, - 22, - ], - "type": "ExportSpecifier", - }, - Object { - "exported": Object { "loc": Object { "end": Object { - "column": 27, + "column": 31, "line": 1, }, "start": Object { - "column": 24, + "column": 11, "line": 1, }, }, - "name": "bar", "range": Array [ - 24, - 27, + 11, + 31, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 32, + "line": 1, }, - "local": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 24, - 27, - ], - "type": "Identifier", + "start": Object { + "column": 7, + "line": 1, }, - "range": Array [ - 24, - 27, - ], - "type": "ExportSpecifier", }, + "range": Array [ + 7, + 32, + ], + "type": "VariableDeclaration", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 32, ], + "source": null, + "specifiers": Array [], "type": "ExportNamedDeclaration", }, ], @@ -85950,7 +91878,7 @@ Object { }, "range": Array [ 0, - 30, + 33, ], "sourceType": "module", "tokens": Array [ @@ -85975,7 +91903,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { @@ -85985,25 +91913,25 @@ Object { }, "range": Array [ 7, - 8, + 10, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 14, "line": 1, }, "start": Object { - "column": 8, + "column": 11, "line": 1, }, }, "range": Array [ - 8, 11, + 14, ], "type": "Identifier", "value": "foo", @@ -86011,89 +91939,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 16, "line": 1, }, "start": Object { - "column": 12, + "column": 15, "line": 1, }, }, "range": Array [ - 12, - 14, + 15, + 16, ], - "type": "Identifier", - "value": "as", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 25, "line": 1, }, "start": Object { - "column": 15, + "column": 17, "line": 1, }, }, "range": Array [ - 15, - 22, + 17, + 25, ], "type": "Keyword", - "value": "default", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 27, "line": 1, }, "start": Object { - "column": 22, + "column": 26, "line": 1, }, }, "range": Array [ - 22, - 23, + 26, + 27, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 28, "line": 1, }, "start": Object { - "column": 24, + "column": 27, "line": 1, }, }, "range": Array [ - 24, 27, + 28, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 30, "line": 1, }, "start": Object { - "column": 27, + "column": 29, "line": 1, }, }, "range": Array [ - 27, - 28, + 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": "}", @@ -86101,17 +92047,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 29, + "column": 32, "line": 1, }, "start": Object { - "column": 28, + "column": 31, "line": 1, }, }, "range": Array [ - 28, - 29, + 31, + 32, ], "type": "Punctuator", "value": ";", @@ -86121,51 +92067,72 @@ Object { } `; -exports[`javascript fixtures/modules/export-named-class.src 1`] = ` +exports[`javascript fixtures/modules/export-var-number.src 1`] = ` Object { "body": Array [ Object { "declaration": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 11, + 14, + ], + "type": "Identifier", }, - }, - "range": Array [ - 18, - 22, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, + "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, }, - "start": Object { - "column": 13, - "line": 1, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, }, + "range": Array [ + 11, + 18, + ], + "type": "VariableDeclarator", }, - "name": "Test", - "range": Array [ - 13, - 17, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 19, + "line": 1, }, "start": Object { "column": 7, @@ -86174,15 +92141,14 @@ Object { }, "range": Array [ 7, - 22, + 19, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 19, + "line": 1, }, "start": Object { "column": 0, @@ -86191,7 +92157,7 @@ Object { }, "range": Array [ 0, - 22, + 19, ], "source": null, "specifiers": Array [], @@ -86201,7 +92167,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -86210,7 +92176,7 @@ Object { }, "range": Array [ 0, - 23, + 20, ], "sourceType": "module", "tokens": Array [ @@ -86235,7 +92201,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 10, "line": 1, }, "start": Object { @@ -86245,178 +92211,79 @@ Object { }, "range": Array [ 7, - 12, + 10, ], "type": "Keyword", - "value": "class", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 14, "line": 1, }, "start": Object { - "column": 13, + "column": 11, "line": 1, }, }, "range": Array [ - 13, - 17, + 11, + 14, ], "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", -} -`; - -exports[`javascript fixtures/modules/export-named-empty.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "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", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 16, "line": 1, }, "start": Object { - "column": 7, + "column": 15, "line": 1, }, }, "range": Array [ - 7, - 8, + 15, + 16, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 18, "line": 1, }, "start": Object { - "column": 8, + "column": 17, "line": 1, }, }, "range": Array [ - 8, - 9, + 17, + 18, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 19, "line": 1, }, "start": Object { - "column": 9, + "column": 18, "line": 1, }, }, "range": Array [ - 9, - 10, + 18, + 19, ], "type": "Punctuator", "value": ";", @@ -86426,14 +92293,13 @@ Object { } `; -exports[`javascript fixtures/modules/export-named-specifier.src 1`] = ` +exports[`javascript fixtures/modules/import-default.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 13, + "column": 22, "line": 1, }, "start": Object { @@ -86443,65 +92309,65 @@ Object { }, "range": Array [ 0, - 13, + 22, ], - "source": null, + "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 { - "exported": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 8, + "column": 7, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 8, + "column": 7, "line": 1, }, }, "name": "foo", "range": Array [ - 8, - 11, + 7, + 10, ], "type": "Identifier", }, "range": Array [ - 8, - 11, + 7, + 10, ], - "type": "ExportSpecifier", + "type": "ImportDefaultSpecifier", }, ], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "loc": Object { @@ -86516,7 +92382,7 @@ Object { }, "range": Array [ 0, - 14, + 23, ], "sourceType": "module", "tokens": Array [ @@ -86536,12 +92402,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { @@ -86551,61 +92417,61 @@ Object { }, "range": Array [ 7, - 8, + 10, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 15, "line": 1, }, "start": Object { - "column": 8, + "column": 11, "line": 1, }, }, "range": Array [ - 8, 11, + 15, ], "type": "Identifier", - "value": "foo", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 21, "line": 1, }, "start": Object { - "column": 11, + "column": 16, "line": 1, }, }, "range": Array [ - 11, - 12, + 16, + 21, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 22, "line": 1, }, "start": Object { - "column": 12, + "column": 21, "line": 1, }, }, "range": Array [ - 12, - 13, + 21, + 22, ], "type": "Punctuator", "value": ";", @@ -86615,14 +92481,13 @@ Object { } `; -exports[`javascript fixtures/modules/export-named-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/import-default-and-named-specifiers.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 18, + "column": 29, "line": 1, }, "start": Object { @@ -86632,65 +92497,65 @@ Object { }, "range": Array [ 0, - 18, + 29, ], - "source": null, + "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 { - "exported": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 8, + "column": 7, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 8, + "column": 7, "line": 1, }, }, "name": "foo", "range": Array [ - 8, - 11, + 7, + 10, ], "type": "Identifier", }, "range": Array [ - 8, - 11, + 7, + 10, ], - "type": "ExportSpecifier", + "type": "ImportDefaultSpecifier", }, Object { - "exported": Object { + "imported": Object { "loc": Object { "end": Object { "column": 16, @@ -86740,10 +92605,10 @@ Object { 13, 16, ], - "type": "ExportSpecifier", + "type": "ImportSpecifier", }, ], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "loc": Object { @@ -86758,7 +92623,7 @@ Object { }, "range": Array [ 0, - 19, + 30, ], "sourceType": "module", "tokens": Array [ @@ -86778,12 +92643,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { @@ -86793,10 +92658,10 @@ Object { }, "range": Array [ 7, - 8, + 10, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { @@ -86805,34 +92670,34 @@ Object { "line": 1, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, "range": Array [ - 8, + 10, 11, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, 12, + 13, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { @@ -86873,17 +92738,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 22, "line": 1, }, "start": Object { - "column": 17, + "column": 18, "line": 1, }, }, "range": Array [ - 17, 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": ";", @@ -86893,14 +92794,13 @@ Object { } `; -exports[`javascript fixtures/modules/export-named-specifiers-comma.src 1`] = ` +exports[`javascript fixtures/modules/import-default-and-namespace-specifiers.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 19, + "column": 32, "line": 1, }, "start": Object { @@ -86910,118 +92810,100 @@ Object { }, "range": Array [ 0, - 19, + 32, ], - "source": null, + "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 { - "exported": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 8, + "column": 7, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 8, + "column": 7, "line": 1, }, }, "name": "foo", "range": Array [ - 8, - 11, + 7, + 10, ], "type": "Identifier", }, "range": Array [ - 8, - 11, + 7, + 10, ], - "type": "ExportSpecifier", + "type": "ImportDefaultSpecifier", }, Object { - "exported": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 16, + "column": 20, "line": 1, }, "start": Object { - "column": 13, + "column": 12, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 16, + "column": 20, "line": 1, }, "start": Object { - "column": 13, + "column": 17, "line": 1, }, }, "name": "bar", "range": Array [ - 13, - 16, + 17, + 20, ], "type": "Identifier", }, "range": Array [ - 13, - 16, + 12, + 20, ], - "type": "ExportSpecifier", + "type": "ImportNamespaceSpecifier", }, ], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "loc": Object { @@ -87036,7 +92918,7 @@ Object { }, "range": Array [ 0, - 20, + 33, ], "sourceType": "module", "tokens": Array [ @@ -87056,12 +92938,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { @@ -87071,10 +92953,10 @@ Object { }, "range": Array [ 7, - 8, + 10, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { @@ -87083,34 +92965,34 @@ Object { "line": 1, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, "range": Array [ - 8, + 10, 11, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, 12, + 13, ], "type": "Punctuator", - "value": ",", + "value": "*", }, Object { "loc": Object { @@ -87119,175 +93001,101 @@ Object { "line": 1, }, "start": Object { - "column": 13, + "column": 14, "line": 1, }, }, "range": Array [ - 13, + 14, 16, ], "type": "Identifier", - "value": "bar", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 20, "line": 1, }, "start": Object { - "column": 16, + "column": 17, "line": 1, }, }, "range": Array [ - 16, 17, + 20, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 25, "line": 1, }, "start": Object { - "column": 17, + "column": 21, "line": 1, }, }, "range": Array [ - 17, - 18, + 21, + 25, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 31, "line": 1, }, "start": Object { - "column": 18, + "column": 26, "line": 1, }, }, "range": Array [ - 18, - 19, + 26, + 31, ], - "type": "Punctuator", - "value": ";", + "type": "String", + "value": "\\"foo\\"", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/modules/export-var.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 15, - ], - "type": "VariableDeclaration", - }, "loc": Object { "end": Object { - "column": 15, + "column": 32, "line": 1, }, "start": Object { - "column": 0, + "column": 31, "line": 1, }, }, "range": Array [ - 0, - 15, + 31, + 32, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ";", }, - }, - "range": Array [ - 0, - 16, ], - "sourceType": "module", - "tokens": Array [ + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/import-default-as.src 1`] = ` +Object { + "body": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 35, "line": 1, }, "start": Object { @@ -87297,186 +93105,83 @@ Object { }, "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, + 35, ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, + "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", }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/modules/export-var-anonymous-function.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - }, - "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", + "specifiers": Array [ + Object { + "imported": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, + "start": Object { + "column": 8, + "line": 1, }, - "params": Array [], - "range": Array [ - 17, - 31, - ], - "type": "FunctionExpression", }, + "name": "default", + "range": Array [ + 8, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "local": Object { "loc": Object { "end": Object { - "column": 31, + "column": 22, "line": 1, }, "start": Object { - "column": 11, + "column": 19, "line": 1, }, }, + "name": "foo", "range": Array [ - 11, - 31, + 19, + 22, ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, + "type": "Identifier", }, + "range": Array [ + 8, + 22, + ], + "type": "ImportSpecifier", }, - "range": Array [ - 7, - 32, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 32, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "loc": Object { @@ -87491,7 +93196,7 @@ Object { }, "range": Array [ 0, - 33, + 36, ], "sourceType": "module", "tokens": Array [ @@ -87511,12 +93216,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { @@ -87526,82 +93231,82 @@ Object { }, "range": Array [ 7, - 10, + 8, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { - "column": 11, + "column": 8, "line": 1, }, }, "range": Array [ - 11, - 14, + 8, + 15, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { - "column": 15, + "column": 16, "line": 1, }, }, "range": Array [ - 15, 16, + 18, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 22, "line": 1, }, "start": Object { - "column": 17, + "column": 19, "line": 1, }, }, "range": Array [ - 17, - 25, + 19, + 22, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 23, "line": 1, }, "start": Object { - "column": 26, + "column": 22, "line": 1, }, }, "range": Array [ - 26, - 27, + 22, + 23, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { @@ -87610,21 +93315,21 @@ Object { "line": 1, }, "start": Object { - "column": 27, + "column": 24, "line": 1, }, }, "range": Array [ - 27, + 24, 28, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 34, "line": 1, }, "start": Object { @@ -87634,147 +93339,109 @@ Object { }, "range": Array [ 29, - 30, + 34, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 35, "line": 1, }, "start": Object { - "column": 30, + "column": 34, "line": 1, }, }, "range": Array [ - 30, - 31, + 34, + 35, ], "type": "Punctuator", - "value": "}", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/import-jquery.src 1`] = ` +Object { + "body": Array [ Object { "loc": Object { "end": Object { - "column": 32, + "column": 22, "line": 1, }, "start": Object { - "column": 31, + "column": 0, "line": 1, }, }, "range": Array [ - 31, - 32, + 0, + 22, ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/modules/export-var-number.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 11, - 14, - ], - "type": "Identifier", + "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, }, - "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, + "start": Object { + "column": 7, + "line": 1, }, + }, + "local": Object { "loc": Object { "end": Object { - "column": 18, + "column": 8, "line": 1, }, "start": Object { - "column": 11, + "column": 7, "line": 1, }, }, + "name": "$", "range": Array [ - 11, - 18, + 7, + 8, ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, + "type": "Identifier", }, + "range": Array [ + 7, + 8, + ], + "type": "ImportDefaultSpecifier", }, - "range": Array [ - 7, - 19, - ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "loc": Object { @@ -87789,7 +93456,7 @@ Object { }, "range": Array [ 0, - 20, + 23, ], "sourceType": "module", "tokens": Array [ @@ -87809,12 +93476,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { @@ -87824,79 +93491,159 @@ Object { }, "range": Array [ 7, - 10, + 8, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "$", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 9, "line": 1, }, }, "range": Array [ - 11, - 14, + 9, + 13, ], "type": "Identifier", - "value": "foo", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 22, "line": 1, }, "start": Object { - "column": 15, + "column": 14, "line": 1, }, }, "range": Array [ - 15, - 16, + 14, + 22, ], - "type": "Punctuator", - "value": "=", + "type": "String", + "value": "\\"jquery\\"", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/import-module.src 1`] = ` +Object { + "body": Array [ Object { "loc": Object { "end": Object { - "column": 18, + "column": 13, "line": 1, }, "start": Object { - "column": 17, + "column": 0, "line": 1, }, }, "range": Array [ - 17, - 18, + 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", + }, + "specifiers": Array [], + "type": "ImportDeclaration", + }, + ], + "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": "import", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 12, ], - "type": "Numeric", - "value": "1", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 13, "line": 1, }, "start": Object { - "column": 18, + "column": 12, "line": 1, }, }, "range": Array [ - 18, - 19, + 12, + 13, ], "type": "Punctuator", "value": ";", @@ -87906,13 +93653,13 @@ Object { } `; -exports[`javascript fixtures/modules/import-default.src 1`] = ` +exports[`javascript fixtures/modules/import-named-as-specifier.src 1`] = ` Object { "body": Array [ Object { "loc": Object { "end": Object { - "column": 22, + "column": 31, "line": 1, }, "start": Object { @@ -87922,22 +93669,22 @@ Object { }, "range": Array [ 0, - 22, + 31, ], "source": Object { "loc": Object { "end": Object { - "column": 21, + "column": 30, "line": 1, }, "start": Object { - "column": 16, + "column": 25, "line": 1, }, }, "range": Array [ - 16, - 21, + 25, + 30, ], "raw": "\\"foo\\"", "type": "Literal", @@ -87945,39 +93692,57 @@ Object { }, "specifiers": Array [ Object { + "imported": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 10, + "column": 18, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 10, + "column": 18, "line": 1, }, "start": Object { - "column": 7, + "column": 15, "line": 1, }, }, - "name": "foo", + "name": "baz", "range": Array [ - 7, - 10, + 15, + 18, ], "type": "Identifier", }, "range": Array [ - 7, - 10, + 8, + 18, ], - "type": "ImportDefaultSpecifier", + "type": "ImportSpecifier", }, ], "type": "ImportDeclaration", @@ -87995,7 +93760,7 @@ Object { }, "range": Array [ 0, - 23, + 32, ], "sourceType": "module", "tokens": Array [ @@ -88020,7 +93785,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { @@ -88030,25 +93795,97 @@ Object { }, "range": Array [ 7, - 10, + 8, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "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", @@ -88056,17 +93893,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 30, "line": 1, }, "start": Object { - "column": 16, + "column": 25, "line": 1, }, }, "range": Array [ - 16, - 21, + 25, + 30, ], "type": "String", "value": "\\"foo\\"", @@ -88074,17 +93911,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 31, "line": 1, }, "start": Object { - "column": 21, + "column": 30, "line": 1, }, }, "range": Array [ - 21, - 22, + 30, + 31, ], "type": "Punctuator", "value": ";", @@ -88094,13 +93931,13 @@ Object { } `; -exports[`javascript fixtures/modules/import-default-and-named-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/import-named-as-specifiers.src 1`] = ` Object { "body": Array [ Object { "loc": Object { "end": Object { - "column": 29, + "column": 36, "line": 1, }, "start": Object { @@ -88110,22 +93947,22 @@ Object { }, "range": Array [ 0, - 29, + 36, ], "source": Object { "loc": Object { "end": Object { - "column": 28, + "column": 35, "line": 1, }, "start": Object { - "column": 23, + "column": 30, "line": 1, }, }, "range": Array [ - 23, - 28, + 30, + 35, ], "raw": "\\"foo\\"", "type": "Literal", @@ -88133,90 +93970,108 @@ Object { }, "specifiers": Array [ Object { + "imported": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 10, + "column": 18, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 10, + "column": 18, "line": 1, }, "start": Object { - "column": 7, + "column": 15, "line": 1, }, }, - "name": "foo", + "name": "baz", "range": Array [ - 7, - 10, + 15, + 18, ], "type": "Identifier", }, "range": Array [ - 7, - 10, + 8, + 18, ], - "type": "ImportDefaultSpecifier", + "type": "ImportSpecifier", }, Object { "imported": Object { "loc": Object { "end": Object { - "column": 16, + "column": 23, "line": 1, }, "start": Object { - "column": 13, + "column": 20, "line": 1, }, }, - "name": "bar", + "name": "xyz", "range": Array [ - 13, - 16, + 20, + 23, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 16, + "column": 23, "line": 1, }, "start": Object { - "column": 13, + "column": 20, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 16, + "column": 23, "line": 1, }, "start": Object { - "column": 13, + "column": 20, "line": 1, }, }, - "name": "bar", + "name": "xyz", "range": Array [ - 13, - 16, + 20, + 23, ], "type": "Identifier", }, "range": Array [ - 13, - 16, + 20, + 23, ], "type": "ImportSpecifier", }, @@ -88236,7 +94091,7 @@ Object { }, "range": Array [ 0, - 30, + 37, ], "sourceType": "module", "tokens": Array [ @@ -88261,7 +94116,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { @@ -88271,10 +94126,10 @@ Object { }, "range": Array [ 7, - 10, + 8, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -88283,21 +94138,21 @@ Object { "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, + 8, 11, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 1, }, "start": Object { @@ -88307,43 +94162,79 @@ Object { }, "range": Array [ 12, - 13, + 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": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 23, "line": 1, }, "start": Object { - "column": 13, + "column": 20, "line": 1, }, }, "range": Array [ - 13, - 16, + 20, + 23, ], "type": "Identifier", - "value": "bar", + "value": "xyz", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 24, "line": 1, }, "start": Object { - "column": 16, + "column": 23, "line": 1, }, }, "range": Array [ - 16, - 17, + 23, + 24, ], "type": "Punctuator", "value": "}", @@ -88351,17 +94242,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 29, "line": 1, }, "start": Object { - "column": 18, + "column": 25, "line": 1, }, }, "range": Array [ - 18, - 22, + 25, + 29, ], "type": "Identifier", "value": "from", @@ -88369,17 +94260,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 35, "line": 1, }, "start": Object { - "column": 23, + "column": 30, "line": 1, }, }, "range": Array [ - 23, - 28, + 30, + 35, ], "type": "String", "value": "\\"foo\\"", @@ -88387,17 +94278,187 @@ Object { Object { "loc": Object { "end": Object { - "column": 29, + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/import-named-empty.src 1`] = ` +Object { + "body": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "source": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 20, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, + "specifiers": Array [], + "type": "ImportDeclaration", + }, + ], + "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": "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": 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": "from", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 20, + ], + "type": "String", + "value": "\\"foo\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, "line": 1, }, "start": Object { - "column": 28, + "column": 20, "line": 1, }, }, "range": Array [ - 28, - 29, + 20, + 21, ], "type": "Punctuator", "value": ";", @@ -88407,13 +94468,13 @@ Object { } `; -exports[`javascript fixtures/modules/import-default-and-namespace-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/import-named-specifier.src 1`] = ` Object { "body": Array [ Object { "loc": Object { "end": Object { - "column": 32, + "column": 24, "line": 1, }, "start": Object { @@ -88423,22 +94484,22 @@ Object { }, "range": Array [ 0, - 32, + 24, ], "source": Object { "loc": Object { "end": Object { - "column": 31, + "column": 23, "line": 1, }, "start": Object { - "column": 26, + "column": 18, "line": 1, }, }, "range": Array [ - 26, - 31, + 18, + 23, ], "raw": "\\"foo\\"", "type": "Literal", @@ -88446,74 +94507,57 @@ Object { }, "specifiers": Array [ Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "local": Object { + "imported": Object { "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, - "name": "foo", + "name": "bar", "range": Array [ - 7, - 10, + 8, + 11, ], "type": "Identifier", }, - "range": Array [ - 7, - 10, - ], - "type": "ImportDefaultSpecifier", - }, - Object { "loc": Object { "end": Object { - "column": 20, + "column": 11, "line": 1, }, "start": Object { - "column": 12, + "column": 8, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 20, + "column": 11, "line": 1, }, "start": Object { - "column": 17, + "column": 8, "line": 1, }, }, "name": "bar", "range": Array [ - 17, - 20, + 8, + 11, ], "type": "Identifier", }, "range": Array [ - 12, - 20, + 8, + 11, ], - "type": "ImportNamespaceSpecifier", + "type": "ImportSpecifier", }, ], "type": "ImportDeclaration", @@ -88531,7 +94575,7 @@ Object { }, "range": Array [ 0, - 33, + 25, ], "sourceType": "module", "tokens": Array [ @@ -88556,7 +94600,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { @@ -88566,10 +94610,10 @@ Object { }, "range": Array [ 7, - 10, + 8, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -88578,85 +94622,49 @@ Object { "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, + 8, 11, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 12, "line": 1, }, "start": Object { - "column": 12, + "column": 11, "line": 1, }, }, "range": Array [ + 11, 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", + "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": 25, - "line": 1, - }, "start": Object { - "column": 21, + "column": 13, "line": 1, }, }, "range": Array [ - 21, - 25, + 13, + 17, ], "type": "Identifier", "value": "from", @@ -88664,17 +94672,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 31, + "column": 23, "line": 1, }, "start": Object { - "column": 26, + "column": 18, "line": 1, }, }, "range": Array [ - 26, - 31, + 18, + 23, ], "type": "String", "value": "\\"foo\\"", @@ -88682,17 +94690,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 32, + "column": 24, "line": 1, }, "start": Object { - "column": 31, + "column": 23, "line": 1, }, }, "range": Array [ - 31, - 32, + 23, + 24, ], "type": "Punctuator", "value": ";", @@ -88702,13 +94710,13 @@ Object { } `; -exports[`javascript fixtures/modules/import-default-as.src 1`] = ` +exports[`javascript fixtures/modules/import-named-specifiers.src 1`] = ` Object { "body": Array [ Object { "loc": Object { "end": Object { - "column": 35, + "column": 29, "line": 1, }, "start": Object { @@ -88718,22 +94726,22 @@ Object { }, "range": Array [ 0, - 35, + 29, ], "source": Object { "loc": Object { "end": Object { - "column": 34, + "column": 28, "line": 1, }, "start": Object { - "column": 29, + "column": 23, "line": 1, }, }, "range": Array [ - 29, - 34, + 23, + 28, ], "raw": "\\"foo\\"", "type": "Literal", @@ -88744,7 +94752,7 @@ Object { "imported": Object { "loc": Object { "end": Object { - "column": 15, + "column": 11, "line": 1, }, "start": Object { @@ -88752,16 +94760,16 @@ Object { "line": 1, }, }, - "name": "default", + "name": "bar", "range": Array [ 8, - 15, + 11, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 22, + "column": 11, "line": 1, }, "start": Object { @@ -88772,24 +94780,77 @@ Object { "local": Object { "loc": Object { "end": Object { - "column": 22, + "column": 11, "line": 1, }, "start": Object { - "column": 19, + "column": 8, "line": 1, }, }, - "name": "foo", + "name": "bar", "range": Array [ - 19, - 22, + 8, + 11, ], "type": "Identifier", }, "range": Array [ 8, - 22, + 11, + ], + "type": "ImportSpecifier", + }, + Object { + "imported": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "range": Array [ + 13, + 16, ], "type": "ImportSpecifier", }, @@ -88809,7 +94870,7 @@ Object { }, "range": Array [ 0, - 36, + 30, ], "sourceType": "module", "tokens": Array [ @@ -88852,7 +94913,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 11, "line": 1, }, "start": Object { @@ -88862,61 +94923,61 @@ Object { }, "range": Array [ 8, - 15, + 11, ], - "type": "Keyword", - "value": "default", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 12, "line": 1, }, "start": Object { - "column": 16, + "column": 11, "line": 1, }, }, "range": Array [ - 16, - 18, + 11, + 12, ], - "type": "Identifier", - "value": "as", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 19, + "column": 13, "line": 1, }, }, "range": Array [ - 19, - 22, + 13, + 16, ], "type": "Identifier", - "value": "foo", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 17, "line": 1, }, "start": Object { - "column": 22, + "column": 16, "line": 1, }, }, "range": Array [ - 22, - 23, + 16, + 17, ], "type": "Punctuator", "value": "}", @@ -88924,17 +94985,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 22, "line": 1, }, "start": Object { - "column": 24, + "column": 18, "line": 1, }, }, "range": Array [ - 24, - 28, + 18, + 22, ], "type": "Identifier", "value": "from", @@ -88942,17 +95003,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 34, + "column": 28, "line": 1, }, "start": Object { - "column": 29, + "column": 23, "line": 1, }, }, "range": Array [ - 29, - 34, + 23, + 28, ], "type": "String", "value": "\\"foo\\"", @@ -88960,17 +95021,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 35, + "column": 29, "line": 1, }, "start": Object { - "column": 34, + "column": 28, "line": 1, }, }, "range": Array [ - 34, - 35, + 28, + 29, ], "type": "Punctuator", "value": ";", @@ -88980,13 +95041,13 @@ Object { } `; -exports[`javascript fixtures/modules/import-jquery.src 1`] = ` +exports[`javascript fixtures/modules/import-named-specifiers-comma.src 1`] = ` Object { "body": Array [ Object { "loc": Object { "end": Object { - "column": 22, + "column": 30, "line": 1, }, "start": Object { @@ -88996,62 +95057,133 @@ Object { }, "range": Array [ 0, - 22, + 30, ], "source": Object { "loc": Object { "end": Object { - "column": 22, + "column": 29, "line": 1, }, "start": Object { - "column": 14, + "column": 24, "line": 1, }, }, "range": Array [ - 14, - 22, + 24, + 29, ], - "raw": "\\"jquery\\"", + "raw": "\\"foo\\"", "type": "Literal", - "value": "jquery", + "value": "foo", }, "specifiers": Array [ Object { + "imported": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 8, + "column": 11, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 8, + "column": 11, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, - "name": "$", + "name": "bar", "range": Array [ - 7, 8, + 11, ], "type": "Identifier", }, "range": Array [ - 7, 8, + 11, ], - "type": "ImportDefaultSpecifier", + "type": "ImportSpecifier", + }, + Object { + "imported": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "range": Array [ + 13, + 16, + ], + "type": "ImportSpecifier", }, ], "type": "ImportDeclaration", @@ -89069,7 +95201,7 @@ Object { }, "range": Array [ 0, - 23, + 31, ], "sourceType": "module", "tokens": Array [ @@ -89106,139 +95238,131 @@ Object { 7, 8, ], - "type": "Identifier", - "value": "$", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 11, "line": 1, }, "start": Object { - "column": 9, + "column": 8, "line": 1, }, }, "range": Array [ - 9, - 13, + 8, + 11, ], "type": "Identifier", - "value": "from", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 12, "line": 1, }, "start": Object { - "column": 14, + "column": 11, "line": 1, }, }, "range": Array [ - 14, - 22, + 11, + 12, ], - "type": "String", - "value": "\\"jquery\\"", + "type": "Punctuator", + "value": ",", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/modules/import-module.src 1`] = ` -Object { - "body": Array [ Object { "loc": Object { "end": Object { - "column": 13, + "column": 16, "line": 1, }, "start": Object { - "column": 0, + "column": 13, "line": 1, }, }, "range": Array [ - 0, 13, + 16, ], - "source": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, }, - "range": Array [ - 7, - 12, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", }, - "specifiers": Array [], - "type": "ImportDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": ",", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "}", }, - }, - "range": Array [ - 0, - 14, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 23, "line": 1, }, "start": Object { - "column": 0, + "column": 19, "line": 1, }, }, "range": Array [ - 0, - 6, + 19, + 23, ], - "type": "Keyword", - "value": "import", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 29, "line": 1, }, "start": Object { - "column": 7, + "column": 24, "line": 1, }, }, "range": Array [ - 7, - 12, + 24, + 29, ], "type": "String", "value": "\\"foo\\"", @@ -89246,17 +95370,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 30, "line": 1, }, "start": Object { - "column": 12, + "column": 29, "line": 1, }, }, "range": Array [ - 12, - 13, + 29, + 30, ], "type": "Punctuator", "value": ";", @@ -89266,13 +95390,13 @@ Object { } `; -exports[`javascript fixtures/modules/import-named-as-specifier.src 1`] = ` +exports[`javascript fixtures/modules/import-namespace-specifier.src 1`] = ` Object { "body": Array [ Object { "loc": Object { "end": Object { - "column": 31, + "column": 27, "line": 1, }, "start": Object { @@ -89282,22 +95406,22 @@ Object { }, "range": Array [ 0, - 31, + 27, ], "source": Object { "loc": Object { "end": Object { - "column": 30, + "column": 26, "line": 1, }, "start": Object { - "column": 25, + "column": 21, "line": 1, }, }, "range": Array [ - 25, - 30, + 21, + 26, ], "raw": "\\"foo\\"", "type": "Literal", @@ -89305,57 +95429,39 @@ Object { }, "specifiers": Array [ Object { - "imported": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 18, + "column": 15, "line": 1, }, "start": Object { - "column": 8, + "column": 7, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 18, + "column": 15, "line": 1, }, "start": Object { - "column": 15, + "column": 12, "line": 1, }, }, - "name": "baz", + "name": "foo", "range": Array [ + 12, 15, - 18, ], "type": "Identifier", }, "range": Array [ - 8, - 18, + 7, + 15, ], - "type": "ImportSpecifier", + "type": "ImportNamespaceSpecifier", }, ], "type": "ImportDeclaration", @@ -89373,7 +95479,7 @@ Object { }, "range": Array [ 0, - 32, + 28, ], "sourceType": "module", "tokens": Array [ @@ -89411,7 +95517,7 @@ Object { 8, ], "type": "Punctuator", - "value": "{", + "value": "*", }, Object { "loc": Object { @@ -89420,21 +95526,21 @@ Object { "line": 1, }, "start": Object { - "column": 8, + "column": 9, "line": 1, }, }, "range": Array [ - 8, + 9, 11, ], "type": "Identifier", - "value": "bar", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { @@ -89444,61 +95550,25 @@ Object { }, "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": "}", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 20, "line": 1, }, "start": Object { - "column": 20, + "column": 16, "line": 1, }, }, "range": Array [ + 16, 20, - 24, ], "type": "Identifier", "value": "from", @@ -89506,17 +95576,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 30, + "column": 26, "line": 1, }, "start": Object { - "column": 25, + "column": 21, "line": 1, }, }, "range": Array [ - 25, - 30, + 21, + 26, ], "type": "String", "value": "\\"foo\\"", @@ -89524,17 +95594,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 31, + "column": 27, "line": 1, }, "start": Object { - "column": 30, + "column": 26, "line": 1, }, }, "range": Array [ - 30, - 31, + 26, + 27, ], "type": "Punctuator", "value": ";", @@ -89544,13 +95614,13 @@ Object { } `; -exports[`javascript fixtures/modules/import-named-as-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/import-null-as-nil.src 1`] = ` Object { "body": Array [ Object { "loc": Object { "end": Object { - "column": 36, + "column": 33, "line": 1, }, "start": Object { @@ -89560,131 +95630,78 @@ Object { }, "range": Array [ 0, - 36, + 33, ], "source": Object { "loc": Object { "end": Object { - "column": 35, + "column": 33, "line": 1, }, "start": Object { - "column": 30, + "column": 28, "line": 1, }, }, "range": Array [ - 30, - 35, + 28, + 33, ], - "raw": "\\"foo\\"", + "raw": "\\"bar\\"", "type": "Literal", - "value": "foo", + "value": "bar", }, "specifiers": Array [ Object { "imported": Object { "loc": Object { "end": Object { - "column": 11, + "column": 13, "line": 1, }, "start": Object { - "column": 8, + "column": 9, "line": 1, }, }, - "name": "bar", + "name": "null", "range": Array [ - 8, - 11, + 9, + 13, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 18, + "column": 20, "line": 1, }, "start": Object { - "column": 8, + "column": 9, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - }, - "range": Array [ - 8, - 18, - ], - "type": "ImportSpecifier", - }, - Object { - "imported": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { "column": 20, "line": 1, }, - }, - "name": "xyz", - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, "start": Object { - "column": 20, + "column": 17, "line": 1, }, }, - "name": "xyz", + "name": "nil", "range": Array [ + 17, 20, - 23, ], "type": "Identifier", }, "range": Array [ + 9, 20, - 23, ], "type": "ImportSpecifier", }, @@ -89704,7 +95721,7 @@ Object { }, "range": Array [ 0, - 37, + 34, ], "sourceType": "module", "tokens": Array [ @@ -89747,35 +95764,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 13, "line": 1, }, "start": Object { - "column": 8, + "column": 9, "line": 1, }, }, "range": Array [ - 8, - 11, + 9, + 13, ], - "type": "Identifier", - "value": "bar", + "type": "Null", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 16, "line": 1, }, "start": Object { - "column": 12, + "column": 14, "line": 1, }, }, "range": Array [ - 12, 14, + 16, ], "type": "Identifier", "value": "as", @@ -89783,156 +95800,279 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 20, "line": 1, }, "start": Object { - "column": 15, + "column": 17, "line": 1, }, }, "range": Array [ - 15, - 18, + 17, + 20, ], "type": "Identifier", - "value": "baz", + "value": "nil", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 22, "line": 1, }, "start": Object { - "column": 18, + "column": 21, "line": 1, }, }, "range": Array [ - 18, - 19, + 21, + 22, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 27, "line": 1, }, "start": Object { - "column": 20, + "column": 23, "line": 1, }, }, "range": Array [ - 20, 23, + 27, ], "type": "Identifier", - "value": "xyz", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 33, "line": 1, }, "start": Object { - "column": 23, + "column": 28, "line": 1, }, }, "range": Array [ - 23, - 24, + 28, + 33, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"bar\\"", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/invalid-await.src 1`] = ` +Object { + "body": Array [ Object { + "declaration": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "await", + "range": Array [ + 11, + 16, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 17, + ], + "type": "VariableDeclaration", + }, "loc": Object { "end": Object { - "column": 29, + "column": 17, "line": 1, }, "start": Object { - "column": 25, + "column": 0, "line": 1, }, }, "range": Array [ - 25, - 29, + 0, + 17, ], - "type": "Identifier", - "value": "from", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + ], + "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": 35, + "column": 6, "line": 1, }, "start": Object { - "column": 30, + "column": 0, "line": 1, }, }, "range": Array [ - 30, - 35, + 0, + 6, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 10, "line": 1, }, "start": Object { - "column": 35, + "column": 7, "line": 1, }, }, "range": Array [ - 35, - 36, + 7, + 10, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "var", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/modules/import-named-empty.src 1`] = ` -Object { - "body": Array [ Object { "loc": Object { "end": Object { - "column": 21, + "column": 16, "line": 1, }, "start": Object { - "column": 0, + "column": 11, "line": 1, }, }, "range": Array [ - 0, - 21, + 11, + 16, ], - "source": Object { + "type": "Keyword", + "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", +} +`; + +exports[`javascript fixtures/modules/invalid-class.src 1`] = ` +Object { + "body": Array [ + Object { + "declaration": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 23, + ], + "type": "ClassBody", + }, + "id": null, "loc": Object { "end": Object { - "column": 20, + "column": 23, "line": 1, }, "start": Object { @@ -89942,14 +96082,26 @@ Object { }, "range": Array [ 15, - 20, + 23, ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", + "superClass": null, + "type": "ClassDeclaration", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, }, - "specifiers": Array [], - "type": "ImportDeclaration", + "range": Array [ + 0, + 23, + ], + "type": "ExportDefaultDeclaration", }, ], "loc": Object { @@ -89964,7 +96116,7 @@ Object { }, "range": Array [ 0, - 22, + 24, ], "sourceType": "module", "tokens": Array [ @@ -89984,12 +96136,12 @@ Object { 6, ], "type": "Keyword", - "value": "import", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 14, "line": 1, }, "start": Object { @@ -89999,95 +96151,88 @@ Object { }, "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, + 14, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 20, "line": 1, }, "start": Object { - "column": 10, + "column": 15, "line": 1, }, }, "range": Array [ - 10, - 14, + 15, + 20, ], - "type": "Identifier", - "value": "from", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 22, "line": 1, }, "start": Object { - "column": 15, + "column": 21, "line": 1, }, }, "range": Array [ - 15, - 20, + 21, + 22, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 23, "line": 1, }, "start": Object { - "column": 20, + "column": 22, "line": 1, }, }, "range": Array [ - 20, - 21, + 22, + 23, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/import-named-specifier.src 1`] = ` +exports[`javascript fixtures/modules/invalid-export-batch-missing-from-clause.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-export-batch-token.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-export-default.src 1`] = `"';' expected."`; + +exports[`javascript fixtures/modules/invalid-export-default-equal.src 1`] = `"Expression expected."`; + +exports[`javascript fixtures/modules/invalid-export-default-token.src 1`] = `"';' expected."`; + +exports[`javascript fixtures/modules/invalid-export-named-default.src 1`] = ` Object { "body": Array [ Object { + "declaration": null, "loc": Object { "end": Object { - "column": 24, + "column": 16, "line": 1, }, "start": Object { @@ -90097,33 +96242,15 @@ Object { }, "range": Array [ 0, - 24, + 16, ], - "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", - }, + "source": null, "specifiers": Array [ Object { - "imported": Object { + "exported": Object { "loc": Object { "end": Object { - "column": 11, + "column": 15, "line": 1, }, "start": Object { @@ -90131,16 +96258,16 @@ Object { "line": 1, }, }, - "name": "bar", + "name": "default", "range": Array [ 8, - 11, + 15, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 11, + "column": 15, "line": 1, }, "start": Object { @@ -90151,7 +96278,7 @@ Object { "local": Object { "loc": Object { "end": Object { - "column": 11, + "column": 15, "line": 1, }, "start": Object { @@ -90159,21 +96286,21 @@ Object { "line": 1, }, }, - "name": "bar", + "name": "default", "range": Array [ 8, - 11, + 15, ], "type": "Identifier", }, "range": Array [ 8, - 11, + 15, ], - "type": "ImportSpecifier", + "type": "ExportSpecifier", }, ], - "type": "ImportDeclaration", + "type": "ExportNamedDeclaration", }, ], "loc": Object { @@ -90188,7 +96315,7 @@ Object { }, "range": Array [ 0, - 25, + 17, ], "sourceType": "module", "tokens": Array [ @@ -90208,7 +96335,7 @@ Object { 6, ], "type": "Keyword", - "value": "import", + "value": "export", }, Object { "loc": Object { @@ -90231,7 +96358,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 15, "line": 1, }, "start": Object { @@ -90241,95 +96368,53 @@ Object { }, "range": Array [ 8, - 11, + 15, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 16, "line": 1, }, "start": Object { - "column": 11, + "column": 15, "line": 1, }, }, "range": Array [ - 11, - 12, + 15, + 16, ], "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", } `; -exports[`javascript fixtures/modules/import-named-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/invalid-export-named-extra-comma.src 1`] = `"Identifier expected."`; + +exports[`javascript fixtures/modules/invalid-export-named-middle-comma.src 1`] = `"Identifier expected."`; + +exports[`javascript fixtures/modules/invalid-import-default.src 1`] = `"Expression expected."`; + +exports[`javascript fixtures/modules/invalid-import-default-after-named.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-import-default-after-named-after-default.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-import-default-missing-module-specifier.src 1`] = `"'=' expected."`; + +exports[`javascript fixtures/modules/invalid-import-default-module-specifier.src 1`] = ` Object { "body": Array [ Object { "loc": Object { "end": Object { - "column": 29, + "column": 20, "line": 1, }, "start": Object { @@ -90339,133 +96424,61 @@ Object { }, "range": Array [ 0, - 29, + 20, ], "source": Object { "loc": Object { "end": Object { - "column": 28, + "column": 19, "line": 1, }, "start": Object { - "column": 23, + "column": 16, "line": 1, }, }, + "name": "bar", "range": Array [ - 23, - 28, + 16, + 19, ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", + "type": "Identifier", }, "specifiers": Array [ Object { - "imported": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "range": Array [ - 8, - 11, - ], - "type": "ImportSpecifier", - }, - Object { - "imported": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 16, + "column": 10, "line": 1, }, "start": Object { - "column": 13, + "column": 7, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 16, + "column": 10, "line": 1, }, "start": Object { - "column": 13, + "column": 7, "line": 1, }, }, - "name": "baz", + "name": "foo", "range": Array [ - 13, - 16, + 7, + 10, ], "type": "Identifier", }, "range": Array [ - 13, - 16, + 7, + 10, ], - "type": "ImportSpecifier", + "type": "ImportDefaultSpecifier", }, ], "type": "ImportDeclaration", @@ -90483,7 +96496,7 @@ Object { }, "range": Array [ 0, - 30, + 21, ], "sourceType": "module", "tokens": Array [ @@ -90508,7 +96521,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { @@ -90518,33 +96531,15 @@ Object { }, "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, + 10, ], "type": "Identifier", - "value": "bar", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 15, "line": 1, }, "start": Object { @@ -90554,33 +96549,15 @@ Object { }, "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, + 15, ], "type": "Identifier", - "value": "baz", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 19, "line": 1, }, "start": Object { @@ -90590,61 +96567,25 @@ Object { }, "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, + 19, ], "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\\"", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 20, "line": 1, }, "start": Object { - "column": 28, + "column": 19, "line": 1, }, }, "range": Array [ - 28, - 29, + 19, + 20, ], "type": "Punctuator", "value": ";", @@ -90654,13 +96595,16 @@ Object { } `; -exports[`javascript fixtures/modules/import-named-specifiers-comma.src 1`] = ` +exports[`javascript fixtures/modules/invalid-import-missing-module-specifier.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-import-module-specifier.src 1`] = ` Object { "body": Array [ Object { + "declaration": null, "loc": Object { "end": Object { - "column": 30, + "column": 21, "line": 1, }, "start": Object { @@ -90670,30 +96614,29 @@ Object { }, "range": Array [ 0, - 30, + 21, ], "source": Object { "loc": Object { "end": Object { - "column": 29, + "column": 21, "line": 1, }, "start": Object { - "column": 24, + "column": 18, "line": 1, }, }, + "name": "bar", "range": Array [ - 24, - 29, + 18, + 21, ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", + "type": "Identifier", }, "specifiers": Array [ Object { - "imported": Object { + "exported": Object { "loc": Object { "end": Object { "column": 11, @@ -90704,7 +96647,7 @@ Object { "line": 1, }, }, - "name": "bar", + "name": "foo", "range": Array [ 8, 11, @@ -90732,74 +96675,21 @@ Object { "line": 1, }, }, - "name": "bar", + "name": "foo", "range": Array [ 8, 11, ], "type": "Identifier", }, - "range": Array [ - 8, - 11, - ], - "type": "ImportSpecifier", - }, - Object { - "imported": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - }, - "range": Array [ - 13, - 16, + "range": Array [ + 8, + 11, ], - "type": "ImportSpecifier", + "type": "ExportSpecifier", }, ], - "type": "ImportDeclaration", + "type": "ExportNamedDeclaration", }, ], "loc": Object { @@ -90814,7 +96704,7 @@ Object { }, "range": Array [ 0, - 31, + 22, ], "sourceType": "module", "tokens": Array [ @@ -90834,7 +96724,7 @@ Object { 6, ], "type": "Keyword", - "value": "import", + "value": "export", }, Object { "loc": Object { @@ -90870,7 +96760,7 @@ Object { 11, ], "type": "Identifier", - "value": "bar", + "value": "foo", }, Object { "loc": Object { @@ -90888,12 +96778,12 @@ Object { 12, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 17, "line": 1, }, "start": Object { @@ -90903,181 +96793,158 @@ Object { }, "range": Array [ 13, - 16, + 17, ], "type": "Identifier", - "value": "baz", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 21, "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, + 21, ], "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": ";", + "value": "bar", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/import-namespace-specifier.src 1`] = ` +exports[`javascript fixtures/modules/invalid-import-named-after-named.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-import-named-after-namespace.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-import-named-as-missing-from.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-import-named-extra-comma.src 1`] = `"Identifier expected."`; + +exports[`javascript fixtures/modules/invalid-import-named-middle-comma.src 1`] = `"Identifier expected."`; + +exports[`javascript fixtures/modules/invalid-import-namespace-after-named.src 1`] = `"'from' expected."`; + +exports[`javascript fixtures/modules/invalid-import-namespace-missing-as.src 1`] = `"'as' expected."`; + +exports[`javascript fixtures/newTarget/invalid-new-target.src 1`] = ` Object { "body": Array [ Object { - "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 [ + "declarations": Array [ Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "name": "x", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", }, - "local": Object { + "init": Object { "loc": Object { "end": Object { - "column": 15, + "column": 18, "line": 1, }, "start": Object { - "column": 12, + "column": 8, "line": 1, }, }, - "name": "foo", + "meta": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "new", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "target", + "range": Array [ + 12, + 18, + ], + "type": "Identifier", + }, "range": Array [ - 12, - 15, + 8, + 18, ], - "type": "Identifier", + "type": "MetaProperty", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, "range": Array [ - 7, - 15, + 4, + 18, ], - "type": "ImportNamespaceSpecifier", + "type": "VariableDeclarator", }, ], - "type": "ImportDeclaration", + "kind": "var", + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 19, + ], + "type": "VariableDeclaration", }, ], "loc": Object { @@ -91092,14 +96959,14 @@ Object { }, "range": Array [ 0, - 28, + 20, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 3, "line": 1, }, "start": Object { @@ -91109,115 +96976,115 @@ Object { }, "range": Array [ 0, - 6, + 3, ], "type": "Keyword", - "value": "import", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { - "column": 7, + "column": 4, "line": 1, }, }, "range": Array [ - 7, - 8, + 4, + 5, ], - "type": "Punctuator", - "value": "*", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 7, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, "range": Array [ - 9, - 11, + 6, + 7, ], - "type": "Identifier", - "value": "as", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 11, "line": 1, }, "start": Object { - "column": 12, + "column": 8, "line": 1, }, }, "range": Array [ - 12, - 15, + 8, + 11, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "new", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 12, "line": 1, }, "start": Object { - "column": 16, + "column": 11, "line": 1, }, }, "range": Array [ - 16, - 20, + 11, + 12, ], - "type": "Identifier", - "value": "from", + "type": "Punctuator", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 18, "line": 1, }, "start": Object { - "column": 21, + "column": 12, "line": 1, }, }, "range": Array [ - 21, - 26, + 12, + 18, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Identifier", + "value": "target", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 19, "line": 1, }, "start": Object { - "column": 26, + "column": 18, "line": 1, }, }, "range": Array [ - 26, - 27, + 18, + 19, ], "type": "Punctuator", "value": ";", @@ -91227,99 +97094,174 @@ Object { } `; -exports[`javascript fixtures/modules/import-null-as-nil.src 1`] = ` +exports[`javascript fixtures/newTarget/invalid-unknown-property.src 1`] = ` Object { "body": Array [ Object { - "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 [ + "declarations": Array [ Object { - "imported": Object { + "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 5, "line": 1, }, "start": Object { - "column": 9, + "column": 4, "line": 1, }, }, - "name": "null", + "name": "f", "range": Array [ - 9, - 13, + 4, + 5, ], "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, + "init": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "meta": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "new", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "unknown_property", + "range": Array [ + 25, + 41, + ], + "type": "Identifier", + }, + "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", }, - }, - "local": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 20, + "column": 44, "line": 1, }, "start": Object { - "column": 17, + "column": 8, "line": 1, }, }, - "name": "nil", + "params": Array [], "range": Array [ - 17, - 20, + 8, + 44, ], - "type": "Identifier", + "type": "FunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, "range": Array [ - 9, - 20, + 4, + 44, ], - "type": "ImportSpecifier", + "type": "VariableDeclarator", }, ], - "type": "ImportDeclaration", + "kind": "var", + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 44, + ], + "type": "VariableDeclaration", }, ], "loc": Object { @@ -91334,14 +97276,14 @@ Object { }, "range": Array [ 0, - 34, + 45, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 3, "line": 1, }, "start": Object { @@ -91351,69 +97293,87 @@ Object { }, "range": Array [ 0, - 6, + 3, ], "type": "Keyword", - "value": "import", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 8, + "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, - 8, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 16, "line": 1, }, "start": Object { - "column": 9, + "column": 8, "line": 1, }, }, "range": Array [ - 9, - 13, + 8, + 16, ], - "type": "Null", - "value": "null", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 17, "line": 1, }, "start": Object { - "column": 14, + "column": 16, "line": 1, }, }, "range": Array [ - 14, 16, + 17, ], - "type": "Identifier", - "value": "as", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 18, "line": 1, }, "start": Object { @@ -91423,15 +97383,33 @@ Object { }, "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": "nil", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 24, "line": 1, }, "start": Object { @@ -91441,135 +97419,262 @@ Object { }, "range": Array [ 21, - 22, + 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": "}", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 41, "line": 1, }, "start": Object { - "column": 23, + "column": 25, "line": 1, }, }, "range": Array [ - 23, - 27, + 25, + 41, ], "type": "Identifier", - "value": "from", + "value": "unknown_property", }, Object { "loc": Object { "end": Object { - "column": 33, + "column": 42, "line": 1, }, "start": Object { - "column": 28, + "column": 41, "line": 1, }, }, "range": Array [ - 28, - 33, + 41, + 42, ], - "type": "String", - "value": "\\"bar\\"", + "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", } `; -exports[`javascript fixtures/modules/invalid-await.src 1`] = ` +exports[`javascript fixtures/newTarget/simple-new-target.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "declarations": Array [ + "async": false, + "body": Object { + "body": Array [ Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "name": "x", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", }, - "start": Object { - "column": 11, - "line": 1, + "init": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "meta": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "name": "new", + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "target", + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + }, + "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", }, - "name": "await", - "range": Array [ - 11, - 16, - ], - "type": "Identifier", - }, - "init": null, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 11, - 16, + 19, + 38, ], - "type": "VariableDeclarator", + "type": "VariableDeclaration", }, ], - "kind": "var", "loc": Object { "end": Object { - "column": 17, + "column": 1, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 40, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, "line": 1, }, "start": Object { - "column": 7, + "column": 9, "line": 1, }, }, + "name": "f", "range": Array [ - 7, - 17, + 9, + 10, ], - "type": "VariableDeclaration", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, "line": 1, }, }, + "params": Array [], "range": Array [ 0, - 17, + 40, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", + "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -91578,14 +97683,14 @@ Object { }, "range": Array [ 0, - 18, + 41, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 8, "line": 1, }, "start": Object { @@ -91595,10 +97700,10 @@ Object { }, "range": Array [ 0, - 6, + 8, ], "type": "Keyword", - "value": "export", + "value": "function", }, Object { "loc": Object { @@ -91607,21 +97712,39 @@ Object { "line": 1, }, "start": Object { - "column": 7, + "column": 9, "line": 1, }, }, "range": Array [ - 7, + 9, 10, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 16, + "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 { @@ -91630,79 +97753,313 @@ Object { }, }, "range": Array [ - 11, - 16, + 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": "Keyword", - "value": "await", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 16, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 16, - 17, + 39, + 40, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/invalid-class.src 1`] = ` +exports[`javascript fixtures/objectLiteral/object-literal-in-lhs.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "body": Object { - "body": Array [], + "expression": Object { + "left": Object { + "computed": false, "loc": Object { "end": Object { - "column": 23, + "column": 8, "line": 1, }, "start": Object { - "column": 21, + "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 { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "fn", + "range": Array [ + 0, + 2, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "CallExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, "range": Array [ - 21, - 23, + 0, + 8, ], - "type": "ClassBody", + "type": "MemberExpression", }, - "id": null, "loc": Object { "end": Object { - "column": 23, + "column": 14, "line": 1, }, "start": Object { - "column": 15, + "column": 0, "line": 1, }, }, + "operator": "=", "range": Array [ - 15, - 23, + 0, + 14, ], - "superClass": null, - "type": "ClassDeclaration", + "right": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "obj", + "range": Array [ + 11, + 14, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", }, "loc": Object { "end": Object { - "column": 23, + "column": 15, "line": 1, }, "start": Object { @@ -91712,9 +98069,9 @@ Object { }, "range": Array [ 0, - 23, + 15, ], - "type": "ExportDefaultDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { @@ -91729,14 +98086,14 @@ Object { }, "range": Array [ 0, - 24, + 16, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 2, "line": 1, }, "start": Object { @@ -91746,361 +98103,355 @@ Object { }, "range": Array [ 0, - 6, + 2, ], - "type": "Keyword", - "value": "export", + "type": "Identifier", + "value": "fn", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 3, "line": 1, }, "start": Object { - "column": 7, + "column": 2, "line": 1, }, }, "range": Array [ - 7, - 14, + 2, + 3, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 4, "line": 1, }, "start": Object { - "column": 15, + "column": 3, "line": 1, }, }, "range": Array [ - 15, - 20, + 3, + 4, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 5, "line": 1, }, "start": Object { - "column": 21, + "column": 4, "line": 1, }, }, "range": Array [ - 21, - 22, + 4, + 5, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 6, "line": 1, }, "start": Object { - "column": 22, + "column": 5, "line": 1, }, }, "range": Array [ - 22, - 23, + 5, + 6, ], "type": "Punctuator", - "value": "}", + "value": ")", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/modules/invalid-export-batch-missing-from-clause.src 1`] = `"'from' expected."`; - -exports[`javascript fixtures/modules/invalid-export-batch-token.src 1`] = `"'from' expected."`; - -exports[`javascript fixtures/modules/invalid-export-default.src 1`] = `"';' expected."`; - -exports[`javascript fixtures/modules/invalid-export-default-equal.src 1`] = `"Expression expected."`; - -exports[`javascript fixtures/modules/invalid-export-default-token.src 1`] = `"';' expected."`; - -exports[`javascript fixtures/modules/invalid-export-named-default.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 16, + "column": 7, "line": 1, }, "start": Object { - "column": 0, + "column": 6, "line": 1, }, }, "range": Array [ - 0, - 16, - ], - "source": null, - "specifiers": Array [ - Object { - "exported": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "default", - "range": Array [ - 8, - 15, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "default", - "range": Array [ - 8, - 15, - ], - "type": "Identifier", - }, - "range": Array [ - 8, - 15, - ], - "type": "ExportSpecifier", - }, + 6, + 7, ], - "type": "ExportNamedDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ".", }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 8, "line": 1, }, "start": Object { - "column": 0, + "column": 7, "line": 1, }, }, "range": Array [ - 0, - 6, + 7, + 8, ], - "type": "Keyword", - "value": "export", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { - "column": 7, + "column": 9, "line": 1, }, }, "range": Array [ - 7, - 8, + 9, + 10, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 14, "line": 1, }, "start": Object { - "column": 8, + "column": 11, "line": 1, }, }, "range": Array [ - 8, - 15, + 11, + 14, ], - "type": "Keyword", - "value": "default", + "type": "Identifier", + "value": "obj", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 15, "line": 1, }, "start": Object { - "column": 15, + "column": 14, "line": 1, }, }, "range": Array [ + 14, 15, - 16, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/invalid-export-named-extra-comma.src 1`] = `"Identifier expected."`; - -exports[`javascript fixtures/modules/invalid-export-named-middle-comma.src 1`] = `"Identifier expected."`; - -exports[`javascript fixtures/modules/invalid-import-default.src 1`] = `"Expression expected."`; - -exports[`javascript fixtures/modules/invalid-import-default-after-named.src 1`] = `"'from' expected."`; - -exports[`javascript fixtures/modules/invalid-import-default-after-named-after-default.src 1`] = `"'from' expected."`; - -exports[`javascript fixtures/modules/invalid-import-default-missing-module-specifier.src 1`] = `"'=' expected."`; - -exports[`javascript fixtures/modules/invalid-import-default-module-specifier.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/computed-addition-property.src 1`] = ` Object { "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 20, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", }, - "start": Object { - "column": 16, - "line": 1, + "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, + "range": Array [ + 14, + 26, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 23, + 26, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 8, + 28, + ], + "type": "ObjectExpression", }, - }, - "name": "bar", - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - }, - "specifiers": Array [ - Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 7, + "column": 4, "line": 1, }, }, - "local": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - }, "range": Array [ - 7, - 10, + 4, + 28, ], - "type": "ImportDefaultSpecifier", + "type": "VariableDeclarator", }, ], - "type": "ImportDeclaration", + "kind": "var", + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 29, + ], + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -92109,14 +98460,14 @@ Object { }, "range": Array [ 0, - 21, + 30, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 3, "line": 1, }, "start": Object { @@ -92126,423 +98477,371 @@ Object { }, "range": Array [ 0, - 6, + 3, ], "type": "Keyword", - "value": "import", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 5, "line": 1, }, "start": Object { - "column": 7, + "column": 4, "line": 1, }, }, "range": Array [ - 7, - 10, + 4, + 5, ], "type": "Identifier", - "value": "foo", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 7, "line": 1, }, "start": Object { - "column": 11, + "column": 6, "line": 1, }, }, "range": Array [ - 11, - 15, + 6, + 7, ], - "type": "Identifier", - "value": "from", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 9, "line": 1, }, "start": Object { - "column": 16, + "column": 8, "line": 1, }, }, "range": Array [ - 16, - 19, + 8, + 9, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 19, - 20, + 14, + 15, ], "type": "Punctuator", - "value": ";", + "value": "[", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/modules/invalid-import-missing-module-specifier.src 1`] = `"'from' expected."`; - -exports[`javascript fixtures/modules/invalid-import-module-specifier.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 6, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 5, + "line": 2, }, }, "range": Array [ - 0, - 21, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - }, - "specifiers": Array [ - Object { - "exported": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "range": Array [ - 8, - 11, - ], - "type": "ExportSpecifier", - }, + 15, + 16, ], - "type": "ExportNamedDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Numeric", + "value": "5", }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 0, - 6, + 17, + 18, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": "+", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ - 7, - 8, + 19, + 20, ], - "type": "Punctuator", - "value": "{", + "type": "Numeric", + "value": "5", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 1, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 8, - 11, + 20, + 21, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { "column": 12, - "line": 1, + "line": 2, }, "start": Object { "column": 11, - "line": 1, + "line": 2, }, }, "range": Array [ - 11, - 12, + 21, + 22, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { "column": 13, - "line": 1, + "line": 2, }, }, "range": Array [ - 13, - 17, + 23, + 26, ], "type": "Identifier", - "value": "from", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 18, - 21, + 27, + 28, ], - "type": "Identifier", - "value": "bar", + "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", } `; -exports[`javascript fixtures/modules/invalid-import-named-after-named.src 1`] = `"'from' expected."`; - -exports[`javascript fixtures/modules/invalid-import-named-after-namespace.src 1`] = `"'from' expected."`; - -exports[`javascript fixtures/modules/invalid-import-named-as-missing-from.src 1`] = `"'from' expected."`; - -exports[`javascript fixtures/modules/invalid-import-named-extra-comma.src 1`] = `"Identifier expected."`; - -exports[`javascript fixtures/modules/invalid-import-named-middle-comma.src 1`] = `"Identifier expected."`; - -exports[`javascript fixtures/modules/invalid-import-namespace-after-named.src 1`] = `"'from' expected."`; - -exports[`javascript fixtures/modules/invalid-import-namespace-missing-as.src 1`] = `"'as' expected."`; - -exports[`javascript fixtures/newTarget/invalid-new-target.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/computed-and-identifier.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, + "expression": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, }, + "name": "x", + "range": Array [ + 3, + 4, + ], + "type": "Identifier", }, - "name": "x", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - }, - "init": Object { + "kind": "init", "loc": Object { "end": Object { - "column": 18, + "column": 9, "line": 1, }, "start": Object { - "column": 8, + "column": 2, "line": 1, }, }, - "meta": Object { + "method": false, + "range": Array [ + 2, + 9, + ], + "shorthand": false, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 11, + "column": 9, "line": 1, }, "start": Object { - "column": 8, + "column": 7, "line": 1, }, }, - "name": "new", "range": Array [ - 8, - 11, + 7, + 9, ], - "type": "Identifier", + "raw": "10", + "type": "Literal", + "value": 10, }, - "property": Object { + }, + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 18, + "column": 12, "line": 1, }, "start": Object { - "column": 12, + "column": 11, "line": 1, }, }, - "name": "target", + "name": "y", "range": Array [ + 11, 12, - 18, ], "type": "Identifier", }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "method": false, "range": Array [ - 8, - 18, + 11, + 16, ], - "type": "MetaProperty", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, + "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 [ - 4, - 18, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", + ], + "range": Array [ + 1, + 17, + ], + "type": "ObjectExpression", + }, "loc": Object { "end": Object { "column": 19, @@ -92557,13 +98856,13 @@ Object { 0, 19, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { "column": 0, @@ -92572,14 +98871,14 @@ Object { }, "range": Array [ 0, - 20, + 19, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -92589,25 +98888,61 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, + "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, - 5, ], "type": "Identifier", "value": "x", @@ -92615,38 +98950,74 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "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, - 7, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 9, "line": 1, }, "start": Object { - "column": 8, + "column": 7, "line": 1, }, }, "range": Array [ - 8, - 11, + 7, + 9, ], - "type": "Keyword", - "value": "new", + "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 { @@ -92663,13 +99034,13 @@ Object { 11, 12, ], - "type": "Punctuator", - "value": ".", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 13, "line": 1, }, "start": Object { @@ -92679,10 +99050,64 @@ Object { }, "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": "Identifier", - "value": "target", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { @@ -92707,162 +99132,209 @@ Object { } `; -exports[`javascript fixtures/newTarget/invalid-unknown-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/computed-getter-and-setter.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "kind": "get", "loc": Object { "end": Object { - "column": 5, + "column": 14, "line": 1, }, "start": Object { - "column": 4, + "column": 2, "line": 1, }, }, - "name": "f", + "method": false, "range": Array [ - 4, - 5, + 2, + 14, ], - "type": "Identifier", - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "meta": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "new", - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "unknown_property", - "range": Array [ - 25, - 41, - ], - "type": "Identifier", - }, - "range": Array [ - 21, - 41, - ], - "type": "MetaProperty", + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 14, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, + "start": Object { + "column": 12, + "line": 1, }, - "range": Array [ - 21, - 42, - ], - "type": "ExpressionStatement", }, + "range": Array [ + 12, + 14, + ], + "type": "BlockStatement", + }, + "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, ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": true, + "key": Object { "loc": Object { "end": Object { - "column": 44, + "column": 22, "line": 1, }, "start": Object { - "column": 19, + "column": 21, "line": 1, }, }, + "name": "x", "range": Array [ - 19, - 44, + 21, + 22, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, + "kind": "set", "loc": Object { "end": Object { - "column": 44, + "column": 29, "line": 1, }, "start": Object { - "column": 8, + "column": 16, "line": 1, }, }, - "params": Array [], + "method": false, "range": Array [ - 8, - 44, + 16, + 29, ], - "type": "FunctionExpression", - }, - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, + "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", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "v", + "range": Array [ + 24, + 25, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 23, + 29, + ], + "type": "FunctionExpression", }, }, - "range": Array [ - 4, - 44, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", + ], + "range": Array [ + 1, + 30, + ], + "type": "ObjectExpression", + }, "loc": Object { "end": Object { - "column": 44, + "column": 32, "line": 1, }, "start": Object { @@ -92872,15 +99344,15 @@ Object { }, "range": Array [ 0, - 44, + 32, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { "column": 0, @@ -92889,552 +99361,325 @@ Object { }, "range": Array [ 0, - 45, + 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": "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, + "column": 1, "line": 1, }, "start": Object { - "column": 8, + "column": 0, "line": 1, }, }, "range": Array [ - 8, - 16, + 0, + 1, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 2, "line": 1, }, "start": Object { - "column": 16, + "column": 1, "line": 1, }, }, "range": Array [ - 16, - 17, + 1, + 2, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 5, "line": 1, }, "start": Object { - "column": 17, + "column": 2, "line": 1, }, }, "range": Array [ - 17, - 18, + 2, + 5, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 7, "line": 1, }, "start": Object { - "column": 19, + "column": 6, "line": 1, }, }, "range": Array [ - 19, - 20, + 6, + 7, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 8, "line": 1, }, "start": Object { - "column": 21, + "column": 7, "line": 1, }, }, "range": Array [ - 21, - 24, + 7, + 8, ], - "type": "Keyword", - "value": "new", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 9, "line": 1, }, "start": Object { - "column": 24, + "column": 8, "line": 1, }, }, "range": Array [ - 24, - 25, + 8, + 9, ], "type": "Punctuator", - "value": ".", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 41, + "column": 10, "line": 1, }, "start": Object { - "column": 25, + "column": 9, "line": 1, }, }, "range": Array [ - 25, - 41, + 9, + 10, ], - "type": "Identifier", - "value": "unknown_property", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 42, + "column": 11, "line": 1, }, "start": Object { - "column": 41, + "column": 10, "line": 1, }, }, "range": Array [ - 41, - 42, + 10, + 11, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 44, + "column": 13, "line": 1, }, "start": Object { - "column": 43, + "column": 12, "line": 1, }, }, "range": Array [ - 43, - 44, + 12, + 13, ], "type": "Punctuator", - "value": "}", + "value": "{", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/newTarget/simple-new-target.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "name": "x", - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "meta": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "name": "new", - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "target", - "range": Array [ - 31, - 37, - ], - "type": "Identifier", - }, - "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", - }, - ], - "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", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 0, + "column": 13, "line": 1, }, }, - "params": Array [], "range": Array [ - 0, - 40, + 13, + 14, ], - "type": "FunctionDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "}", }, - }, - "range": Array [ - 0, - 41, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 15, "line": 1, }, "start": Object { - "column": 0, + "column": 14, "line": 1, }, }, "range": Array [ - 0, - 8, + 14, + 15, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 19, "line": 1, }, "start": Object { - "column": 9, + "column": 16, "line": 1, }, }, "range": Array [ - 9, - 10, + 16, + 19, ], "type": "Identifier", - "value": "f", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 21, "line": 1, }, "start": Object { - "column": 10, + "column": 20, "line": 1, }, }, "range": Array [ - 10, - 11, + 20, + 21, ], "type": "Punctuator", - "value": "(", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 22, "line": 1, }, "start": Object { - "column": 11, + "column": 21, "line": 1, }, }, "range": Array [ - 11, - 12, + 21, + 22, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 23, "line": 1, }, "start": Object { - "column": 13, + "column": 22, "line": 1, }, }, "range": Array [ - 13, - 14, + 22, + 23, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 19, - 22, + 23, + 24, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ - 23, 24, + 25, ], "type": "Identifier", - "value": "x", + "value": "v", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ @@ -93442,238 +99687,226 @@ Object { 26, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 27, + "line": 1, }, }, "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, + 28, ], "type": "Punctuator", - "value": ".", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 31, - 37, + 28, + 29, ], - "type": "Identifier", - "value": "target", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 29, + "line": 1, }, }, "range": Array [ - 37, - 38, + 29, + 30, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 31, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 30, + "line": 1, }, }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/objectLiteral/object-literal-in-lhs.src 1`] = ` -Object { - "body": Array [ - Object { - "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 { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "fn", - "range": Array [ - 0, - 2, - ], - "type": "Identifier", - }, + "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", +} +`; + +exports[`javascript fixtures/objectLiteralComputedProperties/computed-string-property.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 6, + "column": 5, "line": 1, }, "start": Object { - "column": 0, + "column": 4, "line": 1, }, }, + "name": "x", "range": Array [ - 0, - 6, + 4, + 5, ], - "type": "CallExpression", + "type": "Identifier", }, - "property": Object { + "init": Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, - "name": "x", + "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, + "range": Array [ + 14, + 26, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 23, + 26, + ], + "type": "Identifier", + }, + }, + ], "range": Array [ - 7, 8, + 28, ], - "type": "Identifier", - }, - "range": Array [ - 0, - 8, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "ObjectExpression", }, - }, - "operator": "=", - "range": Array [ - 0, - 14, - ], - "right": Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 11, + "column": 4, "line": 1, }, }, - "name": "obj", "range": Array [ - 11, - 14, + 4, + 28, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - "type": "AssignmentExpression", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { "column": 0, @@ -93682,15 +99915,15 @@ Object { }, "range": Array [ 0, - 15, + 29, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -93699,14 +99932,14 @@ Object { }, "range": Array [ 0, - 16, + 30, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 2, + "column": 3, "line": 1, }, "start": Object { @@ -93716,43 +99949,61 @@ Object { }, "range": Array [ 0, - 2, + 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": "fn", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 7, "line": 1, }, "start": Object { - "column": 2, + "column": 6, "line": 1, }, }, "range": Array [ - 2, - 3, + 6, + 7, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 9, "line": 1, }, "start": Object { - "column": 3, + "column": 8, "line": 1, }, }, "range": Array [ - 3, - 4, + 8, + 9, ], "type": "Punctuator", "value": "{", @@ -93761,124 +100012,124 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 2, }, "start": Object { "column": 4, - "line": 1, + "line": 2, }, }, "range": Array [ - 4, - 5, + 14, + 15, ], "type": "Punctuator", - "value": "}", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { "column": 5, - "line": 1, + "line": 2, }, }, "range": Array [ - 5, - 6, + 15, + 20, ], - "type": "Punctuator", - "value": ")", + "type": "String", + "value": "\\"hey\\"", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 6, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 6, - 7, + 20, + 21, ], "type": "Punctuator", - "value": ".", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 7, - 8, + 21, + 22, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 9, - 10, + 23, + 26, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 11, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 11, - 14, + 27, + 28, ], - "type": "Identifier", - "value": "obj", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { - "column": 14, - "line": 1, + "column": 1, + "line": 3, }, }, "range": Array [ - 14, - 15, + 28, + 29, ], "type": "Punctuator", "value": ";", @@ -93888,7 +100139,7 @@ Object { } `; -exports[`javascript fixtures/objectLiteralComputedProperties/computed-addition-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/computed-variable-property.src 1`] = ` Object { "body": Array [ Object { @@ -93927,28 +100178,9 @@ Object { 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, + "column": 8, "line": 2, }, "start": Object { @@ -93956,36 +100188,17 @@ Object { "line": 2, }, }, - "operator": "+", + "name": "bar", "range": Array [ 15, - 20, + 18, ], - "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", + "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 16, + "column": 14, "line": 2, }, "start": Object { @@ -93996,25 +100209,25 @@ Object { "method": false, "range": Array [ 14, - 26, + 24, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 16, + "column": 14, "line": 2, }, "start": Object { - "column": 13, + "column": 11, "line": 2, }, }, "name": "foo", "range": Array [ - 23, - 26, + 21, + 24, ], "type": "Identifier", }, @@ -94022,7 +100235,7 @@ Object { ], "range": Array [ 8, - 28, + 26, ], "type": "ObjectExpression", }, @@ -94038,7 +100251,7 @@ Object { }, "range": Array [ 4, - 28, + 26, ], "type": "VariableDeclarator", }, @@ -94056,7 +100269,7 @@ Object { }, "range": Array [ 0, - 29, + 27, ], "type": "VariableDeclaration", }, @@ -94073,7 +100286,7 @@ Object { }, "range": Array [ 0, - 30, + 28, ], "sourceType": "script", "tokens": Array [ @@ -94170,7 +100383,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 6, + "column": 8, "line": 2, }, "start": Object { @@ -94180,28 +100393,28 @@ Object { }, "range": Array [ 15, - 16, + 18, ], - "type": "Numeric", - "value": "5", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 9, "line": 2, }, "start": Object { - "column": 7, + "column": 8, "line": 2, }, }, "range": Array [ - 17, 18, + 19, ], "type": "Punctuator", - "value": "+", + "value": "]", }, Object { "loc": Object { @@ -94218,31 +100431,13 @@ Object { 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": "]", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 2, }, "start": Object { @@ -94252,25 +100447,7 @@ Object { }, "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, + 24, ], "type": "Identifier", "value": "foo", @@ -94287,8 +100464,8 @@ Object { }, }, "range": Array [ - 27, - 28, + 25, + 26, ], "type": "Punctuator", "value": "}", @@ -94305,8 +100482,8 @@ Object { }, }, "range": Array [ - 28, - 29, + 26, + 27, ], "type": "Punctuator", "value": ";", @@ -94316,14 +100493,18 @@ Object { } `; -exports[`javascript fixtures/objectLiteralComputedProperties/computed-and-identifier.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/invalid-computed-variable-property.src 1`] = `"':' expected."`; + +exports[`javascript fixtures/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src 1`] = `"':' expected."`; + +exports[`javascript fixtures/objectLiteralComputedProperties/standalone-expression.src 1`] = ` Object { "body": Array [ Object { "expression": Object { "loc": Object { "end": Object { - "column": 17, + "column": 10, "line": 1, }, "start": Object { @@ -94390,74 +100571,16 @@ Object { "value": 10, }, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "method": 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, + 10, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 19, + "column": 12, "line": 1, }, "start": Object { @@ -94467,15 +100590,15 @@ Object { }, "range": Array [ 0, - 19, + 12, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -94484,7 +100607,7 @@ Object { }, "range": Array [ 0, - 19, + 13, ], "sourceType": "script", "tokens": Array [ @@ -94630,94 +100753,22 @@ Object { 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, + "column": 11, "line": 1, }, "start": Object { - "column": 17, + "column": 10, "line": 1, }, }, "range": Array [ - 17, - 18, + 10, + 11, ], "type": "Punctuator", "value": ")", @@ -94725,17 +100776,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 12, "line": 1, }, "start": Object { - "column": 18, + "column": 11, "line": 1, }, }, "range": Array [ - 18, - 19, + 11, + 12, ], "type": "Punctuator", "value": ";", @@ -94745,14 +100796,14 @@ Object { } `; -exports[`javascript fixtures/objectLiteralComputedProperties/computed-getter-and-setter.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/standalone-expression-with-addition.src 1`] = ` Object { "body": Array [ Object { "expression": Object { "loc": Object { "end": Object { - "column": 30, + "column": 18, "line": 1, }, "start": Object { @@ -94764,190 +100815,109 @@ Object { Object { "computed": true, "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 2, - 14, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "left": Object { "loc": Object { "end": Object { - "column": 14, + "column": 6, "line": 1, }, "start": Object { - "column": 12, + "column": 3, "line": 1, }, }, "range": Array [ - 12, - 14, + 3, + 6, ], - "type": "BlockStatement", + "raw": "\\"x\\"", + "type": "Literal", + "value": "x", }, - "expression": false, - "generator": false, - "id": null, "loc": Object { "end": Object { - "column": 14, + "column": 12, "line": 1, }, "start": Object { - "column": 9, + "column": 3, "line": 1, }, }, - "params": Array [], + "operator": "+", "range": Array [ - 9, - 14, + 3, + 12, ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, + "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", }, - "name": "x", - "range": Array [ - 21, - 22, - ], - "type": "Identifier", + "type": "BinaryExpression", }, - "kind": "set", + "kind": "init", "loc": Object { "end": Object { - "column": 29, + "column": 17, "line": 1, }, "start": Object { - "column": 16, + "column": 2, "line": 1, }, }, "method": false, "range": Array [ - 16, - 29, + 2, + 17, ], "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", - }, - "expression": false, - "generator": false, - "id": null, "loc": Object { "end": Object { - "column": 29, + "column": 17, "line": 1, }, "start": Object { - "column": 23, + "column": 15, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "v", - "range": Array [ - 24, - 25, - ], - "type": "Identifier", - }, - ], "range": Array [ - 23, - 29, + 15, + 17, ], - "type": "FunctionExpression", + "raw": "10", + "type": "Literal", + "value": 10, }, }, ], "range": Array [ 1, - 30, + 18, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 32, + "column": 20, "line": 1, }, "start": Object { @@ -94957,15 +100927,15 @@ Object { }, "range": Array [ 0, - 32, + 20, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -94974,7 +100944,7 @@ Object { }, "range": Array [ 0, - 32, + 21, ], "sourceType": "script", "tokens": Array [ @@ -95017,7 +100987,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -95027,28 +100997,28 @@ Object { }, "range": Array [ 2, - 5, + 3, ], - "type": "Identifier", - "value": "get", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 6, "line": 1, }, "start": Object { - "column": 6, + "column": 3, "line": 1, }, }, "range": Array [ + 3, 6, - 7, ], - "type": "Punctuator", - "value": "[", + "type": "String", + "value": "\\"x\\"", }, Object { "loc": Object { @@ -95065,31 +101035,13 @@ Object { 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": "]", + "value": "+", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 12, "line": 1, }, "start": Object { @@ -95099,28 +101051,10 @@ Object { }, "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, + 12, ], - "type": "Punctuator", - "value": ")", + "type": "String", + "value": "\\"y\\"", }, Object { "loc": Object { @@ -95138,7 +101072,7 @@ Object { 13, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { @@ -95156,202 +101090,40 @@ Object { 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": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 17, "line": 1, }, "start": Object { - "column": 28, + "column": 15, "line": 1, }, }, "range": Array [ - 28, - 29, + 15, + 17, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 18, "line": 1, }, "start": Object { - "column": 29, + "column": 17, "line": 1, }, }, "range": Array [ - 29, - 30, + 17, + 18, ], "type": "Punctuator", "value": "}", @@ -95359,17 +101131,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 31, + "column": 19, "line": 1, }, "start": Object { - "column": 30, + "column": 18, "line": 1, }, }, "range": Array [ - 30, - 31, + 18, + 19, ], "type": "Punctuator", "value": ")", @@ -95377,17 +101149,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 32, + "column": 20, "line": 1, }, "start": Object { - "column": 31, + "column": 19, "line": 1, }, }, "range": Array [ - 31, - 32, + 19, + 20, ], "type": "Punctuator", "value": ";", @@ -95397,129 +101169,112 @@ Object { } `; -exports[`javascript fixtures/objectLiteralComputedProperties/computed-string-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/standalone-expression-with-method.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 3, + 4, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 5, + "column": 20, "line": 1, }, "start": Object { - "column": 4, + "column": 2, "line": 1, }, }, - "name": "x", + "method": false, "range": Array [ - 4, - 5, + 2, + 20, ], - "type": "Identifier", - }, - "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", + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 18, + "line": 1, }, }, - "method": false, "range": Array [ - 14, - 26, + 18, + 20, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 23, - 26, - ], - "type": "Identifier", + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, }, }, - ], - "range": Array [ - 8, - 28, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 1, + "params": Array [], + "range": Array [ + 7, + 20, + ], + "type": "FunctionExpression", }, }, - "range": Array [ - 4, - 28, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", + ], + "range": Array [ + 1, + 21, + ], + "type": "ObjectExpression", + }, "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 23, + "line": 1, }, "start": Object { "column": 0, @@ -95528,15 +101283,15 @@ Object { }, "range": Array [ 0, - 29, + 23, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -95545,14 +101300,14 @@ Object { }, "range": Array [ 0, - 30, + 24, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -95562,25 +101317,61 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, + "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, - 5, ], "type": "Identifier", "value": "x", @@ -95588,143 +101379,143 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 7, + 4, + 5, ], "type": "Punctuator", - "value": "=", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { - "column": 8, + "column": 5, "line": 1, }, }, "range": Array [ - 8, - 9, + 5, + 6, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 14, + 7, 15, ], - "type": "Punctuator", - "value": "[", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ 15, - 20, + 16, ], - "type": "String", - "value": "\\"hey\\"", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 20, - 21, + 16, + 17, ], "type": "Punctuator", - "value": "]", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 21, - 22, + 18, + 19, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 13, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ - 23, - 26, + 19, + 20, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 21, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 20, + "line": 1, }, }, "range": Array [ - 27, - 28, + 20, + 21, ], "type": "Punctuator", "value": "}", @@ -95732,17 +101523,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 22, + "line": 1, }, "start": Object { - "column": 1, - "line": 3, + "column": 21, + "line": 1, }, }, "range": Array [ - 28, - 29, + 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": ";", @@ -95752,9 +101561,119 @@ Object { } `; -exports[`javascript fixtures/objectLiteralComputedProperties/computed-variable-property.src 1`] = ` +exports[`javascript fixtures/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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "proto", + "range": Array [ + 19, + 24, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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 { @@ -95762,17 +101681,17 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 5, }, "start": Object { "column": 4, - "line": 1, + "line": 5, }, }, "name": "x", "range": Array [ - 4, - 5, + 36, + 37, ], "type": "Identifier", }, @@ -95780,91 +101699,148 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 8, }, "start": Object { "column": 8, - "line": 1, + "line": 5, }, }, "properties": Array [ Object { - "computed": true, + "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 10, + "line": 6, }, "start": Object { - "column": 5, - "line": 2, + "column": 1, + "line": 6, }, }, - "name": "bar", + "name": "__proto__", "range": Array [ - 15, - 18, + 43, + 52, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 17, + "line": 6, }, "start": Object { - "column": 4, - "line": 2, + "column": 1, + "line": 6, }, }, "method": false, "range": Array [ - 14, - 24, + 43, + 59, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 17, + "line": 6, }, "start": Object { - "column": 11, - "line": 2, + "column": 12, + "line": 6, }, }, - "name": "foo", + "name": "proto", "range": Array [ - 21, - 24, + 54, + 59, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 7, + }, + "start": Object { + "column": 1, + "line": 7, + }, + }, + "name": "__proto__", + "range": Array [ + 62, + 71, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 17, + "line": 7, + }, + "start": Object { + "column": 1, + "line": 7, + }, + }, + "method": false, + "range": Array [ + 62, + 78, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 7, + }, + "start": Object { + "column": 12, + "line": 7, + }, + }, + "name": "proto", + "range": Array [ + 73, + 78, ], "type": "Identifier", }, }, ], "range": Array [ - 8, - 26, + 40, + 80, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 8, }, "start": Object { "column": 4, - "line": 1, + "line": 5, }, }, "range": Array [ - 4, - 26, + 36, + 80, ], "type": "VariableDeclarator", }, @@ -95873,24 +101849,24 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 3, + "line": 8, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, - 27, + 32, + 81, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 4, + "column": 2, + "line": 8, }, "start": Object { "column": 0, @@ -95899,14 +101875,14 @@ Object { }, "range": Array [ 0, - 28, + 81, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 12, "line": 1, }, "start": Object { @@ -95916,490 +101892,367 @@ Object { }, "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, + 12, ], - "type": "Identifier", - "value": "x", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 13, "line": 1, }, "start": Object { - "column": 6, + "column": 12, "line": 1, }, }, "range": Array [ - 6, - 7, + 12, + 13, ], "type": "Punctuator", - "value": "=", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 3, + "line": 3, }, "start": Object { - "column": 8, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 8, - 9, + 15, + 18, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 9, + "line": 3, }, "start": Object { "column": 4, - "line": 2, + "line": 3, }, }, "range": Array [ - 14, - 15, + 19, + 24, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "proto", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 11, + "line": 3, }, "start": Object { - "column": 5, - "line": 2, + "column": 10, + "line": 3, }, }, "range": Array [ - 15, - 18, + 25, + 26, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 13, + "line": 3, }, "start": Object { - "column": 8, - "line": 2, + "column": 12, + "line": 3, }, }, "range": Array [ - 18, - 19, + 27, + 28, ], "type": "Punctuator", - "value": "]", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 14, + "line": 3, }, "start": Object { - "column": 9, - "line": 2, + "column": 13, + "line": 3, }, }, "range": Array [ - 19, - 20, + 28, + 29, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 15, + "line": 3, }, "start": Object { - "column": 11, - "line": 2, + "column": 14, + "line": 3, }, }, "range": Array [ - 21, - 24, + 29, + 30, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 3, + "line": 5, }, "start": Object { "column": 0, - "line": 3, + "line": 5, }, }, "range": Array [ - 25, - 26, + 32, + 35, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 5, + "line": 5, }, "start": Object { - "column": 1, - "line": 3, + "column": 4, + "line": 5, }, }, "range": Array [ - 26, - 27, + 36, + 37, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "x", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/objectLiteralComputedProperties/invalid-computed-variable-property.src 1`] = `"':' expected."`; - -exports[`javascript fixtures/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src 1`] = `"':' expected."`; - -exports[`javascript fixtures/objectLiteralComputedProperties/standalone-expression.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": 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, + "column": 7, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 6, + "line": 5, }, }, "range": Array [ - 0, - 12, + 38, + 39, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "=", }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 1, + "column": 9, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 0, - 1, + 40, + 41, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 1, + "column": 10, + "line": 6, }, "start": Object { "column": 1, - "line": 1, + "line": 6, }, }, "range": Array [ - 1, - 2, + 43, + 52, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "__proto__", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 11, + "line": 6, }, "start": Object { - "column": 2, - "line": 1, + "column": 10, + "line": 6, }, }, "range": Array [ - 2, - 3, + 52, + 53, ], "type": "Punctuator", - "value": "[", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 17, + "line": 6, }, "start": Object { - "column": 3, - "line": 1, + "column": 12, + "line": 6, }, }, "range": Array [ - 3, - 4, + 54, + 59, ], "type": "Identifier", - "value": "x", + "value": "proto", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 18, + "line": 6, }, "start": Object { - "column": 4, - "line": 1, + "column": 17, + "line": 6, }, }, "range": Array [ - 4, - 5, + 59, + 60, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 10, + "line": 7, }, "start": Object { - "column": 5, - "line": 1, + "column": 1, + "line": 7, }, }, "range": Array [ - 5, - 6, + 62, + 71, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "__proto__", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 11, + "line": 7, }, "start": Object { - "column": 7, - "line": 1, + "column": 10, + "line": 7, }, }, - "range": Array [ - 7, - 9, + "range": Array [ + 71, + 72, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 17, + "line": 7, }, "start": Object { - "column": 9, - "line": 1, + "column": 12, + "line": 7, }, }, "range": Array [ - 9, - 10, + 73, + 78, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "proto", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 1, + "line": 8, }, "start": Object { - "column": 10, - "line": 1, + "column": 0, + "line": 8, }, }, "range": Array [ - 10, - 11, + 79, + 80, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 2, + "line": 8, }, "start": Object { - "column": 11, - "line": 1, + "column": 1, + "line": 8, }, }, "range": Array [ - 11, - 12, + 80, + 81, ], "type": "Punctuator", "value": ";", @@ -96409,146 +102262,314 @@ Object { } `; -exports[`javascript fixtures/objectLiteralComputedProperties/standalone-expression-with-addition.src 1`] = ` +exports[`javascript fixtures/objectLiteralDuplicateProperties/error-proto-string-property.src 1`] = ` Object { "body": Array [ Object { + "directive": "use strict", "expression": Object { "loc": Object { "end": Object { - "column": 18, + "column": 12, "line": 1, }, "start": Object { - "column": 1, + "column": 0, "line": 1, }, }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "left": Object { + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "proto", + "range": Array [ + 19, + 24, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "name": "x", + "range": Array [ + 36, + 37, + ], + "type": "Identifier", + }, + "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": 6, - "line": 1, + "column": 19, + "line": 6, }, "start": Object { - "column": 3, - "line": 1, + "column": 1, + "line": 6, }, }, + "method": false, "range": Array [ - 3, - 6, + 43, + 61, ], - "raw": "\\"x\\"", - "type": "Literal", - "value": "x", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 6, + }, + "start": Object { + "column": 14, + "line": 6, + }, + }, + "name": "proto", + "range": Array [ + 56, + 61, + ], + "type": "Identifier", }, }, - "operator": "+", - "range": Array [ - 3, - 12, - ], - "right": Object { + 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": 12, - "line": 1, + "column": 19, + "line": 7, }, "start": Object { - "column": 9, - "line": 1, + "column": 1, + "line": 7, }, }, + "method": false, "range": Array [ - 9, - 12, + 64, + 82, ], - "raw": "\\"y\\"", - "type": "Literal", - "value": "y", - }, - "type": "BinaryExpression", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 7, + }, + "start": Object { + "column": 14, + "line": 7, + }, + }, + "name": "proto", + "range": Array [ + 77, + 82, + ], + "type": "Identifier", + }, }, - }, - "method": false, + ], "range": Array [ - 2, - 17, + 40, + 84, ], - "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, + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 5, }, }, - ], - "range": Array [ - 1, - 18, - ], - "type": "ObjectExpression", - }, + "range": Array [ + 36, + 84, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 2, + "line": 8, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, - 20, + 32, + 85, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 2, + "line": 8, }, "start": Object { "column": 0, @@ -96557,100 +102578,10 @@ Object { }, "range": Array [ 0, - 21, + 85, ], "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 { @@ -96658,513 +102589,373 @@ Object { "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, + "column": 0, "line": 1, }, }, "range": Array [ + 0, 12, - 13, ], - "type": "Punctuator", - "value": "]", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 13, "line": 1, }, "start": Object { - "column": 13, + "column": 12, "line": 1, }, }, "range": Array [ + 12, 13, - 14, ], "type": "Punctuator", - "value": ":", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 3, + "line": 3, }, "start": Object { - "column": 15, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ 15, - 17, + 18, ], - "type": "Numeric", - "value": "10", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 9, + "line": 3, }, "start": Object { - "column": 17, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 17, - 18, + 19, + 24, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "proto", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 10, + "line": 3, }, }, "range": Array [ - 18, - 19, + 25, + 26, ], "type": "Punctuator", - "value": ")", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 13, + "line": 3, }, "start": Object { - "column": 19, - "line": 1, + "column": 12, + "line": 3, }, }, "range": Array [ - 19, - 20, + 27, + 28, ], "type": "Punctuator", - "value": ";", + "value": "{", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/objectLiteralComputedProperties/standalone-expression-with-method.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": 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", - }, - "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, - ], - "type": "FunctionExpression", - }, - }, - ], - "range": Array [ - 1, - 21, - ], - "type": "ObjectExpression", - }, "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 14, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 13, + "line": 3, }, }, "range": Array [ - 0, - 23, + 28, + 29, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "}", }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 1, + "column": 15, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 14, + "line": 3, }, }, "range": Array [ - 0, - 1, + 29, + 30, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { - "column": 1, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 1, - 2, + 32, + 35, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 2, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 2, - 3, + 36, + 37, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 7, + "line": 5, }, "start": Object { - "column": 3, - "line": 1, + "column": 6, + "line": 5, }, }, "range": Array [ - 3, - 4, + 38, + 39, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 9, + "line": 5, }, "start": Object { - "column": 4, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 4, - 5, + 40, + 41, ], "type": "Punctuator", - "value": "]", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 5, - "line": 1, + "column": 1, + "line": 6, }, }, "range": Array [ - 5, - 6, + 43, + 54, ], - "type": "Punctuator", - "value": ":", + "type": "String", + "value": "\\"__proto__\\"", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 13, + "line": 6, }, "start": Object { - "column": 7, - "line": 1, + "column": 12, + "line": 6, }, }, "range": Array [ - 7, - 15, + 54, + 55, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 19, + "line": 6, }, "start": Object { - "column": 15, - "line": 1, + "column": 14, + "line": 6, }, }, "range": Array [ - 15, - 16, + 56, + 61, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "proto", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 20, + "line": 6, }, "start": Object { - "column": 16, - "line": 1, + "column": 19, + "line": 6, }, }, "range": Array [ - 16, - 17, + 61, + 62, ], "type": "Punctuator", - "value": ")", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 12, + "line": 7, }, "start": Object { - "column": 18, - "line": 1, + "column": 1, + "line": 7, }, }, "range": Array [ - 18, - 19, + 64, + 75, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "\\"__proto__\\"", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 13, + "line": 7, }, "start": Object { - "column": 19, - "line": 1, + "column": 12, + "line": 7, }, }, "range": Array [ - 19, - 20, + 75, + 76, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 19, + "line": 7, }, "start": Object { - "column": 20, - "line": 1, + "column": 14, + "line": 7, }, }, "range": Array [ - 20, - 21, + 77, + 82, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "proto", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 1, + "line": 8, }, "start": Object { - "column": 21, - "line": 1, + "column": 0, + "line": 8, }, }, "range": Array [ - 21, - 22, + 83, + 84, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 2, + "line": 8, }, "start": Object { - "column": 22, - "line": 1, + "column": 1, + "line": 8, }, }, "range": Array [ - 22, - 23, + 84, + 85, ], "type": "Punctuator", "value": ";", @@ -97174,10 +102965,11 @@ Object { } `; -exports[`javascript fixtures/objectLiteralDuplicateProperties/error-proto-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralDuplicateProperties/strict-duplicate-properties.src 1`] = ` Object { "body": Array [ Object { + "directive": "use strict", "expression": Object { "loc": Object { "end": Object { @@ -97219,7 +103011,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 3, }, "start": Object { @@ -97227,83 +103019,10 @@ Object { "line": 3, }, }, - "name": "proto", - "range": Array [ - 19, - 24, - ], - "type": "Identifier", - }, - "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", - }, - ], - "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 { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, "name": "x", "range": Array [ - 36, - 37, + 19, + 20, ], "type": "Identifier", }, @@ -97311,11 +103030,11 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 8, + "line": 6, }, "start": Object { "column": 8, - "line": 5, + "line": 3, }, }, "properties": Array [ @@ -97324,56 +103043,57 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 10, - "line": 6, + "column": 2, + "line": 4, }, "start": Object { "column": 1, - "line": 6, + "line": 4, }, }, - "name": "__proto__", + "name": "y", "range": Array [ - 43, - 52, + 26, + 27, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 17, - "line": 6, + "column": 11, + "line": 4, }, "start": Object { "column": 1, - "line": 6, + "line": 4, }, }, "method": false, "range": Array [ - 43, - 59, + 26, + 36, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 17, - "line": 6, + "column": 11, + "line": 4, }, "start": Object { - "column": 12, - "line": 6, + "column": 4, + "line": 4, }, }, - "name": "proto", "range": Array [ - 54, - 59, + 29, + 36, ], - "type": "Identifier", + "raw": "'first'", + "type": "Literal", + "value": "first", }, }, Object { @@ -97381,78 +103101,79 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 10, - "line": 7, + "column": 2, + "line": 5, }, "start": Object { "column": 1, - "line": 7, + "line": 5, }, }, - "name": "__proto__", + "name": "y", "range": Array [ - 62, - 71, + 39, + 40, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 17, - "line": 7, + "column": 12, + "line": 5, }, "start": Object { "column": 1, - "line": 7, + "line": 5, }, }, "method": false, "range": Array [ - 62, - 78, + 39, + 50, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 17, - "line": 7, + "column": 12, + "line": 5, }, "start": Object { - "column": 12, - "line": 7, + "column": 4, + "line": 5, }, }, - "name": "proto", "range": Array [ - 73, - 78, + 42, + 50, ], - "type": "Identifier", + "raw": "'second'", + "type": "Literal", + "value": "second", }, }, ], "range": Array [ - 40, - 80, + 23, + 52, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { "column": 1, - "line": 8, + "line": 6, }, "start": Object { "column": 4, - "line": 5, + "line": 3, }, }, "range": Array [ - 36, - 80, + 19, + 52, ], "type": "VariableDeclarator", }, @@ -97461,16 +103182,16 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 8, + "line": 6, }, "start": Object { "column": 0, - "line": 5, + "line": 3, }, }, "range": Array [ - 32, - 81, + 15, + 53, ], "type": "VariableDeclaration", }, @@ -97478,7 +103199,7 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 8, + "line": 6, }, "start": Object { "column": 0, @@ -97487,7 +103208,7 @@ Object { }, "range": Array [ 0, - 81, + 53, ], "sourceType": "script", "tokens": Array [ @@ -97548,7 +103269,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 3, }, "start": Object { @@ -97558,25 +103279,25 @@ Object { }, "range": Array [ 19, - 24, + 20, ], "type": "Identifier", - "value": "proto", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 7, "line": 3, }, "start": Object { - "column": 10, + "column": 6, "line": 3, }, }, "range": Array [ - 25, - 26, + 21, + 22, ], "type": "Punctuator", "value": "=", @@ -97584,17 +103305,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 9, "line": 3, }, "start": Object { - "column": 12, + "column": 8, "line": 3, }, }, "range": Array [ - 27, - 28, + 23, + 24, ], "type": "Punctuator", "value": "{", @@ -97602,101 +103323,101 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 2, + "line": 4, }, "start": Object { - "column": 13, - "line": 3, + "column": 1, + "line": 4, }, }, "range": Array [ - 28, - 29, + 26, + 27, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 3, + "line": 4, }, "start": Object { - "column": 14, - "line": 3, + "column": 2, + "line": 4, }, }, "range": Array [ - 29, - 30, + 27, + 28, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 11, + "line": 4, }, "start": Object { - "column": 0, - "line": 5, + "column": 4, + "line": 4, }, }, "range": Array [ - 32, - 35, + 29, + 36, ], - "type": "Keyword", - "value": "var", + "type": "String", + "value": "'first'", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 12, + "line": 4, }, "start": Object { - "column": 4, - "line": 5, + "column": 11, + "line": 4, }, }, "range": Array [ 36, 37, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 2, "line": 5, }, "start": Object { - "column": 6, + "column": 1, "line": 5, }, }, "range": Array [ - 38, 39, + 40, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 3, "line": 5, }, "start": Object { - "column": 8, + "column": 2, "line": 5, }, }, @@ -97705,148 +103426,40 @@ Object { 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, + "line": 5, }, "start": Object { - "column": 12, - "line": 7, + "column": 4, + "line": 5, }, }, "range": Array [ - 73, - 78, + 42, + 50, ], - "type": "Identifier", - "value": "proto", + "type": "String", + "value": "'second'", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 8, + "line": 6, }, "start": Object { "column": 0, - "line": 8, + "line": 6, }, }, "range": Array [ - 79, - 80, + 51, + 52, ], "type": "Punctuator", "value": "}", @@ -97855,16 +103468,16 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 8, + "line": 6, }, "start": Object { "column": 1, - "line": 8, + "line": 6, }, }, "range": Array [ - 80, - 81, + 52, + 53, ], "type": "Punctuator", "value": ";", @@ -97874,10 +103487,11 @@ Object { } `; -exports[`javascript fixtures/objectLiteralDuplicateProperties/error-proto-string-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src 1`] = ` Object { "body": Array [ Object { + "directive": "use strict", "expression": Object { "loc": Object { "end": Object { @@ -97919,7 +103533,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 3, }, "start": Object { @@ -97927,83 +103541,10 @@ Object { "line": 3, }, }, - "name": "proto", - "range": Array [ - 19, - 24, - ], - "type": "Identifier", - }, - "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", - }, - ], - "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 { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, "name": "x", "range": Array [ - 36, - 37, + 19, + 20, ], "type": "Identifier", }, @@ -98011,11 +103552,11 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 8, + "line": 6, }, "start": Object { "column": 8, - "line": 5, + "line": 3, }, }, "properties": Array [ @@ -98024,57 +103565,58 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 12, - "line": 6, + "column": 4, + "line": 4, }, "start": Object { "column": 1, - "line": 6, + "line": 4, }, }, "range": Array [ - 43, - 54, + 26, + 29, ], - "raw": "\\"__proto__\\"", + "raw": "\\"y\\"", "type": "Literal", - "value": "__proto__", + "value": "y", }, "kind": "init", "loc": Object { "end": Object { - "column": 19, - "line": 6, + "column": 13, + "line": 4, }, "start": Object { "column": 1, - "line": 6, + "line": 4, }, }, "method": false, "range": Array [ - 43, - 61, + 26, + 38, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 19, - "line": 6, + "column": 13, + "line": 4, }, "start": Object { - "column": 14, - "line": 6, + "column": 6, + "line": 4, }, }, - "name": "proto", "range": Array [ - 56, - 61, + 31, + 38, ], - "type": "Identifier", + "raw": "\\"first\\"", + "type": "Literal", + "value": "first", }, }, Object { @@ -98082,79 +103624,80 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 12, - "line": 7, + "column": 4, + "line": 5, }, "start": Object { "column": 1, - "line": 7, + "line": 5, }, }, "range": Array [ - 64, - 75, + 41, + 44, ], - "raw": "\\"__proto__\\"", + "raw": "\\"y\\"", "type": "Literal", - "value": "__proto__", + "value": "y", }, "kind": "init", "loc": Object { "end": Object { - "column": 19, - "line": 7, + "column": 14, + "line": 5, }, "start": Object { "column": 1, - "line": 7, + "line": 5, }, }, "method": false, "range": Array [ - 64, - 82, + 41, + 54, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 19, - "line": 7, + "column": 14, + "line": 5, }, "start": Object { - "column": 14, - "line": 7, + "column": 6, + "line": 5, }, }, - "name": "proto", "range": Array [ - 77, - 82, + 46, + 54, ], - "type": "Identifier", + "raw": "\\"second\\"", + "type": "Literal", + "value": "second", }, }, ], "range": Array [ - 40, - 84, + 23, + 56, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { "column": 1, - "line": 8, + "line": 6, }, "start": Object { "column": 4, - "line": 5, + "line": 3, }, }, "range": Array [ - 36, - 84, + 19, + 56, ], "type": "VariableDeclarator", }, @@ -98163,16 +103706,16 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 8, + "line": 6, }, "start": Object { "column": 0, - "line": 5, + "line": 3, }, }, "range": Array [ - 32, - 85, + 15, + 57, ], "type": "VariableDeclaration", }, @@ -98180,7 +103723,7 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 8, + "line": 6, }, "start": Object { "column": 0, @@ -98189,7 +103732,7 @@ Object { }, "range": Array [ 0, - 85, + 57, ], "sourceType": "script", "tokens": Array [ @@ -98250,7 +103793,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 3, }, "start": Object { @@ -98260,25 +103803,25 @@ Object { }, "range": Array [ 19, - 24, + 20, ], "type": "Identifier", - "value": "proto", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 7, "line": 3, }, "start": Object { - "column": 10, + "column": 6, "line": 3, }, }, "range": Array [ - 25, - 26, + 21, + 22, ], "type": "Punctuator", "value": "=", @@ -98286,71 +103829,413 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 9, "line": 3, }, "start": Object { - "column": 12, + "column": 8, "line": 3, }, }, "range": Array [ - 27, - 28, + 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": 3, + "line": 4, }, "start": Object { "column": 13, - "line": 3, + "line": 4, }, }, "range": Array [ - 28, - 29, + 38, + 39, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "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": 3, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 5, }, }, "range": Array [ - 29, - 30, + 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", +} +`; + +exports[`javascript fixtures/objectLiteralShorthandMethods/invalid-method-no-braces.src 1`] = `"'{' expected."`; + +exports[`javascript fixtures/objectLiteralShorthandMethods/method-property.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "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": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "method": true, + "range": Array [ + 14, + 47, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 37, + 40, + ], + "type": "Identifier", + }, + "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", + }, + "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, + ], + "type": "FunctionExpression", + }, + }, + ], + "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", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 2, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 50, + ], + "type": "VariableDeclaration", + }, + ], + "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": 5, + "line": 1, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 32, - 35, + 0, + 3, ], "type": "Keyword", "value": "var", @@ -98359,16 +104244,16 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 5, + "line": 1, }, "start": Object { "column": 4, - "line": 5, + "line": 1, }, }, "range": Array [ - 36, - 37, + 4, + 5, ], "type": "Identifier", "value": "x", @@ -98377,16 +104262,16 @@ Object { "loc": Object { "end": Object { "column": 7, - "line": 5, + "line": 1, }, "start": Object { "column": 6, - "line": 5, + "line": 1, }, }, "range": Array [ - 38, - 39, + 6, + 7, ], "type": "Punctuator", "value": "=", @@ -98395,16 +104280,16 @@ Object { "loc": Object { "end": Object { "column": 9, - "line": 5, + "line": 1, }, "start": Object { "column": 8, - "line": 5, + "line": 1, }, }, "range": Array [ - 40, - 41, + 8, + 9, ], "type": "Punctuator", "value": "{", @@ -98412,143 +104297,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, - "line": 6, + "column": 7, + "line": 2, }, "start": Object { - "column": 1, - "line": 6, + "column": 4, + "line": 2, }, }, "range": Array [ - 43, - 54, + 14, + 17, ], - "type": "String", - "value": "\\"__proto__\\"", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 6, + "column": 8, + "line": 2, }, "start": Object { - "column": 12, - "line": 6, + "column": 7, + "line": 2, }, }, "range": Array [ - 54, - 55, + 17, + 18, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 6, + "column": 9, + "line": 2, }, "start": Object { - "column": 14, - "line": 6, + "column": 8, + "line": 2, }, }, "range": Array [ - 56, - 61, + 18, + 19, ], - "type": "Identifier", - "value": "proto", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 6, + "column": 11, + "line": 2, }, "start": Object { - "column": 19, - "line": 6, + "column": 10, + "line": 2, }, }, "range": Array [ - 61, - 62, + 20, + 21, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 7, + "column": 14, + "line": 3, }, "start": Object { - "column": 1, - "line": 7, + "column": 8, + "line": 3, }, }, "range": Array [ - 64, - 75, + 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": "String", - "value": "\\"__proto__\\"", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 7, + "column": 19, + "line": 3, }, "start": Object { - "column": 12, - "line": 7, + "column": 18, + "line": 3, }, }, "range": Array [ - 75, - 76, + 40, + 41, ], "type": "Punctuator", - "value": ":", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 7, + "column": 5, + "line": 4, }, "start": Object { - "column": 14, - "line": 7, + "column": 4, + "line": 4, }, }, "range": Array [ - 77, - 82, + 46, + 47, ], - "type": "Identifier", - "value": "proto", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 8, + "line": 5, }, "start": Object { "column": 0, - "line": 8, + "line": 5, }, }, "range": Array [ - 83, - 84, + 48, + 49, ], "type": "Punctuator", "value": "}", @@ -98557,16 +104460,16 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 8, + "line": 5, }, "start": Object { "column": 1, - "line": 8, + "line": 5, }, }, "range": Array [ - 84, - 85, + 49, + 50, ], "type": "Punctuator", "value": ";", @@ -98576,240 +104479,182 @@ Object { } `; -exports[`javascript fixtures/objectLiteralDuplicateProperties/strict-duplicate-properties.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method.src 1`] = ` Object { "body": Array [ Object { "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, "line": 1, }, }, + "operator": "=", "range": Array [ 0, - 12, + 28, ], - "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 { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, + "right": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, }, - "name": "x", - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 3, - }, + "start": Object { + "column": 4, + "line": 1, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 4, - }, - "start": Object { - "column": 1, - "line": 4, - }, - }, - "name": "y", - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - }, - "kind": "init", + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 11, - "line": 4, + "column": 10, + "line": 2, }, "start": Object { - "column": 1, - "line": 4, + "column": 4, + "line": 2, }, }, - "method": false, + "name": "method", "range": Array [ - 26, - 36, + 10, + 16, ], - "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", + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, }, }, - Object { - "computed": false, - "key": Object { + "method": true, + "range": Array [ + 10, + 26, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 5, + "line": 3, }, "start": Object { - "column": 1, - "line": 5, + "column": 13, + "line": 2, }, }, - "name": "y", "range": Array [ - 39, - 40, + 19, + 26, ], - "type": "Identifier", + "type": "BlockStatement", }, - "kind": "init", + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 12, - "line": 5, + "column": 5, + "line": 3, }, "start": Object { - "column": 1, - "line": 5, + "column": 10, + "line": 2, }, }, - "method": false, + "params": Array [], "range": Array [ - 39, - 50, + 16, + 26, ], - "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", - }, + "type": "FunctionExpression", }, - ], - "range": Array [ - 23, - 52, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 3, }, - }, + ], "range": Array [ - 19, - 52, + 4, + 28, ], - "type": "VariableDeclarator", + "type": "ObjectExpression", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { "column": 2, - "line": 6, + "line": 4, }, "start": Object { "column": 0, - "line": 3, + "line": 1, }, }, "range": Array [ - 15, - 53, + 0, + 29, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 2, - "line": 6, + "column": 3, + "line": 4, }, "start": Object { "column": 0, @@ -98818,14 +104663,14 @@ Object { }, "range": Array [ 0, - 53, + 30, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, + "column": 1, "line": 1, }, "start": Object { @@ -98835,97 +104680,43 @@ Object { }, "range": Array [ 0, - 12, + 1, ], - "type": "String", - "value": "\\"use strict\\"", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 3, "line": 1, }, "start": Object { - "column": 12, + "column": 2, "line": 1, }, }, "range": Array [ - 12, - 13, + 2, + 3, ], "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", + "value": "=", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 3, + "line": 1, }, "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, + "line": 1, }, }, "range": Array [ - 23, - 24, + 4, + 5, ], "type": "Punctuator", "value": "{", @@ -98933,143 +104724,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 10, + "line": 2, }, "start": Object { - "column": 1, - "line": 4, + "column": 4, + "line": 2, }, }, "range": Array [ - 26, - 27, + 10, + 16, ], "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": ":", + "value": "method", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 4, + "line": 2, }, "start": Object { - "column": 4, - "line": 4, + "column": 10, + "line": 2, }, }, "range": Array [ - 29, - 36, + 16, + 17, ], - "type": "String", - "value": "'first'", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 12, - "line": 4, + "line": 2, }, "start": Object { "column": 11, - "line": 4, + "line": 2, }, }, "range": Array [ - 36, - 37, + 17, + 18, ], "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", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 14, + "line": 2, }, "start": Object { - "column": 2, - "line": 5, + "column": 13, + "line": 2, }, }, "range": Array [ - 40, - 41, + 19, + 20, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 5, + "column": 5, + "line": 3, }, "start": Object { "column": 4, - "line": 5, + "line": 3, }, }, "range": Array [ - 42, - 50, + 25, + 26, ], - "type": "String", - "value": "'second'", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 4, }, "start": Object { "column": 0, - "line": 6, + "line": 4, }, }, "range": Array [ - 51, - 52, + 27, + 28, ], "type": "Punctuator", "value": "}", @@ -99078,16 +104833,34 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 6, + "line": 4, }, "start": Object { "column": 1, - "line": 6, + "line": 4, }, }, "range": Array [ - 52, - 53, + 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": ";", @@ -99097,242 +104870,182 @@ Object { } `; -exports[`javascript fixtures/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-named-get.src 1`] = ` Object { "body": Array [ Object { "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, "line": 1, }, }, + "operator": "=", "range": Array [ 0, - 12, + 25, ], - "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 { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, + "right": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, }, - "name": "x", - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 8, - "line": 3, - }, + "start": Object { + "column": 4, + "line": 1, }, - "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", + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 7, + "line": 2, }, "start": Object { - "column": 1, - "line": 4, + "column": 4, + "line": 2, }, }, - "method": false, + "name": "get", "range": Array [ - 26, - 38, + 10, + 13, ], - "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", + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, }, }, - Object { - "computed": false, - "key": Object { + "method": true, + "range": Array [ + 10, + 23, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 4, - "line": 5, + "column": 5, + "line": 3, }, "start": Object { - "column": 1, - "line": 5, + "column": 10, + "line": 2, }, }, "range": Array [ - 41, - 44, + 16, + 23, ], - "raw": "\\"y\\"", - "type": "Literal", - "value": "y", + "type": "BlockStatement", }, - "kind": "init", + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 14, - "line": 5, + "column": 5, + "line": 3, }, "start": Object { - "column": 1, - "line": 5, + "column": 7, + "line": 2, }, }, - "method": false, + "params": Array [], "range": Array [ - 41, - 54, + 13, + 23, ], - "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", - }, + "type": "FunctionExpression", }, - ], - "range": Array [ - 23, - 56, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 3, }, - }, + ], "range": Array [ - 19, - 56, + 4, + 25, ], - "type": "VariableDeclarator", + "type": "ObjectExpression", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { "column": 2, - "line": 6, + "line": 4, }, "start": Object { "column": 0, - "line": 3, + "line": 1, }, }, "range": Array [ - 15, - 57, + 0, + 26, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 2, - "line": 6, + "column": 3, + "line": 4, }, "start": Object { "column": 0, @@ -99341,14 +105054,14 @@ Object { }, "range": Array [ 0, - 57, + 27, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, + "column": 1, "line": 1, }, "start": Object { @@ -99358,241 +105071,151 @@ Object { }, "range": Array [ 0, - 12, + 1, ], - "type": "String", - "value": "\\"use strict\\"", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 3, "line": 1, }, "start": Object { - "column": 12, + "column": 2, "line": 1, }, }, "range": Array [ - 12, - 13, + 2, + 3, ], "type": "Punctuator", - "value": ";", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 3, + "column": 5, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 4, + "line": 1, }, }, "range": Array [ - 15, - 18, + 4, + 5, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 7, + "line": 2, }, "start": Object { "column": 4, - "line": 3, + "line": 2, }, }, "range": Array [ - 19, - 20, + 10, + 13, ], "type": "Identifier", - "value": "x", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 8, + "line": 2, }, "start": Object { - "column": 6, - "line": 3, + "column": 7, + "line": 2, }, }, "range": Array [ - 21, - 22, + 13, + 14, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 9, - "line": 3, + "line": 2, }, "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, + "line": 2, }, }, "range": Array [ - 29, - 30, + 14, + 15, ], "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\\"", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 4, + "column": 11, + "line": 2, }, "start": Object { - "column": 13, - "line": 4, + "column": 10, + "line": 2, }, }, "range": Array [ - 38, - 39, + 16, + 17, ], "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\\"", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 5, + "line": 3, }, "start": Object { "column": 4, - "line": 5, + "line": 3, }, }, "range": Array [ - 44, - 45, + 22, + 23, ], "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\\"", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 4, }, "start": Object { "column": 0, - "line": 6, + "line": 4, }, }, "range": Array [ - 55, - 56, + 24, + 25, ], "type": "Punctuator", "value": "}", @@ -99601,16 +105224,34 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 6, + "line": 4, }, "start": Object { "column": 1, - "line": 6, + "line": 4, }, }, "range": Array [ - 56, - 57, + 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": ";", @@ -99620,188 +105261,148 @@ Object { } `; -exports[`javascript fixtures/objectLiteralShorthandMethods/invalid-method-no-braces.src 1`] = `"'{' expected."`; - -exports[`javascript fixtures/objectLiteralShorthandMethods/method-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-named-set.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, - "name": "x", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, + "name": "x", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, + "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, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - "kind": "init", + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 7, + "line": 2, }, "start": Object { "column": 4, "line": 2, }, }, - "method": true, + "name": "set", "range": Array [ - 14, - 47, + 10, + 13, ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "bar", - "range": Array [ - 37, - 40, - ], - "type": "Identifier", - }, - "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", - }, - "expression": false, - "generator": false, - "id": null, + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "method": true, + "range": Array [ + 10, + 23, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { "column": 5, - "line": 4, + "line": 3, }, "start": Object { - "column": 7, + "column": 10, "line": 2, }, }, - "params": Array [], "range": Array [ - 17, - 47, + 16, + 23, ], - "type": "FunctionExpression", + "type": "BlockStatement", }, + "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, + ], + "type": "FunctionExpression", }, - ], - "range": Array [ - 8, - 49, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 1, }, - }, + ], "range": Array [ 4, - 49, + 25, ], - "type": "VariableDeclarator", + "type": "ObjectExpression", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { "column": 2, - "line": 5, + "line": 4, }, "start": Object { "column": 0, @@ -99810,15 +105411,32 @@ Object { }, "range": Array [ 0, - 50, + 26, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 6, + "column": 3, + "line": 4, }, "start": Object { "column": 0, @@ -99827,14 +105445,14 @@ Object { }, "range": Array [ 0, - 51, + 27, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -99844,25 +105462,7 @@ Object { }, "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, + 1, ], "type": "Identifier", "value": "x", @@ -99870,17 +105470,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 3, "line": 1, }, "start": Object { - "column": 6, + "column": 2, "line": 1, }, }, "range": Array [ - 6, - 7, + 2, + 3, ], "type": "Punctuator", "value": "=", @@ -99888,17 +105488,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 4, "line": 1, }, }, "range": Array [ - 8, - 9, + 4, + 5, ], "type": "Punctuator", "value": "{", @@ -99915,11 +105515,11 @@ Object { }, }, "range": Array [ - 14, - 17, + 10, + 13, ], "type": "Identifier", - "value": "foo", + "value": "set", }, Object { "loc": Object { @@ -99933,8 +105533,8 @@ Object { }, }, "range": Array [ - 17, - 18, + 13, + 14, ], "type": "Punctuator", "value": "(", @@ -99951,8 +105551,8 @@ Object { }, }, "range": Array [ - 18, - 19, + 14, + 15, ], "type": "Punctuator", "value": ")", @@ -99969,8 +105569,8 @@ Object { }, }, "range": Array [ - 20, - 21, + 16, + 17, ], "type": "Punctuator", "value": "{", @@ -99978,71 +105578,35 @@ Object { 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, + "column": 5, "line": 3, }, "start": Object { - "column": 18, + "column": 4, "line": 3, }, }, "range": Array [ - 40, - 41, + 22, + 23, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 4, }, "start": Object { - "column": 4, + "column": 0, "line": 4, }, }, "range": Array [ - 46, - 47, + 24, + 25, ], "type": "Punctuator", "value": "}", @@ -100050,35 +105614,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 2, + "line": 4, }, "start": Object { - "column": 0, - "line": 5, + "column": 1, + "line": 4, }, }, "range": Array [ - 48, - 49, + 25, + 26, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 3, + "line": 4, }, "start": Object { - "column": 1, - "line": 5, + "column": 2, + "line": 4, }, }, "range": Array [ - 49, - 50, + 26, + 27, ], "type": "Punctuator", "value": ";", @@ -100088,7 +105652,7 @@ Object { } `; -exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-with-argument.src 1`] = ` Object { "body": Array [ Object { @@ -100114,7 +105678,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 5, }, "start": Object { "column": 0, @@ -100124,13 +105688,13 @@ Object { "operator": "=", "range": Array [ 0, - 28, + 33, ], "right": Object { "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 5, }, "start": Object { "column": 4, @@ -100162,7 +105726,7 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 3, + "line": 4, }, "start": Object { "column": 4, @@ -100172,7 +105736,7 @@ Object { "method": true, "range": Array [ 10, - 26, + 31, ], "shorthand": false, "type": "Property", @@ -100183,16 +105747,16 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 3, + "line": 4, }, "start": Object { - "column": 13, + "column": 17, "line": 2, }, }, "range": Array [ - 19, - 26, + 23, + 31, ], "type": "BlockStatement", }, @@ -100202,17 +105766,36 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 3, + "line": 4, }, "start": Object { "column": 10, "line": 2, }, }, - "params": Array [], + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "test", + "range": Array [ + 17, + 21, + ], + "type": "Identifier", + }, + ], "range": Array [ 16, - 26, + 31, ], "type": "FunctionExpression", }, @@ -100220,7 +105803,7 @@ Object { ], "range": Array [ 4, - 28, + 33, ], "type": "ObjectExpression", }, @@ -100229,7 +105812,7 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 4, + "line": 5, }, "start": Object { "column": 0, @@ -100238,7 +105821,7 @@ Object { }, "range": Array [ 0, - 29, + 34, ], "type": "ExpressionStatement", }, @@ -100246,16 +105829,16 @@ Object { "loc": Object { "end": Object { "column": 3, - "line": 4, + "line": 5, }, "start": Object { "column": 2, - "line": 4, + "line": 5, }, }, "range": Array [ - 29, - 30, + 34, + 35, ], "type": "EmptyStatement", }, @@ -100263,7 +105846,7 @@ Object { "loc": Object { "end": Object { "column": 3, - "line": 4, + "line": 5, }, "start": Object { "column": 0, @@ -100272,7 +105855,7 @@ Object { }, "range": Array [ 0, - 30, + 35, ], "sourceType": "script", "tokens": Array [ @@ -100369,7 +105952,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 15, "line": 2, }, "start": Object { @@ -100379,7 +105962,25 @@ Object { }, "range": Array [ 17, - 18, + 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": ")", @@ -100387,17 +105988,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 18, "line": 2, }, "start": Object { - "column": 13, + "column": 17, "line": 2, }, }, "range": Array [ - 19, - 20, + 23, + 24, ], "type": "Punctuator", "value": "{", @@ -100406,16 +106007,16 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 3, + "line": 4, }, "start": Object { "column": 4, - "line": 3, + "line": 4, }, }, "range": Array [ - 25, - 26, + 30, + 31, ], "type": "Punctuator", "value": "}", @@ -100424,16 +106025,16 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 5, }, "start": Object { "column": 0, - "line": 4, + "line": 5, }, }, "range": Array [ - 27, - 28, + 32, + 33, ], "type": "Punctuator", "value": "}", @@ -100442,16 +106043,16 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 4, + "line": 5, }, "start": Object { "column": 1, - "line": 4, + "line": 5, }, }, "range": Array [ - 28, - 29, + 33, + 34, ], "type": "Punctuator", "value": ";", @@ -100460,16 +106061,16 @@ Object { "loc": Object { "end": Object { "column": 3, - "line": 4, + "line": 5, }, "start": Object { "column": 2, - "line": 4, + "line": 5, }, }, "range": Array [ - 29, - 30, + 34, + 35, ], "type": "Punctuator", "value": ";", @@ -100479,7 +106080,7 @@ Object { } `; -exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-named-get.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-with-string-name.src 1`] = ` Object { "body": Array [ Object { @@ -100515,7 +106116,7 @@ Object { "operator": "=", "range": Array [ 0, - 25, + 30, ], "right": Object { "loc": Object { @@ -100534,7 +106135,7 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 2, }, "start": Object { @@ -100542,12 +106143,13 @@ Object { "line": 2, }, }, - "name": "get", "range": Array [ 10, - 13, + 18, ], - "type": "Identifier", + "raw": "\\"method\\"", + "type": "Literal", + "value": "method", }, "kind": "init", "loc": Object { @@ -100563,7 +106165,7 @@ Object { "method": true, "range": Array [ 10, - 23, + 28, ], "shorthand": false, "type": "Property", @@ -100577,13 +106179,13 @@ Object { "line": 3, }, "start": Object { - "column": 10, + "column": 15, "line": 2, }, }, "range": Array [ - 16, - 23, + 21, + 28, ], "type": "BlockStatement", }, @@ -100596,14 +106198,14 @@ Object { "line": 3, }, "start": Object { - "column": 7, + "column": 12, "line": 2, }, }, "params": Array [], "range": Array [ - 13, - 23, + 18, + 28, ], "type": "FunctionExpression", }, @@ -100611,7 +106213,7 @@ Object { ], "range": Array [ 4, - 25, + 30, ], "type": "ObjectExpression", }, @@ -100629,7 +106231,7 @@ Object { }, "range": Array [ 0, - 26, + 31, ], "type": "ExpressionStatement", }, @@ -100645,8 +106247,8 @@ Object { }, }, "range": Array [ - 26, - 27, + 31, + 32, ], "type": "EmptyStatement", }, @@ -100663,7 +106265,7 @@ Object { }, "range": Array [ 0, - 27, + 32, ], "sourceType": "script", "tokens": Array [ @@ -100724,7 +106326,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 2, }, "start": Object { @@ -100734,25 +106336,25 @@ Object { }, "range": Array [ 10, - 13, + 18, ], - "type": "Identifier", - "value": "get", + "type": "String", + "value": "\\"method\\"", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 13, "line": 2, }, "start": Object { - "column": 7, + "column": 12, "line": 2, }, }, "range": Array [ - 13, - 14, + 18, + 19, ], "type": "Punctuator", "value": "(", @@ -100760,17 +106362,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 14, "line": 2, }, "start": Object { - "column": 8, + "column": 13, "line": 2, }, }, "range": Array [ - 14, - 15, + 19, + 20, ], "type": "Punctuator", "value": ")", @@ -100778,17 +106380,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 16, "line": 2, }, "start": Object { - "column": 10, + "column": 15, "line": 2, }, }, "range": Array [ - 16, - 17, + 21, + 22, ], "type": "Punctuator", "value": "{", @@ -100805,8 +106407,8 @@ Object { }, }, "range": Array [ - 22, - 23, + 27, + 28, ], "type": "Punctuator", "value": "}", @@ -100823,8 +106425,8 @@ Object { }, }, "range": Array [ - 24, - 25, + 29, + 30, ], "type": "Punctuator", "value": "}", @@ -100841,8 +106443,8 @@ Object { }, }, "range": Array [ - 25, - 26, + 30, + 31, ], "type": "Punctuator", "value": ";", @@ -100859,8 +106461,8 @@ Object { }, }, "range": Array [ - 26, - 27, + 31, + 32, ], "type": "Punctuator", "value": ";", @@ -100870,148 +106472,187 @@ Object { } `; -exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-named-set.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/string-name-method-property.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "name": "x", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", }, - "name": "x", - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - }, - "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, + "init": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { + "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": 7, - "line": 2, + "column": 5, + "line": 4, }, "start": Object { "column": 4, "line": 2, }, - }, - "name": "set", - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": true, - "range": Array [ - 10, - 23, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + }, + "method": true, + "range": Array [ + 14, + 49, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 39, + 42, + ], + "type": "Identifier", + }, + "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", + }, + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { "column": 5, - "line": 3, + "line": 4, }, "start": Object { - "column": 10, + "column": 9, "line": 2, }, }, + "params": Array [], "range": Array [ - 16, - 23, + 19, + 49, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, + "type": "FunctionExpression", }, - "params": Array [], - "range": Array [ - 13, - 23, - ], - "type": "FunctionExpression", }, + ], + "range": Array [ + 8, + 51, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, }, - ], + "start": Object { + "column": 4, + "line": 1, + }, + }, "range": Array [ 4, - 25, + 51, ], - "type": "ObjectExpression", + "type": "VariableDeclarator", }, - "type": "AssignmentExpression", - }, + ], + "kind": "var", "loc": Object { "end": Object { "column": 2, - "line": 4, + "line": 5, }, "start": Object { "column": 0, @@ -101020,32 +106661,15 @@ Object { }, "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, + 52, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 0, + "line": 6, }, "start": Object { "column": 0, @@ -101054,14 +106678,14 @@ Object { }, "range": Array [ 0, - 27, + 53, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -101071,7 +106695,25 @@ Object { }, "range": Array [ 0, - 1, + 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", @@ -101079,17 +106721,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 3, + "column": 7, "line": 1, }, "start": Object { - "column": 2, + "column": 6, "line": 1, }, }, "range": Array [ - 2, - 3, + 6, + 7, ], "type": "Punctuator", "value": "=", @@ -101097,17 +106739,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { - "column": 4, + "column": 8, "line": 1, }, }, "range": Array [ - 4, - 5, + 8, + 9, ], "type": "Punctuator", "value": "{", @@ -101115,7 +106757,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 2, }, "start": Object { @@ -101124,26 +106766,26 @@ Object { }, }, "range": Array [ - 10, - 13, + 14, + 19, ], - "type": "Identifier", - "value": "set", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 2, }, "start": Object { - "column": 7, + "column": 9, "line": 2, }, }, "range": Array [ - 13, - 14, + 19, + 20, ], "type": "Punctuator", "value": "(", @@ -101151,17 +106793,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 11, "line": 2, }, "start": Object { - "column": 8, + "column": 10, "line": 2, }, }, "range": Array [ - 14, - 15, + 20, + 21, ], "type": "Punctuator", "value": ")", @@ -101169,17 +106811,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 13, "line": 2, }, "start": Object { - "column": 10, + "column": 12, "line": 2, }, }, "range": Array [ - 16, - 17, + 22, + 23, ], "type": "Punctuator", "value": "{", @@ -101187,35 +106829,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 14, "line": 3, }, "start": Object { - "column": 4, + "column": 8, "line": 3, }, }, "range": Array [ - 22, - 23, + 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": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 5, "line": 4, }, "start": Object { - "column": 0, + "column": 4, "line": 4, }, }, "range": Array [ - 24, - 25, + 48, + 49, ], "type": "Punctuator", "value": "}", @@ -101223,35 +106901,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 1, + "line": 5, }, "start": Object { - "column": 1, - "line": 4, + "column": 0, + "line": 5, }, }, "range": Array [ - 25, - 26, + 50, + 51, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 2, + "line": 5, }, "start": Object { - "column": 2, - "line": 4, + "column": 1, + "line": 5, }, }, "range": Array [ - 26, - 27, + 51, + 52, ], "type": "Punctuator", "value": ";", @@ -101261,201 +106939,387 @@ Object { } `; -exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-with-argument.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandProperties/shorthand-properties.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "init": null, "loc": Object { "end": Object { - "column": 1, + "column": 7, "line": 1, }, "start": Object { - "column": 0, + "column": 4, "line": 1, }, }, - "name": "x", "range": Array [ - 0, - 1, + 4, + 7, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "get", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", }, - "start": Object { - "column": 0, - "line": 1, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, }, + "range": Array [ + 13, + 16, + ], + "type": "VariableDeclarator", }, - "operator": "=", - "range": Array [ - 0, - 33, - ], - "right": Object { + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "set", + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + }, + "init": null, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 7, + "line": 3, }, "start": Object { "column": 4, - "line": 1, + "line": 3, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { + "range": Array [ + 22, + 25, + ], + "type": "VariableDeclarator", + }, + ], + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "name": "x", + "range": Array [ + 32, + 33, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "name": "foo", + "range": Array [ + 42, + 45, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 7, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "method": false, + "range": Array [ + 42, + 45, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "name": "foo", + "range": Array [ + 42, + 45, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "name": "get", + "range": Array [ + 51, + 54, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 7, + "line": 7, }, "start": Object { "column": 4, - "line": 2, + "line": 7, }, }, - "name": "method", + "method": false, "range": Array [ - 10, - 16, + 51, + 54, ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "name": "get", + "range": Array [ + 51, + 54, + ], + "type": "Identifier", }, }, - "method": true, - "range": Array [ - 10, - 31, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 7, + "line": 8, }, "start": Object { - "column": 17, - "line": 2, + "column": 4, + "line": 8, }, }, + "name": "set", "range": Array [ - 23, - 31, + 60, + 63, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, + "kind": "init", "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 7, + "line": 8, }, "start": Object { - "column": 10, - "line": 2, + "column": 4, + "line": 8, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "test", - "range": Array [ - 17, - 21, - ], - "type": "Identifier", - }, - ], + "method": false, "range": Array [ - 16, - 31, + 60, + 63, ], - "type": "FunctionExpression", + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "name": "set", + "range": Array [ + 60, + 63, + ], + "type": "Identifier", + }, }, + ], + "range": Array [ + 36, + 65, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 9, }, - ], + "start": Object { + "column": 4, + "line": 5, + }, + }, "range": Array [ - 4, - 33, + 32, + 65, ], - "type": "ObjectExpression", + "type": "VariableDeclarator", }, - "type": "AssignmentExpression", - }, + ], + "kind": "var", "loc": Object { "end": Object { "column": 2, - "line": 5, + "line": 9, }, "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, + 28, + 66, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 0, + "line": 10, }, "start": Object { "column": 0, @@ -101464,14 +107328,14 @@ Object { }, "range": Array [ 0, - 35, + 67, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -101481,51 +107345,51 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 7, "line": 1, }, "start": Object { - "column": 2, + "column": 4, "line": 1, }, }, "range": Array [ - 2, - 3, + 4, + 7, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { - "column": 4, + "column": 7, "line": 1, }, }, "range": Array [ - 4, - 5, + 7, + 8, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 7, "line": 2, }, "start": Object { @@ -101534,20 +107398,20 @@ Object { }, }, "range": Array [ - 10, + 13, 16, ], "type": "Identifier", - "value": "method", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 2, }, "start": Object { - "column": 10, + "column": 7, "line": 2, }, }, @@ -101556,316 +107420,293 @@ Object { 17, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 11, - "line": 2, + "column": 4, + "line": 3, }, }, "range": Array [ - 17, - 21, + 22, + 25, ], "type": "Identifier", - "value": "test", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 8, + "line": 3, }, "start": Object { - "column": 15, - "line": 2, + "column": 7, + "line": 3, }, }, "range": Array [ - 21, - 22, + 25, + 26, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 3, + "line": 5, }, "start": Object { - "column": 17, - "line": 2, + "column": 0, + "line": 5, }, }, "range": Array [ - 23, - 24, + 28, + 31, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 4, + "line": 5, }, "start": Object { "column": 4, - "line": 4, + "line": 5, }, }, "range": Array [ - 30, - 31, + 32, + 33, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 7, "line": 5, }, "start": Object { - "column": 0, + "column": 6, "line": 5, }, }, "range": Array [ - 32, - 33, + 34, + 35, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 9, "line": 5, }, "start": Object { - "column": 1, + "column": 8, "line": 5, }, }, "range": Array [ - 33, - 34, + 36, + 37, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 7, + "line": 6, }, "start": Object { - "column": 2, - "line": 5, + "column": 4, + "line": 6, }, }, "range": Array [ - 34, - 35, + 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": ";", + "value": ",", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-with-string-name.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 0, - 1, - ], - "type": "Identifier", + "loc": Object { + "end": Object { + "column": 7, + "line": 7, }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "start": Object { + "column": 4, + "line": 7, }, - "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, - "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", - }, - "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, - ], - "type": "FunctionExpression", - }, - }, - ], - "range": Array [ - 4, - 30, - ], - "type": "ObjectExpression", + }, + "range": Array [ + 51, + 54, + ], + "type": "Identifier", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 7, + }, + "start": Object { + "column": 7, + "line": 7, }, - "type": "AssignmentExpression", }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": ",", + }, + Object { "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 7, + "line": 8, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 8, }, }, "range": Array [ - 0, - 31, + 60, + 63, ], - "type": "ExpressionStatement", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 4, + "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": 4, + "line": 9, + }, + "start": Object { + "column": 1, + "line": 9, }, }, "range": Array [ - 31, - 32, + 65, + 66, ], - "type": "EmptyStatement", + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/octalLiterals/invalid.src 1`] = `"';' expected."`; + +exports[`javascript fixtures/octalLiterals/lowercase.src 1`] = ` +Object { + "body": Array [ + Object { + "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", }, ], "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -101874,14 +107715,14 @@ Object { }, "range": Array [ 0, - 32, + 7, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 5, "line": 1, }, "start": Object { @@ -101891,187 +107732,292 @@ Object { }, "range": Array [ 0, - 1, + 5, ], - "type": "Identifier", - "value": "x", + "type": "Numeric", + "value": "0o717", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 6, "line": 1, }, "start": Object { - "column": 2, + "column": 5, "line": 1, }, }, "range": Array [ - 2, - 3, + 5, + 6, ], "type": "Punctuator", - "value": "=", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/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": 5, + "column": 13, "line": 1, }, "start": Object { - "column": 4, + "column": 0, "line": 1, }, }, "range": Array [ - 4, - 5, + 0, + 13, ], - "type": "Punctuator", - "value": "{", + "type": "ExpressionStatement", }, Object { + "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": 12, + "column": 6, "line": 2, }, "start": Object { - "column": 4, + "column": 0, "line": 2, }, }, "range": Array [ - 10, - 18, + 14, + 20, ], - "type": "String", - "value": "\\"method\\"", + "type": "ExpressionStatement", + }, + ], + "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": 13, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 18, - 19, + 0, + 12, ], - "type": "Punctuator", - "value": "(", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 13, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 19, - 20, + 12, + 13, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 5, "line": 2, }, "start": Object { - "column": 15, + "column": 0, "line": 2, }, }, "range": Array [ - 21, - 22, + 14, + 19, ], - "type": "Punctuator", - "value": "{", + "type": "Numeric", + "value": "0O717", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 6, + "line": 2, }, "start": Object { - "column": 4, - "line": 3, + "column": 5, + "line": 2, }, }, "range": Array [ - 27, - 28, + 19, + 20, ], "type": "Punctuator", - "value": "}", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/octalLiterals/uppercase.src 1`] = ` +Object { + "body": Array [ Object { + "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": 1, - "line": 4, + "column": 6, + "line": 1, }, "start": Object { "column": 0, - "line": 4, + "line": 1, }, }, "range": Array [ - 29, - 30, + 0, + 6, ], - "type": "Punctuator", - "value": "}", + "type": "ExpressionStatement", + }, + ], + "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": 2, - "line": 4, + "column": 5, + "line": 1, }, "start": Object { - "column": 1, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 30, - 31, + 0, + 5, ], - "type": "Punctuator", - "value": ";", + "type": "Numeric", + "value": "0O717", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 6, + "line": 1, }, "start": Object { - "column": 2, - "line": 4, + "column": 5, + "line": 1, }, }, "range": Array [ - 31, - 32, + 5, + 6, ], "type": "Punctuator", "value": ";", @@ -102081,7 +108027,7 @@ Object { } `; -exports[`javascript fixtures/objectLiteralShorthandMethods/string-name-method-property.src 1`] = ` +exports[`javascript fixtures/regex/regexp-simple.src 1`] = ` Object { "body": Array [ Object { @@ -102090,7 +108036,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { @@ -102098,152 +108044,40 @@ Object { "line": 1, }, }, - "name": "x", + "name": "foo", "range": Array [ 4, - 5, + 7, ], "type": "Identifier", }, "init": Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 16, + "line": 1, }, "start": Object { - "column": 8, + "column": 10, "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, - "range": Array [ - 14, - 49, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "bar", - "range": Array [ - 39, - 42, - ], - "type": "Identifier", - }, - "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", - }, - "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, - ], - "type": "FunctionExpression", - }, - }, - ], "range": Array [ - 8, - 51, + 10, + 16, ], - "type": "ObjectExpression", + "raw": "/foo./", + "regex": Object { + "flags": "", + "pattern": "foo.", + }, + "type": "Literal", + "value": Object {}, }, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 16, + "line": 1, }, "start": Object { "column": 4, @@ -102252,7 +108086,7 @@ Object { }, "range": Array [ 4, - 51, + 16, ], "type": "VariableDeclarator", }, @@ -102260,8 +108094,8 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 17, + "line": 1, }, "start": Object { "column": 0, @@ -102270,7 +108104,7 @@ Object { }, "range": Array [ 0, - 52, + 17, ], "type": "VariableDeclaration", }, @@ -102278,7 +108112,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 2, }, "start": Object { "column": 0, @@ -102287,7 +108121,7 @@ Object { }, "range": Array [ 0, - 53, + 18, ], "sourceType": "script", "tokens": Array [ @@ -102312,7 +108146,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { @@ -102322,28 +108156,10 @@ Object { }, "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": "=", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { @@ -102361,184 +108177,44 @@ Object { 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": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 16, + "line": 1, }, "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, + "line": 1, }, }, "range": Array [ - 48, - 49, + 10, + 16, ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, + "regex": Object { + "flags": "", + "pattern": "foo.", }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "}", + "type": "RegularExpression", + "value": "/foo./", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 17, + "line": 1, }, "start": Object { - "column": 1, - "line": 5, + "column": 16, + "line": 1, }, }, "range": Array [ - 51, - 52, + 16, + 17, ], "type": "Punctuator", "value": ";", @@ -102548,7 +108224,7 @@ Object { } `; -exports[`javascript fixtures/objectLiteralShorthandProperties/shorthand-properties.src 1`] = ` +exports[`javascript fixtures/regexUFlag/regex-u-extended-escape.src 1`] = ` Object { "body": Array [ Object { @@ -102557,7 +108233,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -102565,99 +108241,49 @@ Object { "line": 1, }, }, - "name": "foo", + "name": "x", "range": Array [ 4, - 7, + 5, ], "type": "Identifier", }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "VariableDeclarator", - }, - Object { - "id": Object { + "init": Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 40, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 8, + "line": 1, }, }, - "name": "get", "range": Array [ - 13, - 16, + 8, + 40, ], - "type": "Identifier", - }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "VariableDeclarator", - }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, + "raw": "/[\\\\u{0000000000000061}-\\\\u{7A}]/u", + "regex": Object { + "flags": "u", + "pattern": "[\\\\u{0000000000000061}-\\\\u{7A}]", }, - "name": "set", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", + "type": "Literal", + "value": Object {}, }, - "init": null, "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 40, + "line": 1, }, "start": Object { "column": 4, - "line": 3, + "line": 1, }, }, "range": Array [ - 22, - 25, + 4, + 40, ], "type": "VariableDeclarator", }, @@ -102665,8 +108291,8 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 41, + "line": 1, }, "start": Object { "column": 0, @@ -102675,234 +108301,186 @@ Object { }, "range": Array [ 0, - 26, + 41, ], "type": "VariableDeclaration", }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 42, + ], + "sourceType": "script", + "tokens": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "name": "x", - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "method": false, - "range": Array [ - 42, - 45, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "name": "foo", - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": "get", - "range": Array [ - 51, - 54, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "method": false, - "range": Array [ - 51, - 54, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "name": "get", - "range": Array [ - 51, - 54, - ], - "type": "Identifier", - }, + "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", +} +`; + +exports[`javascript fixtures/regexUFlag/regex-u-invalid-extended-escape.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "name": "set", - "range": Array [ - 60, - 63, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "method": false, - "range": Array [ - 60, - 63, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "name": "set", - "range": Array [ - 60, - 63, - ], - "type": "Identifier", - }, + "start": Object { + "column": 4, + "line": 1, }, + }, + "name": "x", + "range": Array [ + 4, + 5, ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, "range": Array [ - 36, - 65, + 8, + 21, ], - "type": "ObjectExpression", + "raw": "/\\\\u{110000}/u", + "regex": Object { + "flags": "u", + "pattern": "\\\\u{110000}", + }, + "type": "Literal", + "value": null, }, "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 21, + "line": 1, }, "start": Object { "column": 4, - "line": 5, + "line": 1, }, }, "range": Array [ - 32, - 65, + 4, + 21, ], "type": "VariableDeclarator", }, @@ -102910,17 +108488,17 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 22, + "line": 1, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 28, - 66, + 0, + 22, ], "type": "VariableDeclaration", }, @@ -102928,7 +108506,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 10, + "line": 2, }, "start": Object { "column": 0, @@ -102937,7 +108515,7 @@ Object { }, "range": Array [ 0, - 67, + 23, ], "sourceType": "script", "tokens": Array [ @@ -102962,7 +108540,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -102972,115 +108550,186 @@ Object { }, "range": Array [ 4, - 7, + 5, ], "type": "Identifier", - "value": "foo", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 7, "line": 1, }, "start": Object { - "column": 7, + "column": 6, "line": 1, }, }, "range": Array [ + 6, 7, - 8, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 13, - 16, + 8, + 21, ], - "type": "Identifier", - "value": "get", + "regex": Object { + "flags": "u", + "pattern": "\\\\u{110000}", + }, + "type": "RegularExpression", + "value": "/\\\\u{110000}/u", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 16, - 17, + 21, + 22, ], "type": "Punctuator", - "value": ",", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/regexUFlag/regex-u-simple.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "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": Object {}, + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 16, + ], + "type": "VariableDeclarator", }, - }, - "range": Array [ - 22, - 25, ], - "type": "Identifier", - "value": "set", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 25, - 26, + 0, + 17, ], - "type": "Punctuator", - "value": ";", + "type": "VariableDeclaration", + }, + ], + "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": 5, + "line": 1, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 28, - 31, + 0, + 3, ], "type": "Keyword", "value": "var", @@ -103088,35 +108737,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 7, + "line": 1, }, "start": Object { "column": 4, - "line": 5, + "line": 1, }, }, "range": Array [ - 32, - 33, + 4, + 7, ], "type": "Identifier", - "value": "x", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 9, + "line": 1, }, "start": Object { - "column": 6, - "line": 5, + "column": 8, + "line": 1, }, }, "range": Array [ - 34, - 35, + 8, + 9, ], "type": "Punctuator", "value": "=", @@ -103124,143 +108773,236 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 16, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 10, + "line": 1, }, }, "range": Array [ - 36, - 37, + 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": "{", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/regexYFlag/regexp-y-simple.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "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": Object {}, + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 16, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 7, - "line": 6, + "column": 17, + "line": 1, }, "start": Object { - "column": 4, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 42, - 45, + 0, + 17, ], - "type": "Identifier", - "value": "foo", + "type": "VariableDeclaration", }, + ], + "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": 8, - "line": 6, + "column": 3, + "line": 1, }, "start": Object { - "column": 7, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 45, - 46, + 0, + 3, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { "column": 7, - "line": 7, + "line": 1, }, "start": Object { "column": 4, - "line": 7, + "line": 1, }, }, "range": Array [ - 51, - 54, + 4, + 7, ], "type": "Identifier", - "value": "get", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 7, + "column": 9, + "line": 1, }, "start": Object { - "column": 7, - "line": 7, + "column": 8, + "line": 1, }, }, "range": Array [ - 54, - 55, + 8, + 9, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 8, + "column": 16, + "line": 1, }, "start": Object { - "column": 4, - "line": 8, + "column": 10, + "line": 1, }, }, "range": Array [ - 60, - 63, + 10, + 16, ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, + "regex": Object { + "flags": "y", + "pattern": "foo", }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "}", + "type": "RegularExpression", + "value": "/foo/y", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 17, + "line": 1, }, "start": Object { - "column": 1, - "line": 9, + "column": 16, + "line": 1, }, }, "range": Array [ - 65, - 66, + 16, + 17, ], "type": "Punctuator", "value": ";", @@ -103270,34 +109012,52 @@ Object { } `; -exports[`javascript fixtures/octalLiterals/invalid.src 1`] = `"';' expected."`; - -exports[`javascript fixtures/octalLiterals/lowercase.src 1`] = ` +exports[`javascript fixtures/restParams/basic-rest.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 5, + "column": 22, "line": 1, }, "start": Object { - "column": 0, + "column": 20, "line": 1, }, }, "range": Array [ - 0, - 5, + 20, + 22, ], - "raw": "0o717", - "type": "Literal", - "value": 463, + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 6, + "column": 22, "line": 1, }, "start": Object { @@ -103305,17 +109065,89 @@ Object { "line": 1, }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 18, + ], + "type": "RestElement", + }, + ], "range": Array [ 0, - 6, + 22, ], - "type": "ExpressionStatement", + "type": "FunctionDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { "column": 0, @@ -103324,14 +109156,14 @@ Object { }, "range": Array [ 0, - 7, + 23, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -103341,230 +109173,355 @@ Object { }, "range": Array [ 0, - 5, + 8, ], - "type": "Numeric", - "value": "0o717", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 10, "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, "range": Array [ - 5, - 6, + 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": ";", + "value": "(", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/octalLiterals/strict-uppercase.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", }, + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + "value": "a", + }, + Object { "loc": Object { "end": Object { "column": 13, "line": 1, }, "start": Object { - "column": 0, + "column": 12, "line": 1, }, }, "range": Array [ - 0, + 12, 13, ], - "type": "ExpressionStatement", + "type": "Punctuator", + "value": ",", }, Object { - "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, + "column": 17, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ 14, - 20, + 17, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, + "type": "Punctuator", + "value": "...", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + "value": "b", }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, + "column": 19, "line": 1, }, "start": Object { - "column": 0, + "column": 18, "line": 1, }, }, "range": Array [ - 0, - 12, + 18, + 19, ], - "type": "String", - "value": "\\"use strict\\"", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 21, "line": 1, }, "start": Object { - "column": 12, + "column": 20, "line": 1, }, }, "range": Array [ - 12, - 13, + 20, + 21, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 14, - 19, + 21, + 22, ], - "type": "Numeric", - "value": "0O717", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/restParams/class-constructor.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "constructor", + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 41, + ], + "static": false, + "type": "MethodDefinition", + "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", + }, + "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 { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 29, + 32, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 32, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 25, + 41, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, + "range": Array [ + 8, + 43, + ], + "type": "ClassBody", }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/octalLiterals/uppercase.src 1`] = ` -Object { - "body": Array [ - Object { - "expression": Object { + "id": Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { - "column": 0, + "column": 6, "line": 1, }, }, + "name": "A", "range": Array [ - 0, - 5, + 6, + 7, ], - "raw": "0O717", - "type": "Literal", - "value": 463, + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, @@ -103573,15 +109530,16 @@ Object { }, "range": Array [ 0, - 6, + 43, ], - "type": "ExpressionStatement", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 5, }, "start": Object { "column": 0, @@ -103590,7 +109548,7 @@ Object { }, "range": Array [ 0, - 7, + 44, ], "sourceType": "script", "tokens": Array [ @@ -103609,162 +109567,113 @@ Object { 0, 5, ], - "type": "Numeric", - "value": "0O717", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 7, "line": 1, }, "start": Object { - "column": 5, + "column": 6, "line": 1, }, }, "range": Array [ - 5, 6, + 7, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "A", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/regex/regexp-simple.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - }, - "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": Object {}, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 16, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", "loc": Object { "end": Object { - "column": 17, + "column": 9, "line": 1, }, "start": Object { - "column": 0, + "column": 8, "line": 1, }, }, "range": Array [ - 0, - 17, + 8, + 9, ], - "type": "VariableDeclaration", + "type": "Punctuator", + "value": "{", }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + "value": "constructor", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "(", }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 0, - 3, + 26, + 29, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 4, - "line": 1, + "column": 19, + "line": 2, }, }, "range": Array [ - 4, - 7, + 29, + 32, ], "type": "Identifier", "value": "foo", @@ -103772,135 +109681,239 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 22, + "line": 2, }, }, "range": Array [ - 8, - 9, + 32, + 33, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 24, + "line": 2, }, }, "range": Array [ - 10, - 16, + 34, + 35, ], - "regex": Object { - "flags": "", - "pattern": "foo.", + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, }, - "type": "RegularExpression", - "value": "/foo./", + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 16, - "line": 1, + "column": 0, + "line": 4, }, }, "range": Array [ - 16, - 17, + 42, + 43, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/regexUFlag/regex-u-extended-escape.src 1`] = ` +exports[`javascript fixtures/restParams/class-method.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "kind": "method", "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 3, }, "start": Object { "column": 4, - "line": 1, + "line": 2, }, }, - "name": "x", "range": Array [ - 4, - 5, + 14, + 33, ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, + "static": false, + "type": "MethodDefinition", + "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", }, - "start": Object { - "column": 8, - "line": 1, + "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 { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 17, + 33, + ], + "type": "FunctionExpression", }, - "range": Array [ - 8, - 40, - ], - "raw": "/[\\\\u{0000000000000061}-\\\\u{7A}]/u", - "regex": Object { - "flags": "u", - "pattern": "[\\\\u{0000000000000061}-\\\\u{7A}]", - }, - "type": "Literal", - "value": Object {}, }, - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, }, - "range": Array [ - 4, - 40, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 8, + 35, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 41, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, @@ -103909,15 +109922,16 @@ Object { }, "range": Array [ 0, - 41, + 35, ], - "type": "VariableDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 5, }, "start": Object { "column": 0, @@ -103926,14 +109940,14 @@ Object { }, "range": Array [ 0, - 42, + 36, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -103943,375 +109957,297 @@ Object { }, "range": Array [ 0, - 3, + 5, ], "type": "Keyword", - "value": "var", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, "range": Array [ - 4, - 5, + 6, + 7, ], "type": "Identifier", - "value": "x", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 1, }, "start": Object { - "column": 6, + "column": 8, "line": 1, }, }, "range": Array [ - 6, - 7, + 8, + 9, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 8, - 40, + 14, + 17, ], - "regex": Object { - "flags": "u", - "pattern": "[\\\\u{0000000000000061}-\\\\u{7A}]", - }, - "type": "RegularExpression", - "value": "/[\\\\u{0000000000000061}-\\\\u{7A}]/u", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 40, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 40, - 41, + 17, + 18, ], "type": "Punctuator", - "value": ";", + "value": "(", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/regexUFlag/regex-u-invalid-extended-escape.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - }, - "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", - }, - ], - "kind": "var", "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 0, - 22, + 18, + 21, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "...", }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 0, - 3, + 21, + 24, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 4, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 4, - 5, + 24, + 25, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 6, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 6, - 7, + 26, + 27, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 8, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 8, - 21, + 32, + 33, ], - "regex": Object { - "flags": "u", - "pattern": "\\\\u{110000}", - }, - "type": "RegularExpression", - "value": "/\\\\u{110000}/u", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 21, - "line": 1, + "column": 0, + "line": 4, }, }, "range": Array [ - 21, - 22, + 34, + 35, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/regexUFlag/regex-u-simple.src 1`] = ` +exports[`javascript fixtures/restParams/error-no-default.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ + "async": false, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, }, - "name": "foo", - "range": Array [ - 4, - 7, - ], - "type": "Identifier", }, - "init": Object { + "name": "a", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { - "column": 10, + "column": 17, "line": 1, }, }, + "name": "b", "range": Array [ - 10, - 16, + 17, + 18, ], - "raw": "/foo/u", - "regex": Object { - "flags": "u", - "pattern": "foo", - }, - "type": "Literal", - "value": Object {}, + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 16, + "column": 22, "line": 1, }, "start": Object { - "column": 4, + "column": 14, "line": 1, }, }, "range": Array [ - 4, - 16, + 14, + 22, ], - "type": "VariableDeclarator", + "type": "RestElement", }, ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, "range": Array [ 0, - 17, + 24, ], - "type": "VariableDeclaration", + "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { "column": 0, @@ -104320,14 +110256,14 @@ Object { }, "range": Array [ 0, - 18, + 24, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 8, "line": 1, }, "start": Object { @@ -104337,240 +110273,133 @@ Object { }, "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", + "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": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/regexYFlag/regexp-y-simple.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - }, - "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": Object {}, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 16, - ], - "type": "VariableDeclarator", + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, }, + }, + "range": Array [ + 9, + 10, ], - "kind": "var", + "type": "Identifier", + "value": "f", + }, + Object { "loc": Object { "end": Object { - "column": 17, + "column": 11, "line": 1, }, "start": Object { - "column": 0, + "column": 10, "line": 1, }, }, "range": Array [ - 0, - 17, + 10, + 11, ], - "type": "VariableDeclaration", + "type": "Punctuator", + "value": "(", }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + "value": "a", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ",", }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 17, "line": 1, }, "start": Object { - "column": 0, + "column": 14, "line": 1, }, }, "range": Array [ - 0, - 3, + 14, + 17, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 18, "line": 1, }, "start": Object { - "column": 4, + "column": 17, "line": 1, }, }, "range": Array [ - 4, - 7, + 17, + 18, ], "type": "Identifier", - "value": "foo", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 20, "line": 1, }, "start": Object { - "column": 8, + "column": 19, "line": 1, }, }, "range": Array [ - 8, - 9, + 19, + 20, ], "type": "Punctuator", "value": "=", @@ -104578,39 +110407,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, + "column": 22, "line": 1, }, "start": Object { - "column": 10, + "column": 21, "line": 1, }, }, "range": Array [ - 10, - 16, + 21, + 22, ], - "regex": Object { - "flags": "y", - "pattern": "foo", + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, }, - "type": "RegularExpression", - "value": "/foo/y", + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 24, "line": 1, }, "start": Object { - "column": 16, + "column": 23, "line": 1, }, }, "range": Array [ - 16, - 17, + 23, + 24, ], "type": "Punctuator", "value": ";", @@ -104620,29 +110463,11 @@ Object { } `; -exports[`javascript fixtures/restParams/basic-rest.src 1`] = ` +exports[`javascript fixtures/restParams/error-not-last.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", - }, "expression": false, "generator": false, "id": Object { @@ -104665,7 +110490,7 @@ Object { }, "loc": Object { "end": Object { - "column": 22, + "column": 23, "line": 1, }, "start": Object { @@ -104727,29 +110552,30 @@ Object { ], "type": "RestElement", }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, ], "range": Array [ 0, - 22, - ], - "type": "FunctionDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, 23, ], - "type": "EmptyStatement", + "type": "FunctionDeclaration", }, ], "loc": Object { @@ -104910,7 +110736,7 @@ Object { 19, ], "type": "Punctuator", - "value": ")", + "value": ",", }, Object { "loc": Object { @@ -104927,8 +110753,8 @@ Object { 20, 21, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { @@ -104946,7 +110772,7 @@ Object { 22, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { @@ -104971,165 +110797,128 @@ Object { } `; -exports[`javascript fixtures/restParams/class-constructor.src 1`] = ` +exports[`javascript fixtures/restParams/func-expression.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "constructor", - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - }, - "kind": "constructor", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { "column": 5, - "line": 3, + "line": 1, }, "start": Object { "column": 4, - "line": 2, + "line": 1, }, }, + "name": "x", "range": Array [ - 14, - 41, + 4, + 5, ], - "static": false, - "type": "MethodDefinition", - "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", - }, - "expression": false, - "generator": false, - "id": null, + "type": "Identifier", + }, + "init": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 26, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 24, + "line": 1, }, }, - "params": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - }, + "range": Array [ + 24, + 26, + ], + "type": "BlockStatement", + }, + "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 { "loc": Object { "end": Object { "column": 22, - "line": 2, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 21, + "line": 1, }, }, + "name": "a", "range": Array [ - 26, - 32, + 21, + 22, ], - "type": "RestElement", + "type": "Identifier", }, - ], - "range": Array [ - 25, - 41, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 43, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 22, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 8, + 26, + ], + "type": "FunctionExpression", }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 26, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 27, + "line": 1, }, "start": Object { "column": 0, @@ -105138,16 +110927,15 @@ Object { }, "range": Array [ 0, - 43, + 27, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 27, + "line": 1, }, "start": Object { "column": 0, @@ -105156,14 +110944,14 @@ Object { }, "range": Array [ 0, - 44, + 27, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -105173,79 +110961,79 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 7, + 4, + 5, ], "type": "Identifier", - "value": "A", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { - "column": 8, + "column": 6, "line": 1, }, }, "range": Array [ - 8, - 9, + 6, + 7, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 14, - 25, + 8, + 16, ], - "type": "Identifier", - "value": "constructor", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 25, - 26, + 17, + 18, ], "type": "Punctuator", "value": "(", @@ -105253,17 +111041,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 26, - 29, + 18, + 21, ], "type": "Punctuator", "value": "...", @@ -105272,34 +111060,34 @@ Object { "loc": Object { "end": Object { "column": 22, - "line": 2, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 21, + "line": 1, }, }, - "range": Array [ - 29, - 32, + "range": Array [ + 21, + 22, ], "type": "Identifier", - "value": "foo", + "value": "a", }, Object { "loc": Object { "end": Object { "column": 23, - "line": 2, + "line": 1, }, "start": Object { "column": 22, - "line": 2, + "line": 1, }, }, "range": Array [ - 32, - 33, + 22, + 23, ], "type": "Punctuator", "value": ")", @@ -105308,16 +111096,16 @@ Object { "loc": Object { "end": Object { "column": 25, - "line": 2, + "line": 1, }, "start": Object { "column": 24, - "line": 2, + "line": 1, }, }, "range": Array [ - 34, - 35, + 24, + 25, ], "type": "Punctuator", "value": "{", @@ -105325,17 +111113,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 26, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 25, + "line": 1, }, }, "range": Array [ - 40, - 41, + 25, + 26, ], "type": "Punctuator", "value": "}", @@ -105343,185 +111131,166 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 27, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 26, + "line": 1, }, }, "range": Array [ - 42, - 43, + 26, + 27, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/restParams/class-method.src 1`] = ` +exports[`javascript fixtures/restParams/func-expression-multi.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "init": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 26, + "line": 1, }, }, - "name": "foo", "range": Array [ - 14, - 17, + 26, + 28, ], - "type": "Identifier", + "type": "BlockStatement", }, - "kind": "method", + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 8, + "line": 1, }, }, - "range": Array [ - 14, - 33, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 18, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 17, + "line": 1, }, }, + "name": "a", "range": Array [ - 26, - 33, + 17, + 18, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 2, - }, + "type": "Identifier", }, - "params": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - }, + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 23, + "line": 1, }, }, + "name": "b", "range": Array [ - 18, + 23, 24, ], - "type": "RestElement", + "type": "Identifier", }, - ], - "range": Array [ - 17, - 33, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 35, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 24, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 8, + 28, + ], + "type": "FunctionExpression", }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 28, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 29, + "line": 1, }, "start": Object { "column": 0, @@ -105530,16 +111299,15 @@ Object { }, "range": Array [ 0, - 35, + 29, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 29, + "line": 1, }, "start": Object { "column": 0, @@ -105548,14 +111316,14 @@ Object { }, "range": Array [ 0, - 36, + 29, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -105565,10 +111333,28 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", + "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 { @@ -105585,13 +111371,13 @@ Object { 6, 7, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 16, "line": 1, }, "start": Object { @@ -105601,61 +111387,79 @@ Object { }, "range": Array [ 8, - 9, + 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": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 14, 17, + 18, ], "type": "Identifier", - "value": "foo", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 17, 18, + 19, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 20, + "line": 1, }, }, "range": Array [ - 18, - 21, + 20, + 23, ], "type": "Punctuator", "value": "...", @@ -105663,30 +111467,30 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 21, + 23, 24, ], "type": "Identifier", - "value": "bar", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ @@ -105699,12 +111503,12 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ @@ -105717,17 +111521,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 27, + "line": 1, }, }, "range": Array [ - 32, - 33, + 27, + 28, ], "type": "Punctuator", "value": "}", @@ -105735,31 +111539,49 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 29, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 28, + "line": 1, }, }, "range": Array [ - 34, - 35, + 28, + 29, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/restParams/error-no-default.src 1`] = ` +exports[`javascript fixtures/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", + }, "expression": false, "generator": false, "id": Object { @@ -105773,7 +111595,7 @@ Object { "line": 1, }, }, - "name": "f", + "name": "x", "range": Array [ 9, 10, @@ -105782,7 +111604,7 @@ Object { }, "loc": Object { "end": Object { - "column": 24, + "column": 22, "line": 1, }, "start": Object { @@ -105791,70 +111613,127 @@ Object { }, }, "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, Object { "argument": Object { "loc": Object { "end": Object { - "column": 18, + "column": 19, "line": 1, }, "start": Object { - "column": 17, + "column": 14, "line": 1, }, - }, - "name": "b", + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 16, + 17, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + }, + ], "range": Array [ - 17, - 18, + 14, + 19, ], - "type": "Identifier", + "type": "ObjectPattern", }, "loc": Object { "end": Object { - "column": 22, + "column": 19, "line": 1, }, "start": Object { - "column": 14, + "column": 11, "line": 1, }, }, "range": Array [ - 14, - 22, + 11, + 19, ], "type": "RestElement", }, ], "range": Array [ 0, - 24, + 22, ], "type": "FunctionDeclaration", }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "EmptyStatement", + }, ], "loc": Object { "end": Object { - "column": 24, + "column": 23, "line": 1, }, "start": Object { @@ -105864,7 +111743,7 @@ Object { }, "range": Array [ 0, - 24, + 23, ], "sourceType": "script", "tokens": Array [ @@ -105902,7 +111781,7 @@ Object { 10, ], "type": "Identifier", - "value": "f", + "value": "x", }, Object { "loc": Object { @@ -105925,7 +111804,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { @@ -105935,28 +111814,28 @@ Object { }, "range": Array [ 11, - 12, + 14, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 1, }, "start": Object { - "column": 12, + "column": 14, "line": 1, }, }, "range": Array [ - 12, - 13, + 14, + 15, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { @@ -105965,34 +111844,34 @@ Object { "line": 1, }, "start": Object { - "column": 14, + "column": 16, "line": 1, }, }, "range": Array [ - 14, + 16, 17, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 19, "line": 1, }, "start": Object { - "column": 17, + "column": 18, "line": 1, }, }, "range": Array [ - 17, 18, + 19, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { @@ -106010,58 +111889,58 @@ Object { 20, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 21, "line": 1, }, "start": Object { - "column": 21, + "column": 20, "line": 1, }, }, "range": Array [ + 20, 21, - 22, ], - "type": "Numeric", - "value": "0", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 22, "line": 1, }, "start": Object { - "column": 22, + "column": 21, "line": 1, }, }, "range": Array [ + 21, 22, - 23, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 23, "line": 1, }, "start": Object { - "column": 23, + "column": 22, "line": 1, }, }, "range": Array [ + 22, 23, - 24, ], "type": "Punctuator", "value": ";", @@ -106071,11 +111950,29 @@ Object { } `; -exports[`javascript fixtures/restParams/error-not-last.src 1`] = ` +exports[`javascript fixtures/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", + }, "expression": false, "generator": false, "id": Object { @@ -106098,7 +111995,7 @@ Object { }, "loc": Object { "end": Object { - "column": 23, + "column": 19, "line": 1, }, "start": Object { @@ -106107,88 +112004,69 @@ Object { }, }, "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, Object { "argument": Object { "loc": Object { "end": Object { - "column": 18, + "column": 15, "line": 1, }, "start": Object { - "column": 17, + "column": 14, "line": 1, }, }, "name": "b", "range": Array [ - 17, - 18, + 14, + 15, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 18, + "column": 15, "line": 1, }, "start": Object { - "column": 14, + "column": 11, "line": 1, }, }, "range": Array [ - 14, - 18, + 11, + 15, ], "type": "RestElement", }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - }, ], "range": Array [ 0, - 23, + 19, ], "type": "FunctionDeclaration", }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "EmptyStatement", + }, ], "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 1, }, "start": Object { @@ -106198,7 +112076,7 @@ Object { }, "range": Array [ 0, - 23, + 20, ], "sourceType": "script", "tokens": Array [ @@ -106259,7 +112137,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { @@ -106269,46 +112147,46 @@ Object { }, "range": Array [ 11, - 12, + 14, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 1, }, "start": Object { - "column": 12, + "column": 14, "line": 1, }, }, "range": Array [ - 12, - 13, + 14, + 15, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 16, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, - 17, + 15, + 16, ], "type": "Punctuator", - "value": "...", + "value": ")", }, Object { "loc": Object { @@ -106325,8 +112203,8 @@ Object { 17, 18, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -106344,58 +112222,22 @@ Object { 19, ], "type": "Punctuator", - "value": ",", + "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, + "column": 19, "line": 1, }, }, "range": Array [ - 22, - 23, + 19, + 20, ], "type": "Punctuator", "value": ";", @@ -106405,7 +112247,7 @@ Object { } `; -exports[`javascript fixtures/restParams/func-expression.src 1`] = ` +exports[`javascript fixtures/simple-literals/literal-float.src 1`] = ` Object { "body": Array [ Object { @@ -106414,118 +112256,61 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, - "name": "x", + "name": "a", "range": Array [ - 4, - 5, + 6, + 7, ], "type": "Identifier", }, "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", - }, - "expression": false, - "generator": false, - "id": null, "loc": Object { "end": Object { - "column": 26, + "column": 13, "line": 1, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, - "params": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 22, - ], - "type": "RestElement", - }, - ], "range": Array [ - 8, - 26, + 10, + 13, ], - "type": "FunctionExpression", + "raw": "1.5", + "type": "Literal", + "value": 1.5, }, "loc": Object { "end": Object { - "column": 26, + "column": 13, "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, "range": Array [ - 4, - 26, + 6, + 13, ], "type": "VariableDeclarator", }, ], - "kind": "var", + "kind": "const", "loc": Object { "end": Object { - "column": 27, + "column": 14, "line": 1, }, "start": Object { @@ -106535,15 +112320,15 @@ Object { }, "range": Array [ 0, - 27, + 14, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -106552,14 +112337,14 @@ Object { }, "range": Array [ 0, - 27, + 15, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -106569,28 +112354,10 @@ Object { }, "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", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { @@ -106607,149 +112374,59 @@ Object { 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, + "column": 9, "line": 1, }, "start": Object { - "column": 24, + "column": 8, "line": 1, }, }, "range": Array [ - 24, - 25, + 8, + 9, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 13, "line": 1, }, "start": Object { - "column": 25, + "column": 10, "line": 1, }, }, "range": Array [ - 25, - 26, + 10, + 13, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "1.5", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 14, "line": 1, }, "start": Object { - "column": 26, + "column": 13, "line": 1, }, }, "range": Array [ - 26, - 27, + 13, + 14, ], "type": "Punctuator", "value": ";", @@ -106759,7 +112436,7 @@ Object { } `; -exports[`javascript fixtures/restParams/func-expression-multi.src 1`] = ` +exports[`javascript fixtures/simple-literals/literal-float-negative.src 1`] = ` Object { "body": Array [ Object { @@ -106768,136 +112445,80 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, - "name": "x", + "name": "a", "range": Array [ - 4, - 5, + 6, + 7, ], "type": "Identifier", }, "init": Object { - "async": false, - "body": Object { - "body": Array [], + "argument": Object { "loc": Object { "end": Object { - "column": 28, + "column": 14, "line": 1, }, "start": Object { - "column": 26, + "column": 11, "line": 1, }, }, "range": Array [ - 26, - 28, + 11, + 14, ], - "type": "BlockStatement", + "raw": "1.5", + "type": "Literal", + "value": 1.5, }, - "expression": false, - "generator": false, - "id": null, "loc": Object { "end": Object { - "column": 28, + "column": 14, "line": 1, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 24, - ], - "type": "RestElement", - }, - ], + "operator": "-", + "prefix": true, "range": Array [ - 8, - 28, + 10, + 14, ], - "type": "FunctionExpression", + "type": "UnaryExpression", }, "loc": Object { "end": Object { - "column": 28, + "column": 14, "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, "range": Array [ - 4, - 28, + 6, + 14, ], "type": "VariableDeclarator", }, ], - "kind": "var", + "kind": "const", "loc": Object { "end": Object { - "column": 29, + "column": 15, "line": 1, }, "start": Object { @@ -106907,15 +112528,15 @@ Object { }, "range": Array [ 0, - 29, + 15, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -106924,14 +112545,14 @@ Object { }, "range": Array [ 0, - 29, + 16, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -106941,28 +112562,10 @@ Object { }, "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", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { @@ -106979,13 +112582,13 @@ Object { 6, 7, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 9, "line": 1, }, "start": Object { @@ -106995,169 +112598,250 @@ Object { }, "range": Array [ 8, - 16, + 9, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 11, "line": 1, }, "start": Object { - "column": 16, + "column": 10, "line": 1, }, }, "range": Array [ - 16, - 17, + 10, + 11, ], "type": "Punctuator", - "value": "(", + "value": "-", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 14, "line": 1, }, "start": Object { - "column": 17, + "column": 11, "line": 1, }, }, "range": Array [ - 17, - 18, + 11, + 14, ], - "type": "Identifier", - "value": "a", + "type": "Numeric", + "value": "1.5", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 15, "line": 1, }, "start": Object { - "column": 18, + "column": 14, "line": 1, }, }, "range": Array [ - 18, - 19, + 14, + 15, ], "type": "Punctuator", - "value": ",", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/simple-literals/literal-null.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "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", + }, + ], + "kind": "const", "loc": Object { "end": Object { - "column": 23, + "column": 15, "line": 1, }, "start": Object { - "column": 20, + "column": 0, "line": 1, }, }, "range": Array [ - 20, - 23, + 0, + 15, ], - "type": "Punctuator", - "value": "...", + "type": "VariableDeclaration", + }, + ], + "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": 24, + "column": 5, "line": 1, }, "start": Object { - "column": 23, + "column": 0, "line": 1, }, }, "range": Array [ - 23, - 24, + 0, + 5, ], - "type": "Identifier", - "value": "b", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 7, "line": 1, }, "start": Object { - "column": 24, + "column": 6, "line": 1, }, }, "range": Array [ - 24, - 25, + 6, + 7, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 9, "line": 1, }, "start": Object { - "column": 26, + "column": 8, "line": 1, }, }, "range": Array [ - 26, - 27, + 8, + 9, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 14, "line": 1, }, "start": Object { - "column": 27, + "column": 10, "line": 1, }, }, "range": Array [ - 27, - 28, + 10, + 14, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 15, "line": 1, }, "start": Object { - "column": 28, + "column": 14, "line": 1, }, }, "range": Array [ - 28, - 29, + 14, + 15, ], "type": "Punctuator", "value": ";", @@ -107167,182 +112851,88 @@ Object { } `; -exports[`javascript fixtures/restParams/invalid-rest-param.src 1`] = ` +exports[`javascript fixtures/simple-literals/literal-number.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", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ + "declarations": Array [ Object { - "argument": Object { + "id": Object { "loc": Object { "end": Object { - "column": 19, + "column": 7, "line": 1, }, "start": Object { - "column": 14, + "column": 6, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 16, - 17, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - }, + "name": "a", + "range": Array [ + 6, + 7, ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, "range": Array [ - 14, - 19, + 10, + 11, ], - "type": "ObjectPattern", + "raw": "1", + "type": "Literal", + "value": 1, }, "loc": Object { "end": Object { - "column": 19, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "column": 6, "line": 1, }, }, "range": Array [ + 6, 11, - 19, ], - "type": "RestElement", + "type": "VariableDeclarator", }, ], - "range": Array [ - 0, - 22, - ], - "type": "FunctionDeclaration", - }, - Object { + "kind": "const", "loc": Object { "end": Object { - "column": 23, + "column": 12, "line": 1, }, "start": Object { - "column": 22, + "column": 0, "line": 1, }, }, "range": Array [ - 22, - 23, + 0, + 12, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -107351,14 +112941,14 @@ Object { }, "range": Array [ 0, - 23, + 13, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { @@ -107368,28 +112958,46 @@ Object { }, "range": Array [ 0, - 8, + 5, ], "type": "Keyword", - "value": "function", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 10, + "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, - 10, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { @@ -107406,13 +113014,13 @@ Object { 10, 11, ], - "type": "Punctuator", - "value": "(", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 12, "line": 1, }, "start": Object { @@ -107422,133 +113030,233 @@ Object { }, "range": Array [ 11, - 14, + 12, ], "type": "Punctuator", - "value": "...", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/simple-literals/literal-number-negative.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "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", + }, + ], + "kind": "const", "loc": Object { "end": Object { - "column": 15, + "column": 13, "line": 1, }, "start": Object { - "column": 14, + "column": 0, "line": 1, }, }, "range": Array [ - 14, - 15, + 0, + 13, ], - "type": "Punctuator", - "value": "{", + "type": "VariableDeclaration", + }, + ], + "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": 17, + "column": 5, "line": 1, }, "start": Object { - "column": 16, + "column": 0, "line": 1, }, }, "range": Array [ - 16, - 17, + 0, + 5, ], - "type": "Identifier", - "value": "a", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 7, "line": 1, }, "start": Object { - "column": 18, + "column": 6, "line": 1, }, }, "range": Array [ - 18, - 19, + 6, + 7, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 9, "line": 1, }, "start": Object { - "column": 19, + "column": 8, "line": 1, }, }, "range": Array [ - 19, - 20, + 8, + 9, ], "type": "Punctuator", - "value": ")", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 11, "line": 1, }, "start": Object { - "column": 20, + "column": 10, "line": 1, }, }, "range": Array [ - 20, - 21, + 10, + 11, ], "type": "Punctuator", - "value": "{", + "value": "-", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 12, "line": 1, }, "start": Object { - "column": 21, + "column": 11, "line": 1, }, }, "range": Array [ - 21, - 22, + 11, + 12, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 13, "line": 1, }, "start": Object { - "column": 22, + "column": 12, "line": 1, }, }, "range": Array [ - 22, - 23, + 12, + 13, ], "type": "Punctuator", "value": ";", @@ -107558,124 +113266,88 @@ Object { } `; -exports[`javascript fixtures/restParams/single-rest.src 1`] = ` +exports[`javascript fixtures/simple-literals/literal-string.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", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "f", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ + "declarations": Array [ Object { - "argument": Object { + "id": Object { "loc": Object { "end": Object { - "column": 15, + "column": 7, "line": 1, }, "start": Object { - "column": 14, + "column": 6, "line": 1, }, }, - "name": "b", + "name": "a", "range": Array [ - 14, - 15, + 6, + 7, ], "type": "Identifier", }, + "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": 15, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 6, "line": 1, }, }, "range": Array [ - 11, - 15, + 6, + 13, ], - "type": "RestElement", + "type": "VariableDeclarator", }, ], - "range": Array [ - 0, - 19, - ], - "type": "FunctionDeclaration", - }, - Object { + "kind": "const", "loc": Object { "end": Object { - "column": 20, + "column": 14, "line": 1, }, "start": Object { - "column": 19, + "column": 0, "line": 1, }, }, "range": Array [ - 19, - 20, + 0, + 14, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -107684,14 +113356,14 @@ Object { }, "range": Array [ 0, - 20, + 15, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { @@ -107701,33 +113373,51 @@ Object { }, "range": Array [ 0, - 8, + 5, ], "type": "Keyword", - "value": "function", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 10, + "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, - 10, ], - "type": "Identifier", - "value": "f", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 13, "line": 1, }, "start": Object { @@ -107737,10 +113427,10 @@ Object { }, "range": Array [ 10, - 11, + 13, ], - "type": "Punctuator", - "value": "(", + "type": "String", + "value": "'a'", }, Object { "loc": Object { @@ -107749,70 +113439,168 @@ Object { "line": 1, }, "start": Object { - "column": 11, + "column": 13, "line": 1, }, }, "range": Array [ - 11, + 13, 14, ], "type": "Punctuator", - "value": "...", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/simple-literals/literal-undefined.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "undefined", + "range": Array [ + 10, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 19, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "type": "VariableDeclaration", + }, + ], + "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": 15, + "column": 5, "line": 1, }, "start": Object { - "column": 14, + "column": 0, "line": 1, }, }, "range": Array [ - 14, - 15, + 0, + 5, ], - "type": "Identifier", - "value": "b", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 7, "line": 1, }, "start": Object { - "column": 15, + "column": 6, "line": 1, }, }, "range": Array [ - 15, - 16, + 6, + 7, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 9, "line": 1, }, "start": Object { - "column": 17, + "column": 8, "line": 1, }, }, "range": Array [ - 17, - 18, + 8, + 9, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { @@ -107821,16 +113609,16 @@ Object { "line": 1, }, "start": Object { - "column": 18, + "column": 10, "line": 1, }, }, "range": Array [ - 18, + 10, 19, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "undefined", }, Object { "loc": Object { @@ -111476,6 +117264,7 @@ exports[`javascript fixtures/unicodeCodePointEscapes/basic-string-literal.src 1` Object { "body": Array [ Object { + "directive": "\\\\u{714E}\\\\u{8336}", "expression": Object { "loc": Object { "end": Object { @@ -111573,6 +117362,7 @@ exports[`javascript fixtures/unicodeCodePointEscapes/complex-string-literal.src Object { "body": Array [ Object { + "directive": "\\\\u{20BB7}\\\\u{10FFFF}\\\\u{1}", "expression": Object { "loc": Object { "end": Object { diff --git a/tests/lib/__snapshots__/typescript.ts.snap b/tests/lib/__snapshots__/typescript.ts.snap index edcf3d4..6197566 100644 --- a/tests/lib/__snapshots__/typescript.ts.snap +++ b/tests/lib/__snapshots__/typescript.ts.snap @@ -10425,29 +10425,12 @@ Object { "line": 1, }, }, + "members": Array [], "range": Array [ 33, 35, ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "members": Array [], - "range": Array [ - 33, - 35, - ], - "type": "TSTypeLiteral", - }, + "type": "TSTypeLiteral", }, ], "range": Array [ @@ -12175,127 +12158,268 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-optional-computed-property.src 1`] = ` +exports[`typescript fixtures/basics/class-with-mixin-reference.src 1`] = ` Object { "body": Array [ Object { + "async": false, "body": Object { - "body": Array [ - Object { - "accessibility": "private", - "computed": true, - "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, - "range": Array [ - 14, - 43, - ], - "static": false, - "type": "ClassProperty", - "value": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "undefined", - "range": Array [ - 33, - 42, - ], - "type": "Identifier", - }, - }, - ], + "body": Array [], "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 2, }, "start": Object { - "column": 8, + "column": 46, "line": 1, }, }, "range": Array [ - 8, - 45, + 46, + 49, ], - "type": "ClassBody", + "type": "BlockStatement", }, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 10, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, - "name": "X", + "name": "M", "range": Array [ - 6, - 7, + 9, + 10, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 2, }, "start": Object { "column": 0, "line": 1, }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "name": "Base", + "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 { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 43, + 44, + ], + "type": "Identifier", + }, + }, + }, + }, + ], "range": Array [ 0, - 45, + 49, ], - "superClass": null, - "type": "ClassDeclaration", + "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 { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "Constructor", + "range": Array [ + 21, + 32, + ], + "type": "Identifier", + }, + "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 { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "name": "M", + "range": Array [ + 33, + 34, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 32, + 35, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 11, + 35, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 10, + 36, + ], + "type": "TSTypeParameterDeclaration", + }, }, ], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 3, }, "start": Object { "column": 0, @@ -12304,14 +12428,14 @@ Object { }, "range": Array [ 0, - 46, + 50, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -12321,200 +12445,254 @@ Object { }, "range": Array [ 0, - 5, + 8, ], "type": "Keyword", - "value": "class", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 10, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, "range": Array [ - 6, - 7, + 9, + 10, ], "type": "Identifier", - "value": "X", + "value": "M", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 11, "line": 1, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, "range": Array [ - 8, - 9, + 10, + 11, ], "type": "Punctuator", - "value": "{", + "value": "<", }, Object { "loc": Object { "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { "column": 11, - "line": 2, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 14, - 21, + 13, + 20, ], "type": "Keyword", - "value": "private", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 22, - 23, + 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": "[", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 34, + "line": 1, }, "start": Object { - "column": 13, - "line": 2, + "column": 33, + "line": 1, }, }, "range": Array [ - 23, - 28, + 33, + 34, ], - "type": "String", - "value": "'foo'", + "type": "Identifier", + "value": "M", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 35, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 34, + "line": 1, }, }, "range": Array [ - 28, - 29, + 34, + 35, ], "type": "Punctuator", - "value": "]", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 36, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 35, + "line": 1, }, }, "range": Array [ - 29, - 30, + 35, + 36, ], "type": "Punctuator", - "value": "?", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 37, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 36, + "line": 1, }, }, "range": Array [ - 31, - 32, + 36, + 37, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 2, + "column": 41, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 37, + "line": 1, }, }, "range": Array [ - 33, - 42, + 37, + 41, ], - "type": "Keyword", - "value": "undefined", + "type": "Identifier", + "value": "Base", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 42, + "line": 1, }, "start": Object { - "column": 32, - "line": 2, + "column": 41, + "line": 1, }, }, "range": Array [ + 41, 42, - 43, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 44, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "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 [ @@ -12522,9 +12700,399 @@ Object { 45, ], "type": "Punctuator", - "value": "}", + "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", +} +`; + +exports[`typescript fixtures/basics/class-with-optional-computed-property.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "private", + "computed": true, + "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, + "range": Array [ + 14, + 43, + ], + "static": false, + "type": "ClassProperty", + "value": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "name": "undefined", + "range": Array [ + 33, + 42, + ], + "type": "Identifier", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 45, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 45, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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": "Keyword", + "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", } `; @@ -21030,7 +21598,7 @@ Object { 9, 11, ], - "type": "ArrayPattern", + "type": "ArrayExpression", }, "type": "AssignmentPattern", }, @@ -21313,31 +21881,918 @@ Object { } `; -exports[`typescript fixtures/basics/export-assignment.src 1`] = ` +exports[`typescript fixtures/basics/destructuring-assignment-nested.src 1`] = ` Object { "body": Array [ Object { "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 81, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 3, + 6, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 79, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 3, + 79, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 73, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 71, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 10, + 71, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 66, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 64, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 17, + 64, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 28, + 31, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 28, + 42, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 34, + 35, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 36, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "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", + }, + }, + ], + "range": Array [ + 26, + 44, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 58, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "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 { + "loc": Object { + "end": Object { + "column": 52, + "line": 1, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 49, + 52, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 57, + "line": 1, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "method": 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", + }, + ], + "loc": Object { + "end": Object { + "column": 59, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 59, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 64, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "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", + }, + }, + ], + "range": Array [ + 15, + 66, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 71, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "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", + }, + }, + ], + "range": Array [ + 8, + 73, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 79, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "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", + }, + }, + ], + "range": Array [ + 1, + 81, + ], + "type": "ObjectPattern", + }, "loc": Object { "end": Object { - "column": 12, + "column": 127, "line": 1, }, "start": Object { - "column": 9, + "column": 1, "line": 1, }, }, - "name": "foo", + "operator": "=", "range": Array [ - 9, - 12, + 1, + 127, ], - "type": "Identifier", + "right": Object { + "loc": Object { + "end": Object { + "column": 127, + "line": 1, + }, + "start": Object { + "column": 84, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 89, + "line": 1, + }, + "start": Object { + "column": 86, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 86, + 89, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 126, + "line": 1, + }, + "start": Object { + "column": 86, + "line": 1, + }, + }, + "method": 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 { + "loc": Object { + "end": Object { + "column": 96, + "line": 1, + }, + "start": Object { + "column": 93, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 93, + 96, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 124, + "line": 1, + }, + "start": Object { + "column": 93, + "line": 1, + }, + }, + "method": 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 { + "loc": Object { + "end": Object { + "column": 103, + "line": 1, + }, + "start": Object { + "column": 100, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 100, + 103, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 122, + "line": 1, + }, + "start": Object { + "column": 100, + "line": 1, + }, + }, + "method": 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 { + "loc": Object { + "end": Object { + "column": 114, + "line": 1, + }, + "start": Object { + "column": 111, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 111, + 114, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 119, + "line": 1, + }, + "start": Object { + "column": 111, + "line": 1, + }, + }, + "method": 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": 13, + "column": 129, "line": 1, }, "start": Object { @@ -21347,9 +22802,9 @@ Object { }, "range": Array [ 0, - 13, + 129, ], - "type": "TSExportAssignment", + "type": "ExpressionStatement", }, ], "loc": Object { @@ -21364,14 +22819,14 @@ Object { }, "range": Array [ 0, - 14, + 130, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 1, "line": 1, }, "start": Object { @@ -21381,46 +22836,82 @@ Object { }, "range": Array [ 0, - 6, + 1, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 8, + "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, - 8, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 8, "line": 1, }, }, "range": Array [ + 8, 9, - 12, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -21429,848 +22920,679 @@ Object { "line": 1, }, "start": Object { - "column": 12, + "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 [ - 12, 13, + 14, ], "type": "Punctuator", - "value": ";", + "value": ":", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/export-default-class-with-generic.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 28, - ], - "type": "ClassBody", - }, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, }, - "range": Array [ - 15, - 28, - ], - "superClass": null, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 21, - 22, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 20, - 23, - ], - "type": "TSTypeParameterDeclaration", + "start": Object { + "column": 15, + "line": 1, }, }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "{", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { - "column": 0, + "column": 17, "line": 1, }, }, "range": Array [ - 0, - 28, + 17, + 20, ], - "type": "ExportDefaultDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, + "type": "Identifier", + "value": "baz", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ":", }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 23, "line": 1, }, "start": Object { - "column": 0, + "column": 22, "line": 1, }, }, "range": Array [ - 0, - 6, + 22, + 23, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 24, "line": 1, }, "start": Object { - "column": 7, + "column": 23, "line": 1, }, }, "range": Array [ - 7, - 14, + 23, + 24, ], - "type": "Keyword", - "value": "default", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 25, "line": 1, }, "start": Object { - "column": 15, + "column": 24, "line": 1, }, }, "range": Array [ - 15, - 20, + 24, + 25, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 27, "line": 1, }, "start": Object { - "column": 20, + "column": 26, "line": 1, }, }, "range": Array [ - 20, - 21, + 26, + 27, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 31, "line": 1, }, "start": Object { - "column": 21, + "column": 28, "line": 1, }, }, "range": Array [ - 21, - 22, + 28, + 31, ], "type": "Identifier", - "value": "T", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 32, "line": 1, }, "start": Object { - "column": 22, + "column": 31, "line": 1, }, }, "range": Array [ - 22, - 23, + 31, + 32, ], "type": "Punctuator", - "value": ">", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 34, "line": 1, }, "start": Object { - "column": 24, + "column": 33, "line": 1, }, }, "range": Array [ - 24, - 25, + 33, + 34, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 35, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 34, + "line": 1, }, }, "range": Array [ - 27, - 28, + 34, + 35, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/export-default-class-with-multiple-generics.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 31, - ], - "type": "ClassBody", - }, - "id": null, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 36, + "line": 1, }, - "range": Array [ - 15, - 31, - ], - "superClass": null, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 21, - 22, - ], - "type": "TSTypeParameter", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "name": "U", - "range": Array [ - 24, - 25, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 20, - 26, - ], - "type": "TSTypeParameterDeclaration", + "start": Object { + "column": 35, + "line": 1, }, }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "]", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 38, + "line": 1, }, "start": Object { - "column": 0, + "column": 37, "line": 1, }, }, "range": Array [ - 0, - 31, + 37, + 38, ], - "type": "ExportDefaultDeclaration", + "type": "Punctuator", + "value": "=", }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "[", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Numeric", + "value": "3", }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 42, "line": 1, }, "start": Object { - "column": 0, + "column": 41, "line": 1, }, }, "range": Array [ - 0, - 6, + 41, + 42, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 44, "line": 1, }, "start": Object { - "column": 7, + "column": 43, "line": 1, }, }, "range": Array [ - 7, - 14, + 43, + 44, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 46, "line": 1, }, "start": Object { - "column": 15, + "column": 45, "line": 1, }, }, "range": Array [ - 15, - 20, + 45, + 46, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 48, "line": 1, }, "start": Object { - "column": 20, + "column": 47, "line": 1, }, }, "range": Array [ - 20, - 21, + 47, + 48, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 52, "line": 1, }, "start": Object { - "column": 21, + "column": 49, "line": 1, }, }, "range": Array [ - 21, - 22, + 49, + 52, ], "type": "Identifier", - "value": "T", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 53, "line": 1, }, "start": Object { - "column": 22, + "column": 52, "line": 1, }, }, "range": Array [ - 22, - 23, + 52, + 53, ], "type": "Punctuator", - "value": ",", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 55, "line": 1, }, "start": Object { - "column": 24, + "column": 54, "line": 1, }, }, "range": Array [ - 24, - 25, + 54, + 55, ], - "type": "Identifier", - "value": "U", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 56, "line": 1, }, "start": Object { - "column": 25, + "column": 55, "line": 1, }, }, "range": Array [ - 25, - 26, + 55, + 56, ], - "type": "Punctuator", - "value": ">", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 57, "line": 1, }, "start": Object { - "column": 27, + "column": 56, "line": 1, }, }, "range": Array [ - 27, - 28, + 56, + 57, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 58, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 57, + "line": 1, }, }, "range": Array [ - 30, - 31, + 57, + 58, ], "type": "Punctuator", "value": "}", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/export-named-class-with-generic.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 24, - ], - "type": "ClassBody", + "loc": Object { + "end": Object { + "column": 59, + "line": 1, }, - "id": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", + "start": Object { + "column": 58, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 61, + "line": 1, }, - "range": Array [ - 7, - 24, - ], - "superClass": null, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 17, - 18, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 16, - 19, - ], - "type": "TSTypeParameterDeclaration", + "start": Object { + "column": 60, + "line": 1, }, }, + "range": Array [ + 60, + 61, + ], + "type": "Punctuator", + "value": "=", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 63, + "line": 1, }, "start": Object { - "column": 0, + "column": 62, "line": 1, }, }, "range": Array [ - 0, - 24, + 62, + 63, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, + "type": "Punctuator", + "value": "[", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 64, + "line": 1, + }, + "start": Object { + "column": 63, + "line": 1, + }, + }, + "range": Array [ + 63, + 64, + ], + "type": "Punctuator", + "value": "]", }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 66, "line": 1, }, "start": Object { - "column": 0, + "column": 65, "line": 1, }, }, "range": Array [ - 0, - 6, + 65, + 66, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 68, "line": 1, }, "start": Object { - "column": 7, + "column": 67, "line": 1, }, }, "range": Array [ - 7, - 12, + 67, + 68, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 70, "line": 1, }, "start": Object { - "column": 13, + "column": 69, "line": 1, }, }, "range": Array [ - 13, - 16, + 69, + 70, ], - "type": "Identifier", - "value": "Foo", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 71, "line": 1, }, "start": Object { - "column": 16, + "column": 70, "line": 1, }, }, "range": Array [ - 16, - 17, + 70, + 71, ], "type": "Punctuator", - "value": "<", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 73, "line": 1, }, "start": Object { - "column": 17, + "column": 72, "line": 1, }, }, "range": Array [ - 17, - 18, + 72, + 73, ], - "type": "Identifier", - "value": "T", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 75, "line": 1, }, "start": Object { - "column": 18, + "column": 74, "line": 1, }, }, "range": Array [ - 18, - 19, + 74, + 75, ], "type": "Punctuator", - "value": ">", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 77, "line": 1, }, "start": Object { - "column": 20, + "column": 76, "line": 1, }, }, "range": Array [ - 20, - 21, + 76, + 77, ], "type": "Punctuator", "value": "{", @@ -22278,804 +23600,666 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 79, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 78, + "line": 1, }, }, "range": Array [ - 23, - 24, + 78, + 79, ], "type": "Punctuator", "value": "}", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/export-named-class-with-multiple-generics.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 27, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 81, + "line": 1, }, - "range": Array [ - 7, - 27, - ], - "superClass": null, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 17, - 18, - ], - "type": "TSTypeParameter", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "U", - "range": Array [ - 20, - 21, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 16, - 22, - ], - "type": "TSTypeParameterDeclaration", + "start": Object { + "column": 80, + "line": 1, }, }, + "range": Array [ + 80, + 81, + ], + "type": "Punctuator", + "value": "}", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 83, + "line": 1, }, "start": Object { - "column": 0, + "column": 82, "line": 1, }, }, "range": Array [ - 0, - 27, + 82, + 83, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "=", }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 85, "line": 1, }, "start": Object { - "column": 0, + "column": 84, "line": 1, }, }, "range": Array [ - 0, - 6, + 84, + 85, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 89, "line": 1, }, "start": Object { - "column": 7, + "column": 86, "line": 1, }, }, "range": Array [ - 7, - 12, + 86, + 89, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 90, "line": 1, }, "start": Object { - "column": 13, + "column": 89, "line": 1, }, }, "range": Array [ - 13, - 16, + 89, + 90, ], - "type": "Identifier", - "value": "Foo", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 92, "line": 1, }, "start": Object { - "column": 16, + "column": 91, "line": 1, }, }, "range": Array [ - 16, - 17, + 91, + 92, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 96, "line": 1, }, "start": Object { - "column": 17, + "column": 93, "line": 1, }, }, "range": Array [ - 17, - 18, + 93, + 96, ], "type": "Identifier", - "value": "T", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 97, "line": 1, }, "start": Object { - "column": 18, + "column": 96, "line": 1, }, }, "range": Array [ - 18, - 19, + 96, + 97, ], "type": "Punctuator", - "value": ",", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 99, "line": 1, }, "start": Object { - "column": 20, + "column": 98, "line": 1, }, }, "range": Array [ - 20, - 21, + 98, + 99, ], - "type": "Identifier", - "value": "U", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 103, "line": 1, }, "start": Object { - "column": 21, + "column": 100, "line": 1, }, }, "range": Array [ - 21, - 22, + 100, + 103, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 104, "line": 1, }, "start": Object { - "column": 23, + "column": 103, "line": 1, }, }, "range": Array [ - 23, - 24, + 103, + 104, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 106, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 105, + "line": 1, }, }, "range": Array [ - 26, - 27, + 105, + 106, ], "type": "Punctuator", - "value": "}", + "value": "[", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/export-named-enum.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 12, - 15, - ], - "type": "Identifier", + "loc": Object { + "end": Object { + "column": 107, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 1, - }, + "start": Object { + "column": 106, + "line": 1, }, - "members": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - }, - "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 { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "bar", - "range": Array [ - 35, - 38, - ], - "type": "Identifier", - }, - "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", }, + "range": Array [ + 106, + 107, + ], + "type": "Numeric", + "value": "2", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 108, + "line": 1, }, "start": Object { - "column": 0, + "column": 107, "line": 1, }, }, "range": Array [ - 0, - 40, + 107, + 108, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", + "type": "Punctuator", + "value": ",", }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, + Object { + "loc": Object { + "end": Object { + "column": 110, + "line": 1, + }, + "start": Object { + "column": 109, + "line": 1, + }, + }, + "range": Array [ + 109, + 110, + ], + "type": "Punctuator", + "value": "{", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 114, + "line": 1, + }, + "start": Object { + "column": 111, + "line": 1, + }, + }, + "range": Array [ + 111, + 114, + ], + "type": "Identifier", + "value": "foo", }, - }, - "range": Array [ - 0, - 40, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 115, "line": 1, }, "start": Object { - "column": 0, + "column": 114, "line": 1, }, }, "range": Array [ - 0, - 6, + 114, + 115, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 117, "line": 1, }, "start": Object { - "column": 7, + "column": 116, "line": 1, }, }, "range": Array [ - 7, - 11, + 116, + 117, ], - "type": "Keyword", - "value": "enum", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 118, "line": 1, }, "start": Object { - "column": 12, + "column": 117, "line": 1, }, }, "range": Array [ - 12, - 15, + 117, + 118, ], - "type": "Identifier", - "value": "Foo", + "type": "Numeric", + "value": "3", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 119, "line": 1, }, "start": Object { - "column": 16, + "column": 118, "line": 1, }, }, "range": Array [ - 16, - 17, + 118, + 119, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 121, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 120, + "line": 1, }, }, "range": Array [ - 22, - 25, + 120, + 121, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 122, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 121, + "line": 1, }, }, "range": Array [ - 26, - 27, + 121, + 122, ], "type": "Punctuator", - "value": "=", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 124, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 123, + "line": 1, }, }, "range": Array [ - 28, - 29, + 123, + 124, ], - "type": "Numeric", - "value": "1", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 126, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 125, + "line": 1, }, }, "range": Array [ - 29, - 30, + 125, + 126, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 127, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 126, + "line": 1, }, }, "range": Array [ - 35, - 38, + 126, + 127, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 128, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 127, + "line": 1, }, }, "range": Array [ - 39, - 40, + 127, + 128, ], "type": "Punctuator", - "value": "}", + "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", } `; -exports[`typescript fixtures/basics/export-type-alias-declaration.src 1`] = ` +exports[`typescript fixtures/basics/destructuring-assignment-object.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "id": Object { + "expression": Object { + "left": Object { "loc": Object { "end": Object { - "column": 21, + "column": 13, "line": 1, }, "start": Object { - "column": 12, + "column": 1, "line": 1, }, }, - "name": "TestAlias", + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 3, + 6, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 3, + 11, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 3, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "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", + }, + }, + ], "range": Array [ - 12, - 21, + 1, + 13, ], - "type": "Identifier", + "type": "ObjectPattern", }, "loc": Object { "end": Object { - "column": 40, + "column": 19, "line": 1, }, "start": Object { - "column": 7, + "column": 1, "line": 1, }, }, + "operator": "=", "range": Array [ - 7, - 40, + 1, + 19, ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { + "right": Object { "loc": Object { "end": Object { - "column": 39, + "column": 19, "line": 1, }, "start": Object { - "column": 24, + "column": 16, "line": 1, }, }, + "name": "bar", "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", - }, + 16, + 19, ], + "type": "Identifier", }, + "type": "AssignmentExpression", }, "loc": Object { "end": Object { - "column": 40, + "column": 21, "line": 1, }, "start": Object { @@ -23085,17 +24269,15 @@ Object { }, "range": Array [ 0, - 40, + 21, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 40, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -23104,14 +24286,14 @@ Object { }, "range": Array [ 0, - 40, + 22, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 1, "line": 1, }, "start": Object { @@ -23121,61 +24303,61 @@ Object { }, "range": Array [ 0, - 6, + 1, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 2, "line": 1, }, "start": Object { - "column": 7, + "column": 1, "line": 1, }, }, "range": Array [ - 7, - 11, + 1, + 2, ], - "type": "Identifier", - "value": "type", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 6, "line": 1, }, "start": Object { - "column": 12, + "column": 3, "line": 1, }, }, "range": Array [ - 12, - 21, + 3, + 6, ], "type": "Identifier", - "value": "TestAlias", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 8, "line": 1, }, "start": Object { - "column": 22, + "column": 7, "line": 1, }, }, "range": Array [ - 22, - 23, + 7, + 8, ], "type": "Punctuator", "value": "=", @@ -23183,71 +24365,125 @@ Object { Object { "loc": Object { "end": Object { - "column": 30, + "column": 10, "line": 1, }, "start": Object { - "column": 24, + "column": 9, "line": 1, }, }, "range": Array [ - 24, - 30, + 9, + 10, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 11, "line": 1, }, "start": Object { - "column": 31, + "column": 10, "line": 1, }, }, "range": Array [ - 31, - 32, + 10, + 11, ], "type": "Punctuator", - "value": "|", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 39, + "column": 13, "line": 1, }, "start": Object { - "column": 33, + "column": 12, "line": 1, }, }, "range": Array [ - 33, - 39, + 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": "number", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 40, + "column": 20, "line": 1, }, "start": Object { - "column": 39, + "column": 19, "line": 1, }, }, "range": Array [ - 39, - 40, + 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": ";", @@ -23257,157 +24493,218 @@ Object { } `; -exports[`typescript fixtures/basics/export-type-class-declaration.src 1`] = ` +exports[`typescript fixtures/basics/destructuring-assignment-property.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 1, }, - "name": "TestClassProps", - "range": Array [ - 12, - 26, - ], - "type": "Identifier", }, + "range": Array [ + 33, + 37, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 12, + "line": 1, }, "start": Object { - "column": 7, + "column": 9, "line": 1, }, }, + "name": "Foo", "range": Array [ - 7, - 51, + 9, + 12, ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 29, - "line": 1, + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, }, - }, - "members": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, }, + "name": "foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", }, - "name": "count", - "range": Array [ - 35, - 40, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 35, - 48, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { + "kind": "init", "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 15, + "line": 1, }, }, + "method": false, "range": Array [ - 40, - 48, + 15, + 23, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 42, - 48, + 15, + 23, ], - "type": "TSNumberKeyword", + "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", }, }, + ], + "range": Array [ + 13, + 25, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, }, - ], + "start": Object { + "column": 13, + "line": 1, + }, + }, "range": Array [ - 29, - 50, + 13, + 31, ], - "type": "TSTypeLiteral", - }, - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, + "right": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 28, + 31, + ], + "type": "Identifier", + }, + "type": "AssignmentPattern", }, - }, + ], "range": Array [ 0, - 51, + 37, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", + "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -23416,14 +24713,14 @@ Object { }, "range": Array [ 0, - 51, + 38, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 8, "line": 1, }, "start": Object { @@ -23433,33 +24730,33 @@ Object { }, "range": Array [ 0, - 6, + 8, ], "type": "Keyword", - "value": "export", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 12, "line": 1, }, "start": Object { - "column": 7, + "column": 9, "line": 1, }, }, "range": Array [ - 7, - 11, + 9, + 12, ], "type": "Identifier", - "value": "type", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 13, "line": 1, }, "start": Object { @@ -23469,115 +24766,115 @@ Object { }, "range": Array [ 12, - 26, + 13, ], - "type": "Identifier", - "value": "TestClassProps", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 14, "line": 1, }, "start": Object { - "column": 27, + "column": 13, "line": 1, }, }, "range": Array [ - 27, - 28, + 13, + 14, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 18, "line": 1, }, "start": Object { - "column": 29, + "column": 15, "line": 1, }, }, "range": Array [ - 29, - 30, + 15, + 18, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ - 35, - 40, + 19, + 20, ], - "type": "Identifier", - "value": "count", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 40, - 41, + 21, + 22, ], "type": "Punctuator", - "value": ":", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 42, - 48, + 22, + 23, ], - "type": "Identifier", - "value": "number", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 24, + "line": 1, }, }, "range": Array [ - 49, - 50, + 24, + 25, ], "type": "Punctuator", "value": "}", @@ -23585,175 +24882,290 @@ Object { Object { "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 27, + "line": 1, }, "start": Object { - "column": 1, - "line": 3, + "column": 26, + "line": 1, }, }, "range": Array [ - 50, - 51, + 26, + 27, ], "type": "Punctuator", - "value": ";", + "value": "=", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/export-type-function-declaration.src 1`] = ` -Object { - "body": Array [ Object { - "declaration": Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "TestCallback", - "range": Array [ - 12, - 24, - ], - "type": "Identifier", + "loc": Object { + "end": Object { + "column": 31, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, + "start": Object { + "column": 28, + "line": 1, }, - "range": Array [ - 7, - 47, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "parameters": Array [ - Object { + }, + "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", +} +`; + +exports[`typescript fixtures/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": 37, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 28, - "line": 1, + "column": 2, + "line": 2, }, }, - "name": "a", "range": Array [ - 28, - 37, + 15, + 27, ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, }, + "name": "a", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", }, - "range": Array [ - 29, - 37, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "init": Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 31, - "line": 1, + "column": 10, + "line": 3, }, }, "range": Array [ - 31, - 37, + 39, + 40, ], - "type": "TSNumberKeyword", + "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", }, - }, - ], - "range": Array [ - 27, - 46, - ], - "type": "TSFunctionType", - "typeAnnotation": Object { + ], + "kind": "var", "loc": Object { "end": Object { - "column": 46, - "line": 1, + "column": 12, + "line": 3, }, "start": Object { - "column": 40, - "line": 1, + "column": 2, + "line": 3, }, }, "range": Array [ - 40, - 46, + 31, + 41, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "type": "VariableDeclaration", + }, + Object { + "expression": Object { "loc": Object { "end": Object { - "column": 46, - "line": 1, + "column": 14, + "line": 4, }, "start": Object { - "column": 42, - "line": 1, + "column": 2, + "line": 4, }, }, "range": Array [ - 42, - 46, + 44, + 56, ], - "type": "TSVoidKeyword", + "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", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, }, - "typeParameters": null, }, + "name": "foo", + "range": Array [ + 7, + 10, + ], + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 47, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { "column": 0, @@ -23762,17 +25174,15 @@ Object { }, "range": Array [ 0, - 47, + 59, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", + "type": "TSModuleDeclaration", }, ], "loc": Object { "end": Object { - "column": 47, - "line": 1, + "column": 0, + "line": 6, }, "start": Object { "column": 0, @@ -23781,9 +25191,9 @@ Object { }, "range": Array [ 0, - 47, + 60, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { @@ -23800,13 +25210,13 @@ Object { 0, 6, ], - "type": "Keyword", - "value": "export", + "type": "Identifier", + "value": "module", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { @@ -23816,56 +25226,56 @@ Object { }, "range": Array [ 7, - 11, + 10, ], "type": "Identifier", - "value": "type", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 12, "line": 1, }, "start": Object { - "column": 12, + "column": 11, "line": 1, }, }, "range": Array [ + 11, 12, - 24, ], - "type": "Identifier", - "value": "TestCallback", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 25, - 26, + 15, + 27, ], - "type": "Punctuator", - "value": "=", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 27, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ @@ -23873,195 +25283,307 @@ Object { 28, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 28, - "line": 1, + "column": 2, + "line": 3, }, }, "range": Array [ - 28, - 29, + 31, + 34, ], - "type": "Identifier", - "value": "a", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 29, - "line": 1, + "column": 6, + "line": 3, }, }, "range": Array [ - 29, - 30, + 35, + 36, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 9, + "line": 3, }, "start": Object { - "column": 31, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 31, 37, + 38, ], - "type": "Identifier", - "value": "number", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 37, - "line": 1, + "column": 10, + "line": 3, }, }, "range": Array [ - 37, - 38, + 39, + 40, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 1, + "column": 12, + "line": 3, }, "start": Object { - "column": 39, - "line": 1, + "column": 11, + "line": 3, }, }, "range": Array [ - 39, + 40, 41, ], "type": "Punctuator", - "value": "=>", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 46, - "line": 1, + "column": 14, + "line": 4, }, "start": Object { - "column": 42, - "line": 1, + "column": 2, + "line": 4, }, }, "range": Array [ - 42, - 46, + 44, + 56, ], - "type": "Keyword", - "value": "void", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 1, + "column": 15, + "line": 4, }, "start": Object { - "column": 46, - "line": 1, + "column": 14, + "line": 4, }, }, "range": Array [ - 46, - 47, + 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", } `; -exports[`typescript fixtures/basics/function-with-await.src 1`] = ` +exports[`typescript fixtures/basics/directive-in-namespace.src 1`] = ` Object { "body": Array [ Object { - "async": true, "body": Object { "body": Array [ Object { + "directive": "use strict", "expression": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, + "loc": Object { + "end": Object { + "column": 14, + "line": 2, }, - "name": "future", - "range": Array [ - 40, - 46, + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "name": "a", + "range": Array [ + 38, + 39, + ], + "type": "Identifier", + }, + "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": "Identifier", + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, }, + }, + "range": Array [ + 34, + 44, + ], + "type": "VariableDeclaration", + }, + Object { + "expression": Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 14, + "line": 4, }, "start": Object { - "column": 4, - "line": 2, + "column": 2, + "line": 4, }, }, "range": Array [ - 34, - 46, + 47, + 59, ], - "type": "AwaitExpression", + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", }, "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 15, + "line": 4, }, "start": Object { - "column": 4, - "line": 2, + "column": 2, + "line": 4, }, }, "range": Array [ - 34, 47, + 60, ], "type": "ExpressionStatement", }, @@ -24069,80 +25591,58 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { - "column": 28, + "column": 14, "line": 1, }, }, "range": Array [ - 28, - 49, + 14, + 62, ], - "type": "BlockStatement", + "type": "TSModuleBlock", }, - "expression": false, - "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 19, + "column": 13, "line": 1, }, "start": Object { - "column": 15, + "column": 10, "line": 1, }, }, - "name": "hope", + "name": "foo", "range": Array [ - 15, - 19, + 10, + 13, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "future", - "range": Array [ - 20, - 26, - ], - "type": "Identifier", - }, - ], "range": Array [ 0, - 49, + 62, ], - "type": "FunctionDeclaration", + "type": "TSModuleDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 6, }, "start": Object { "column": 0, @@ -24151,14 +25651,14 @@ Object { }, "range": Array [ 0, - 50, + 63, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -24168,169 +25668,205 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Identifier", - "value": "async", + "value": "namespace", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 13, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 14, + 10, + 13, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 15, "line": 1, }, "start": Object { - "column": 15, + "column": 14, "line": 1, }, }, "range": Array [ + 14, 15, - 19, ], - "type": "Identifier", - "value": "hope", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 19, - 20, + 18, + 30, ], - "type": "Punctuator", - "value": "(", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 20, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 20, - 26, + 30, + 31, ], - "type": "Identifier", - "value": "future", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 26, - "line": 1, + "column": 2, + "line": 3, }, }, "range": Array [ - 26, - 27, + 34, + 37, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 28, - "line": 1, + "column": 6, + "line": 3, }, }, "range": Array [ - 28, - 29, + 38, + 39, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { "column": 9, - "line": 2, + "line": 3, }, "start": Object { - "column": 4, - "line": 2, + "column": 8, + "line": 3, }, }, "range": Array [ - 34, - 39, + 40, + 41, ], - "type": "Identifier", - "value": "await", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 11, + "line": 3, }, "start": Object { "column": 10, - "line": 2, + "line": 3, }, }, "range": Array [ - 40, - 46, + 42, + 43, ], - "type": "Identifier", - "value": "future", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 12, + "line": 3, }, "start": Object { - "column": 16, - "line": 2, + "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 [ - 46, 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": ";", @@ -24339,16 +25875,16 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { "column": 0, - "line": 3, + "line": 5, }, }, "range": Array [ - 48, - 49, + 61, + 62, ], "type": "Punctuator", "value": "}", @@ -24358,32 +25894,11 @@ Object { } `; -exports[`typescript fixtures/basics/function-with-object-type-with-optional-properties.src 1`] = ` +exports[`typescript fixtures/basics/export-assignment.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", - }, - "expression": false, - "generator": false, - "id": Object { + "expression": Object { "loc": Object { "end": Object { "column": 12, @@ -24403,298 +25918,207 @@ Object { }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 13, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [ - Object { + "range": Array [ + 0, + 13, + ], + "type": "TSExportAssignment", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/basics/export-default-class-with-generic.src 1`] = ` +Object { + "body": Array [ + Object { + "declaration": Object { + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 45, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 13, + "column": 24, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 14, - 17, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, + "range": Array [ + 24, + 28, + ], + "type": "ClassBody", + }, + "id": null, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 28, + ], + "superClass": null, + "type": "ClassDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, }, + }, + "params": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - "kind": "init", "loc": Object { "end": Object { "column": 22, "line": 1, }, "start": Object { - "column": 19, + "column": 21, "line": 1, }, }, - "method": false, + "name": "T", "range": Array [ - 19, + 21, 22, ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, + "type": "TSTypeParameter", }, ], "range": Array [ - 13, - 45, + 20, + 23, ], - "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 { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "optional": true, - "range": Array [ - 26, - 39, - ], - "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 { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 40, - 43, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "optional": true, - "range": Array [ - 40, - 44, - ], - "type": "TSPropertySignature", - }, - ], - "range": Array [ - 25, - 45, - ], - "type": "TSTypeLiteral", - }, - }, + "type": "TSTypeParameterDeclaration", }, - ], + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, "range": Array [ 0, - 51, + 28, ], - "type": "FunctionDeclaration", + "type": "ExportDefaultDeclaration", }, ], "loc": Object { @@ -24709,14 +26133,14 @@ Object { }, "range": Array [ 0, - 52, + 29, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 6, "line": 1, }, "start": Object { @@ -24726,259 +26150,375 @@ Object { }, "range": Array [ 0, - 8, + 6, ], "type": "Keyword", - "value": "function", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, "range": Array [ - 9, - 12, + 7, + 14, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 20, "line": 1, }, "start": Object { - "column": 12, + "column": 15, "line": 1, }, }, "range": Array [ - 12, - 13, + 15, + 20, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 21, "line": 1, }, "start": Object { - "column": 13, + "column": 20, "line": 1, }, }, "range": Array [ - 13, - 14, + 20, + 21, ], "type": "Punctuator", - "value": "{", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 22, "line": 1, }, "start": Object { - "column": 14, + "column": 21, "line": 1, }, }, "range": Array [ - 14, - 17, + 21, + 22, ], "type": "Identifier", - "value": "bar", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 23, "line": 1, }, "start": Object { - "column": 17, + "column": 22, "line": 1, }, }, "range": Array [ - 17, - 18, + 22, + 23, ], "type": "Punctuator", - "value": ",", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 25, "line": 1, }, "start": Object { - "column": 19, + "column": 24, "line": 1, }, }, "range": Array [ - 19, - 22, + 24, + 25, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 22, - 23, + 27, + 28, ], "type": "Punctuator", "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/export-default-class-with-multiple-generics.src 1`] = ` +Object { + "body": Array [ Object { + "declaration": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 31, + ], + "type": "ClassBody", + }, + "id": null, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 31, + ], + "superClass": null, + "type": "ClassDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 21, + 22, + ], + "type": "TSTypeParameter", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 24, + 25, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 20, + 26, + ], + "type": "TSTypeParameterDeclaration", + }, + }, "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 23, + "column": 0, "line": 1, }, }, "range": Array [ - 23, - 24, + 0, + 31, ], - "type": "Punctuator", - "value": ":", + "type": "ExportDefaultDeclaration", + }, + ], + "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": 26, + "column": 6, "line": 1, }, "start": Object { - "column": 25, + "column": 0, "line": 1, }, }, "range": Array [ - 25, - 26, + 0, + 6, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 14, "line": 1, }, "start": Object { - "column": 26, + "column": 7, "line": 1, }, }, "range": Array [ - 26, - 29, + 7, + 14, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 20, "line": 1, }, "start": Object { - "column": 29, + "column": 15, "line": 1, }, }, "range": Array [ - 29, - 30, + 15, + 20, ], - "type": "Punctuator", - "value": "?", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 21, "line": 1, }, "start": Object { - "column": 30, + "column": 20, "line": 1, }, }, "range": Array [ - 30, - 31, + 20, + 21, ], "type": "Punctuator", - "value": ":", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 22, "line": 1, }, "start": Object { - "column": 32, + "column": 21, "line": 1, }, }, "range": Array [ - 32, - 38, + 21, + 22, ], "type": "Identifier", - "value": "string", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 39, + "column": 23, "line": 1, }, "start": Object { - "column": 38, + "column": 22, "line": 1, }, }, "range": Array [ - 38, - 39, + 22, + 23, ], "type": "Punctuator", "value": ",", @@ -24986,89 +26526,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 43, + "column": 25, "line": 1, }, "start": Object { - "column": 40, + "column": 24, "line": 1, }, }, "range": Array [ - 40, - 43, + 24, + 25, ], "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": "}", + "value": "U", }, Object { "loc": Object { "end": Object { - "column": 46, + "column": 26, "line": 1, }, "start": Object { - "column": 45, + "column": 25, "line": 1, }, }, "range": Array [ - 45, - 46, + 25, + 26, ], "type": "Punctuator", - "value": ")", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 48, + "column": 28, "line": 1, }, "start": Object { - "column": 47, + "column": 27, "line": 1, }, }, "range": Array [ - 47, - 48, + 27, + 28, ], "type": "Punctuator", "value": "{", @@ -25085,8 +26589,8 @@ Object { }, }, "range": Array [ - 50, - 51, + 30, + 31, ], "type": "Punctuator", "value": "}", @@ -25096,341 +26600,118 @@ Object { } `; -exports[`typescript fixtures/basics/function-with-object-type-without-annotation.src 1`] = ` +exports[`typescript fixtures/basics/export-named-class-with-generic.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, + "declaration": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 1, + }, }, - "start": Object { - "column": 45, - "line": 1, + "range": Array [ + 20, + 24, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, }, + "name": "Foo", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", }, - "range": Array [ - 45, - 49, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, - "name": "foo", "range": Array [ - 9, - 12, + 7, + 24, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { + "superClass": null, + "type": "ClassDeclaration", + "typeParameters": Object { "loc": Object { "end": Object { - "column": 43, + "column": 19, "line": 1, }, "start": Object { - "column": 13, + "column": 16, "line": 1, }, }, - "properties": Array [ + "params": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - "kind": "init", "loc": Object { "end": Object { - "column": 17, + "column": 18, "line": 1, }, "start": Object { - "column": 14, + "column": 17, "line": 1, }, }, - "method": false, + "name": "T", "range": Array [ - 14, 17, + 18, ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 19, - 22, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, + "type": "TSTypeParameter", }, ], "range": Array [ - 13, - 43, + 16, + 19, ], - "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 { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 38, - ], - "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 { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "name": "baz", - "range": Array [ - 39, - 42, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 42, - ], - "type": "TSPropertySignature", - }, - ], - "range": Array [ - 25, - 43, - ], - "type": "TSTypeLiteral", - }, - }, + "type": "TSTypeParameterDeclaration", }, - ], + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, "range": Array [ 0, - 49, + 24, ], - "type": "FunctionDeclaration", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "loc": Object { @@ -25445,14 +26726,14 @@ Object { }, "range": Array [ 0, - 50, + 25, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 6, "line": 1, }, "start": Object { @@ -25462,10 +26743,10 @@ Object { }, "range": Array [ 0, - 8, + 6, ], "type": "Keyword", - "value": "function", + "value": "export", }, Object { "loc": Object { @@ -25474,301 +26755,436 @@ Object { "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, "range": Array [ - 9, + 7, 12, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 16, "line": 1, }, "start": Object { - "column": 12, + "column": 13, "line": 1, }, }, "range": Array [ - 12, 13, + 16, ], - "type": "Punctuator", - "value": "(", - }, + "type": "Identifier", + "value": "Foo", + }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 17, "line": 1, }, "start": Object { - "column": 13, + "column": 16, "line": 1, }, }, "range": Array [ - 13, - 14, + 16, + 17, ], "type": "Punctuator", - "value": "{", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 18, "line": 1, }, "start": Object { - "column": 14, + "column": 17, "line": 1, }, }, "range": Array [ - 14, 17, + 18, ], "type": "Identifier", - "value": "bar", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 19, "line": 1, }, "start": Object { - "column": 17, + "column": 18, "line": 1, }, }, "range": Array [ - 17, 18, + 19, ], "type": "Punctuator", - "value": ",", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 21, "line": 1, }, "start": Object { - "column": 19, + "column": 20, "line": 1, }, }, "range": Array [ - 19, - 22, + 20, + 21, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 22, 23, + 24, ], "type": "Punctuator", "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/export-named-class-with-multiple-generics.src 1`] = ` +Object { + "body": Array [ Object { + "declaration": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 27, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 27, + ], + "superClass": null, + "type": "ClassDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 17, + 18, + ], + "type": "TSTypeParameter", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 20, + 21, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 16, + 22, + ], + "type": "TSTypeParameterDeclaration", + }, + }, "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 23, + "column": 0, "line": 1, }, }, "range": Array [ - 23, - 24, + 0, + 27, ], - "type": "Punctuator", - "value": ":", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + ], + "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": 26, + "column": 6, "line": 1, }, "start": Object { - "column": 25, + "column": 0, "line": 1, }, }, "range": Array [ - 25, - 26, + 0, + 6, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 12, "line": 1, }, "start": Object { - "column": 26, + "column": 7, "line": 1, }, }, "range": Array [ - 26, - 29, + 7, + 12, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 16, "line": 1, }, "start": Object { - "column": 29, + "column": 13, "line": 1, }, }, "range": Array [ - 29, - 30, + 13, + 16, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 17, "line": 1, }, "start": Object { - "column": 31, + "column": 16, "line": 1, }, }, "range": Array [ - 31, - 37, + 16, + 17, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 18, "line": 1, }, "start": Object { - "column": 37, + "column": 17, "line": 1, }, }, "range": Array [ - 37, - 38, + 17, + 18, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 42, + "column": 19, "line": 1, }, "start": Object { - "column": 39, + "column": 18, "line": 1, }, }, "range": Array [ - 39, - 42, + 18, + 19, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 43, + "column": 21, "line": 1, }, "start": Object { - "column": 42, + "column": 20, "line": 1, }, }, "range": Array [ - 42, - 43, + 20, + 21, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "U", }, Object { "loc": Object { "end": Object { - "column": 44, + "column": 22, "line": 1, }, "start": Object { - "column": 43, + "column": 21, "line": 1, }, }, "range": Array [ - 43, - 44, + 21, + 22, ], "type": "Punctuator", - "value": ")", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 46, + "column": 24, "line": 1, }, "start": Object { - "column": 45, + "column": 23, "line": 1, }, }, "range": Array [ - 45, - 46, + 23, + 24, ], "type": "Punctuator", "value": "{", @@ -25785,8 +27201,8 @@ Object { }, }, "range": Array [ - 48, - 49, + 26, + 27, ], "type": "Punctuator", "value": "}", @@ -25796,35 +27212,81 @@ Object { } `; -exports[`typescript fixtures/basics/function-with-type-parameters.src 1`] = ` +exports[`typescript fixtures/basics/export-named-enum.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ + "declaration": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 12, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "members": Array [ Object { - "argument": Object { + "id": Object { "loc": Object { "end": Object { - "column": 12, + "column": 7, "line": 2, }, "start": Object { - "column": 11, + "column": 4, "line": 2, }, }, - "name": "b", + "name": "foo", "range": Array [ - 36, - 37, + 22, + 25, ], "type": "Identifier", }, + "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": 13, + "column": 11, "line": 2, }, "start": Object { @@ -25833,539 +27295,535 @@ Object { }, }, "range": Array [ + 22, 29, + ], + "type": "TSEnumMember", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 35, + 38, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 35, 38, ], - "type": "ReturnStatement", + "type": "TSEnumMember", }, ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, "range": Array [ - 23, + 7, 40, ], - "type": "BlockStatement", + "type": "TSEnumDeclaration", }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", }, + "range": Array [ + 0, + 40, + ], + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + ], + "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": 1, - "line": 3, + "column": 6, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "b", - "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 { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "X", - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - }, - }, - }, - }, - ], "range": Array [ 0, - 40, + 6, ], - "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 { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "X", - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - }, - }, - }, - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "X", - "range": Array [ - 11, - 12, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 10, - 13, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Keyword", + "value": "export", }, - }, - "range": Array [ - 0, - 41, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 11, "line": 1, }, "start": Object { - "column": 0, + "column": 7, "line": 1, }, }, "range": Array [ - 0, - 8, + 7, + 11, ], "type": "Keyword", - "value": "function", + "value": "enum", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 1, }, "start": Object { - "column": 9, + "column": 12, "line": 1, }, }, "range": Array [ - 9, - 10, + 12, + 15, ], "type": "Identifier", - "value": "a", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 17, "line": 1, }, "start": Object { - "column": 10, + "column": 16, "line": 1, }, }, "range": Array [ - 10, - 11, + 16, + 17, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 11, - 12, + 22, + 25, ], "type": "Identifier", - "value": "X", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 12, - 13, + 26, + 27, ], "type": "Punctuator", - "value": ">", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 13, - 14, + 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": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 14, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 14, - 15, + 35, + 38, ], "type": "Identifier", - "value": "b", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 15, - "line": 1, + "column": 0, + "line": 4, }, }, "range": Array [ - 15, - 16, + 39, + 40, ], "type": "Punctuator", - "value": ":", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/export-type-alias-declaration.src 1`] = ` +Object { + "body": Array [ Object { + "declaration": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "TestAlias", + "range": Array [ + 12, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 40, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 39, + ], + "type": "TSUnionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 30, + ], + "type": "TSStringKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 39, + ], + "type": "TSNumberKeyword", + }, + ], + }, + }, "loc": Object { "end": Object { - "column": 18, + "column": 40, "line": 1, }, "start": Object { - "column": 17, + "column": 0, "line": 1, }, }, "range": Array [ - 17, - 18, + 0, + 40, ], - "type": "Identifier", - "value": "X", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + ], + "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": 19, + "column": 6, "line": 1, }, "start": Object { - "column": 18, + "column": 0, "line": 1, }, }, "range": Array [ - 18, - 19, + 0, + 6, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 11, "line": 1, }, "start": Object { - "column": 19, + "column": 7, "line": 1, }, }, "range": Array [ - 19, - 20, + 7, + 11, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 21, "line": 1, }, "start": Object { - "column": 21, + "column": 12, "line": 1, }, }, "range": Array [ + 12, 21, - 22, ], "type": "Identifier", - "value": "X", + "value": "TestAlias", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 23, "line": 1, }, "start": Object { - "column": 23, + "column": 22, "line": 1, }, }, "range": Array [ + 22, 23, - 24, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ - 29, - 35, + 24, + 30, ], - "type": "Keyword", - "value": "return", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 31, + "line": 1, }, }, "range": Array [ - 36, - 37, + 31, + 32, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "|", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 39, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 33, + "line": 1, }, }, "range": Array [ - 37, - 38, + 33, + 39, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 40, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 39, + "line": 1, }, }, "range": Array [ @@ -26373,115 +27831,164 @@ Object { 40, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/function-with-type-parameters-that-have-comments.src 1`] = ` +exports[`typescript fixtures/basics/export-type-class-declaration.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", - }, - "expression": false, - "generator": false, - "id": Object { + "declaration": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "TestClassProps", + "range": Array [ + 12, + 26, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, - "name": "compare", "range": Array [ - 9, - 16, + 7, + 51, ], - "type": "Identifier", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "count", + "range": Array [ + 35, + 40, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 35, + 48, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 40, + 48, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 42, + 48, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 29, + 50, + ], + "type": "TSTypeLiteral", + }, }, "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [], "range": Array [ 0, - 35, + 51, ], - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 28, - 29, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 16, - 30, - ], - "type": "TSTypeParameterDeclaration", - }, + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { "column": 0, @@ -26490,14 +27997,14 @@ Object { }, "range": Array [ 0, - 35, + 51, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 6, "line": 1, }, "start": Object { @@ -26507,64 +28014,64 @@ Object { }, "range": Array [ 0, - 8, + 6, ], "type": "Keyword", - "value": "function", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 11, "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, "range": Array [ - 9, - 16, + 7, + 11, ], "type": "Identifier", - "value": "compare", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 26, "line": 1, }, "start": Object { - "column": 16, + "column": 12, "line": 1, }, }, "range": Array [ - 16, - 17, + 12, + 26, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "TestClassProps", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 28, "line": 1, }, "start": Object { - "column": 28, + "column": 27, "line": 1, }, }, "range": Array [ + 27, 28, - 29, ], - "type": "Identifier", - "value": "T", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { @@ -26582,212 +28089,157 @@ Object { 30, ], "type": "Punctuator", - "value": ">", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 30, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 30, - 31, + 35, + 40, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "count", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 31, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ - 31, - 32, + 40, + 41, ], "type": "Punctuator", - "value": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 33, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 33, - 34, + 42, + 48, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 34, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 34, - 35, + 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", } `; -exports[`typescript fixtures/basics/function-with-type-parameters-with-constraint.src 1`] = ` +exports[`typescript fixtures/basics/export-type-function-declaration.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "b", - "range": Array [ - 47, - 48, - ], - "type": "Identifier", + "declaration": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "start": Object { + "column": 12, + "line": 1, }, - "range": Array [ - 40, - 49, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 34, - "line": 1, }, + "name": "TestCallback", + "range": Array [ + 12, + 24, + ], + "type": "Identifier", }, - "range": Array [ - 34, - 51, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { "loc": Object { "end": Object { - "column": 10, + "column": 47, "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, - "name": "a", "range": Array [ - 9, - 10, + 7, + 47, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 29, + "column": 46, "line": 1, }, "start": Object { - "column": 25, + "column": 27, "line": 1, }, }, - "name": "b", - "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 { + "parameters": Array [ + Object { "loc": Object { "end": Object { - "column": 29, + "column": 37, "line": 1, }, "start": Object { @@ -26795,151 +28247,113 @@ Object { "line": 1, }, }, + "name": "a", "range": Array [ 28, - 29, + 37, ], - "type": "TSTypeReference", - "typeName": Object { + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 29, + "column": 37, "line": 1, }, "start": Object { - "column": 28, + "column": 29, "line": 1, }, }, - "name": "X", "range": Array [ - 28, 29, + 37, ], - "type": "Identifier", + "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 [ - 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, + 27, + 46, ], - "type": "TSTypeReference", - "typeName": Object { + "type": "TSFunctionType", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 33, + "column": 46, "line": 1, }, "start": Object { - "column": 32, + "column": 40, "line": 1, }, }, - "name": "X", "range": Array [ - 32, - 33, + 40, + 46, ], - "type": "Identifier", - }, - }, - }, - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": Object { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 23, + "column": 46, "line": 1, }, "start": Object { - "column": 21, + "column": 42, "line": 1, }, }, - "members": Array [], "range": Array [ - 21, - 23, + 42, + 46, ], - "type": "TSTypeLiteral", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, + "type": "TSVoidKeyword", }, - "name": "X", - "range": Array [ - 11, - 23, - ], - "type": "TSTypeParameter", }, - ], - "range": Array [ - 10, - 24, - ], - "type": "TSTypeParameterDeclaration", + "typeParameters": null, + }, + }, + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, }, + "range": Array [ + 0, + 47, + ], + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 4, + "column": 47, + "line": 1, }, "start": Object { "column": 0, @@ -26948,14 +28362,14 @@ Object { }, "range": Array [ 0, - 52, + 47, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 6, "line": 1, }, "start": Object { @@ -26965,28 +28379,10 @@ Object { }, "range": Array [ 0, - 8, + 6, ], "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", + "value": "export", }, Object { "loc": Object { @@ -26995,88 +28391,16 @@ Object { "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, + "column": 7, "line": 1, }, }, "range": Array [ + 7, 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": "}", + "value": "type", }, Object { "loc": Object { @@ -27085,34 +28409,16 @@ Object { "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, + "column": 12, "line": 1, }, }, "range": Array [ + 12, 24, - 25, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "TestCallback", }, Object { "loc": Object { @@ -27129,26 +28435,26 @@ Object { 25, 26, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 28, "line": 1, }, "start": Object { - "column": 26, + "column": 27, "line": 1, }, }, "range": Array [ - 26, 27, + 28, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { @@ -27166,7 +28472,7 @@ Object { 29, ], "type": "Identifier", - "value": "X", + "value": "a", }, Object { "loc": Object { @@ -27184,168 +28490,149 @@ Object { 30, ], "type": "Punctuator", - "value": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 37, "line": 1, }, "start": Object { - "column": 30, + "column": 31, "line": 1, }, }, "range": Array [ - 30, 31, + 37, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 33, + "column": 38, "line": 1, }, "start": Object { - "column": 32, + "column": 37, "line": 1, }, }, "range": Array [ - 32, - 33, + 37, + 38, ], - "type": "Identifier", - "value": "X", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 41, "line": 1, }, "start": Object { - "column": 34, + "column": 39, "line": 1, }, }, "range": Array [ - 34, - 35, + 39, + 41, ], "type": "Punctuator", - "value": "{", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 46, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 42, + "line": 1, }, }, "range": Array [ - 40, + 42, 46, ], "type": "Keyword", - "value": "return", + "value": "void", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 47, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 46, + "line": 1, }, }, "range": Array [ + 46, 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", } `; -exports[`typescript fixtures/basics/function-with-types.src 1`] = ` +exports[`typescript fixtures/basics/function-with-await.src 1`] = ` Object { "body": Array [ Object { - "async": false, + "async": true, "body": Object { "body": Array [ Object { - "argument": Object { + "expression": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "name": "future", + "range": Array [ + 40, + 46, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 15, + "column": 16, "line": 2, }, "start": Object { - "column": 11, + "column": 4, "line": 2, }, }, - "name": "name", "range": Array [ - 50, - 54, + 34, + 46, ], - "type": "Identifier", + "type": "AwaitExpression", }, "loc": Object { "end": Object { - "column": 16, + "column": 17, "line": 2, }, "start": Object { @@ -27354,10 +28641,10 @@ Object { }, }, "range": Array [ - 43, - 55, + 34, + 47, ], - "type": "ReturnStatement", + "type": "ExpressionStatement", }, ], "loc": Object { @@ -27366,13 +28653,13 @@ Object { "line": 3, }, "start": Object { - "column": 37, + "column": 28, "line": 1, }, }, "range": Array [ - 37, - 57, + 28, + 49, ], "type": "BlockStatement", }, @@ -27381,18 +28668,18 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 16, + "column": 19, "line": 1, }, "start": Object { - "column": 9, + "column": 15, "line": 1, }, }, - "name": "message", + "name": "hope", "range": Array [ - 9, - 16, + 15, + 19, ], "type": "Identifier", }, @@ -27410,94 +28697,26 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 26, "line": 1, }, "start": Object { - "column": 17, + "column": 20, "line": 1, }, }, - "name": "name", + "name": "future", "range": Array [ - 17, - 28, + 20, + 26, ], "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, + 49, ], - "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", }, ], @@ -27513,14 +28732,14 @@ Object { }, "range": Array [ 0, - 58, + 50, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { @@ -27530,7 +28749,25 @@ Object { }, "range": Array [ 0, - 8, + 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", @@ -27538,35 +28775,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, + "column": 19, "line": 1, }, "start": Object { - "column": 9, + "column": 15, "line": 1, }, }, "range": Array [ - 9, - 16, + 15, + 19, ], "type": "Identifier", - "value": "message", + "value": "hope", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 20, "line": 1, }, "start": Object { - "column": 16, + "column": 19, "line": 1, }, }, "range": Array [ - 16, - 17, + 19, + 20, ], "type": "Punctuator", "value": "(", @@ -27574,56 +28811,38 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 26, "line": 1, }, "start": Object { - "column": 17, + "column": 20, "line": 1, }, }, "range": Array [ - 17, - 21, + 20, + 26, ], "type": "Identifier", - "value": "name", + "value": "future", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 27, "line": 1, }, "start": Object { - "column": 21, + "column": 26, "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, + 26, + 27, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { @@ -27641,66 +28860,12 @@ Object { 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, + "column": 9, "line": 2, }, "start": Object { @@ -27709,44 +28874,44 @@ Object { }, }, "range": Array [ - 43, - 49, + 34, + 39, ], - "type": "Keyword", - "value": "return", + "type": "Identifier", + "value": "await", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 16, "line": 2, }, "start": Object { - "column": 11, + "column": 10, "line": 2, }, }, "range": Array [ - 50, - 54, + 40, + 46, ], "type": "Identifier", - "value": "name", + "value": "future", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 17, "line": 2, }, "start": Object { - "column": 15, + "column": 16, "line": 2, }, }, "range": Array [ - 54, - 55, + 46, + 47, ], "type": "Punctuator", "value": ";", @@ -27763,8 +28928,8 @@ Object { }, }, "range": Array [ - 56, - 57, + 48, + 49, ], "type": "Punctuator", "value": "}", @@ -27774,62 +28939,26 @@ Object { } `; -exports[`typescript fixtures/basics/function-with-types-assignation.src 1`] = ` +exports[`typescript fixtures/basics/function-with-object-type-with-optional-properties.src 1`] = ` Object { "body": Array [ Object { "async": false, "body": Object { - "body": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "name", - "range": Array [ - 89, - 93, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 82, - 94, - ], - "type": "ReturnStatement", - }, - ], + "body": Array [], "loc": Object { "end": Object { "column": 1, "line": 3, }, "start": Object { - "column": 78, + "column": 47, "line": 1, }, }, "range": Array [ - 78, - 96, + 47, + 51, ], "type": "BlockStatement", }, @@ -27838,7 +28967,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 16, + "column": 12, "line": 1, }, "start": Object { @@ -27846,10 +28975,10 @@ Object { "line": 1, }, }, - "name": "message", + "name": "foo", "range": Array [ 9, - 16, + 12, ], "type": "Identifier", }, @@ -27867,305 +28996,285 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 45, "line": 1, }, "start": Object { - "column": 17, + "column": 13, "line": 1, }, }, - "name": "name", - "range": Array [ - 17, - 28, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", }, - }, - "range": Array [ - 21, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "kind": "init", "loc": Object { "end": Object { - "column": 28, + "column": 17, "line": 1, }, "start": Object { - "column": 22, + "column": 14, "line": 1, }, }, + "method": false, "range": Array [ - 22, - 28, + 14, + 17, ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", }, }, - "name": "age", - "range": Array [ - 30, - 40, - ], - "type": "Identifier", - "typeAnnotation": Object { + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 40, + "column": 22, "line": 1, }, "start": Object { - "column": 33, + "column": 19, "line": 1, }, }, + "method": false, "range": Array [ - 33, - 40, + 19, + 22, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "shorthand": true, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 40, + "column": 22, "line": 1, }, "start": Object { - "column": 34, + "column": 19, "line": 1, }, }, + "name": "baz", "range": Array [ - 34, - 40, + 19, + 22, ], - "type": "TSNumberKeyword", + "type": "Identifier", }, }, - }, - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, + ], "range": Array [ - 30, - 46, + 13, + 45, ], - "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", - }, - Object { - "argument": Object { + "type": "ObjectPattern", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 69, + "column": 45, "line": 1, }, "start": Object { - "column": 51, + "column": 23, "line": 1, }, }, - "name": "args", "range": Array [ - 51, - 69, + 23, + 45, ], - "type": "Identifier", + "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 69, + "column": 45, "line": 1, }, "start": Object { - "column": 55, + "column": 25, "line": 1, }, }, - "range": Array [ - 55, - 69, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 69, - "line": 1, - }, - "start": Object { - "column": 56, - "line": 1, + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", }, - }, - "range": Array [ - 56, - 69, - ], - "type": "TSTypeReference", - "typeName": Object { "loc": Object { "end": Object { - "column": 61, + "column": 39, "line": 1, }, "start": Object { - "column": 56, + "column": 26, "line": 1, }, }, - "name": "Array", + "optional": true, "range": Array [ - 56, - 61, + 26, + 39, ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 69, - "line": 1, - }, - "start": Object { - "column": 61, - "line": 1, + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, }, - }, - "params": Array [ - Object { + "range": Array [ + 30, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 68, + "column": 38, "line": 1, }, "start": Object { - "column": 62, + "column": 32, "line": 1, }, }, "range": Array [ - 62, - 68, + 32, + 38, ], "type": "TSStringKeyword", }, - ], + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 40, + 43, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "optional": true, "range": Array [ - 61, - 69, + 40, + 44, ], - "type": "TSTypeParameterInstantiation", + "type": "TSPropertySignature", }, - }, - }, - }, - "loc": Object { - "end": Object { - "column": 69, - "line": 1, - }, - "start": Object { - "column": 48, - "line": 1, + ], + "range": Array [ + 25, + 45, + ], + "type": "TSTypeLiteral", }, }, - "range": Array [ - 48, - 69, - ], - "type": "RestElement", }, ], "range": Array [ 0, - 96, + 51, ], - "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", }, ], @@ -28181,7 +29290,7 @@ Object { }, "range": Array [ 0, - 97, + 52, ], "sourceType": "script", "tokens": Array [ @@ -28206,7 +29315,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, + "column": 12, "line": 1, }, "start": Object { @@ -28216,25 +29325,25 @@ Object { }, "range": Array [ 9, - 16, + 12, ], "type": "Identifier", - "value": "message", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 13, "line": 1, }, "start": Object { - "column": 16, + "column": 12, "line": 1, }, }, "range": Array [ - 16, - 17, + 12, + 13, ], "type": "Punctuator", "value": "(", @@ -28242,71 +29351,53 @@ Object { 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, + "column": 14, "line": 1, }, "start": Object { - "column": 21, + "column": 13, "line": 1, }, }, "range": Array [ - 21, - 22, + 13, + 14, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 17, "line": 1, }, "start": Object { - "column": 22, + "column": 14, "line": 1, }, }, "range": Array [ - 22, - 28, + 14, + 17, ], "type": "Identifier", - "value": "string", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 18, "line": 1, }, "start": Object { - "column": 28, + "column": 17, "line": 1, }, }, "range": Array [ - 28, - 29, + 17, + 18, ], "type": "Punctuator", "value": ",", @@ -28314,161 +29405,125 @@ Object { Object { "loc": Object { "end": Object { - "column": 33, + "column": 22, "line": 1, }, "start": Object { - "column": 30, + "column": 19, "line": 1, }, }, "range": Array [ - 30, - 33, + 19, + 22, ], "type": "Identifier", - "value": "age", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 23, "line": 1, }, "start": Object { - "column": 33, + "column": 22, "line": 1, }, }, "range": Array [ - 33, - 34, + 22, + 23, ], "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", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 42, + "column": 24, "line": 1, }, "start": Object { - "column": 41, + "column": 23, "line": 1, }, }, "range": Array [ - 41, - 42, + 23, + 24, ], "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", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 47, + "column": 26, "line": 1, }, "start": Object { - "column": 46, + "column": 25, "line": 1, }, }, "range": Array [ - 46, - 47, + 25, + 26, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 51, + "column": 29, "line": 1, }, "start": Object { - "column": 48, + "column": 26, "line": 1, }, }, "range": Array [ - 48, - 51, + 26, + 29, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 55, + "column": 30, "line": 1, }, "start": Object { - "column": 51, + "column": 29, "line": 1, }, }, "range": Array [ - 51, - 55, + 29, + 30, ], - "type": "Identifier", - "value": "args", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 56, + "column": 31, "line": 1, }, "start": Object { - "column": 55, + "column": 30, "line": 1, }, }, "range": Array [ - 55, - 56, + 30, + 31, ], "type": "Punctuator", "value": ":", @@ -28476,201 +29531,129 @@ Object { Object { "loc": Object { "end": Object { - "column": 61, + "column": 38, "line": 1, }, "start": Object { - "column": 56, + "column": 32, "line": 1, }, }, "range": Array [ - 56, - 61, + 32, + 38, ], "type": "Identifier", - "value": "Array", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 62, + "column": 39, "line": 1, }, "start": Object { - "column": 61, + "column": 38, "line": 1, }, }, "range": Array [ - 61, - 62, + 38, + 39, ], "type": "Punctuator", - "value": "<", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 68, + "column": 43, "line": 1, }, "start": Object { - "column": 62, + "column": 40, "line": 1, }, }, "range": Array [ - 62, - 68, + 40, + 43, ], "type": "Identifier", - "value": "string", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 69, + "column": 44, "line": 1, }, "start": Object { - "column": 68, + "column": 43, "line": 1, }, }, "range": Array [ - 68, - 69, + 43, + 44, ], "type": "Punctuator", - "value": ">", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 70, + "column": 45, "line": 1, }, "start": Object { - "column": 69, + "column": 44, "line": 1, }, }, "range": Array [ - 69, - 70, + 44, + 45, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 71, + "column": 46, "line": 1, }, "start": Object { - "column": 70, + "column": 45, "line": 1, }, }, "range": Array [ - 70, - 71, + 45, + 46, ], "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", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 79, + "column": 48, "line": 1, }, "start": Object { - "column": 78, + "column": 47, "line": 1, }, }, "range": Array [ - 78, - 79, + 47, + 48, ], "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 { @@ -28683,8 +29666,8 @@ Object { }, }, "range": Array [ - 95, - 96, + 50, + 51, ], "type": "Punctuator", "value": "}", @@ -28694,48 +29677,35 @@ Object { } `; -exports[`typescript fixtures/basics/import-type.src 1`] = ` +exports[`typescript fixtures/basics/function-with-object-type-without-annotation.src 1`] = ` Object { "body": Array [ Object { - "id": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 5, + "column": 45, "line": 1, }, }, - "name": "A", "range": Array [ - 5, - 6, + 45, + 49, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "BlockStatement", }, - "range": Array [ - 0, - 28, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "isTypeOf": true, + "expression": false, + "generator": false, + "id": Object { "loc": Object { "end": Object { - "column": 27, + "column": 12, "line": 1, }, "start": Object { @@ -28743,217 +29713,311 @@ Object { "line": 1, }, }, - "parameter": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 26, - ], - "raw": "'A'", - "type": "Literal", - "value": "A", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "TSLiteralType", - }, - "qualifier": null, + "name": "foo", "range": Array [ 9, - 27, - ], - "type": "TSImportType", - "typeParameters": null, - }, - }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "B", - "range": Array [ - 34, - 35, + 12, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, - "range": Array [ - 29, - 55, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "isTypeOf": false, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "parameter": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 45, - 48, - ], - "raw": "\\"B\\"", - "type": "Literal", - "value": "B", - }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 43, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 13, + "line": 1, }, }, - "range": Array [ - 45, - 48, - ], - "type": "TSLiteralType", - }, - "qualifier": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "name": "X", - "range": Array [ - 50, - 51, - ], - "type": "Identifier", - }, - "range": Array [ - 38, - 54, - ], - "type": "TSImportType", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 14, + 17, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, }, - }, - "params": Array [ Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 19, + "line": 1, }, }, + "method": false, "range": Array [ - 52, - 53, + 19, + 22, ], - "type": "TSTypeReference", - "typeName": Object { + "shorthand": true, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 19, + "line": 1, }, }, - "name": "Y", + "name": "baz", "range": Array [ - 52, - 53, + 19, + 22, ], "type": "Identifier", }, }, ], "range": Array [ - 51, - 54, + 13, + 43, ], - "type": "TSTypeParameterInstantiation", + "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 { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 38, + ], + "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 { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 39, + 42, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 42, + ], + "type": "TSPropertySignature", + }, + ], + "range": Array [ + 25, + 43, + ], + "type": "TSTypeLiteral", + }, + }, }, - }, + ], + "range": Array [ + 0, + 49, + ], + "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 4, }, "start": Object { "column": 0, @@ -28962,14 +30026,14 @@ Object { }, "range": Array [ 0, - 56, + 50, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, + "column": 8, "line": 1, }, "start": Object { @@ -28979,435 +30043,405 @@ Object { }, "range": Array [ 0, - 4, + 8, ], - "type": "Identifier", - "value": "type", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 12, "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, "range": Array [ - 5, - 6, + 9, + 12, ], "type": "Identifier", - "value": "A", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 13, "line": 1, }, "start": Object { - "column": 7, + "column": 12, "line": 1, }, }, "range": Array [ - 7, - 8, + 12, + 13, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 14, "line": 1, }, "start": Object { - "column": 9, + "column": 13, "line": 1, }, }, "range": Array [ - 9, - 15, + 13, + 14, ], - "type": "Keyword", - "value": "typeof", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 17, "line": 1, }, "start": Object { - "column": 16, + "column": 14, "line": 1, }, }, "range": Array [ - 16, - 22, + 14, + 17, ], - "type": "Keyword", - "value": "import", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 18, "line": 1, }, "start": Object { - "column": 22, + "column": 17, "line": 1, }, }, "range": Array [ - 22, - 23, + 17, + 18, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 22, "line": 1, }, "start": Object { - "column": 23, + "column": 19, "line": 1, }, }, "range": Array [ - 23, - 26, + 19, + 22, ], - "type": "String", - "value": "'A'", + "type": "Identifier", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 23, "line": 1, }, "start": Object { - "column": 26, + "column": 22, "line": 1, }, }, "range": Array [ - 26, - 27, + 22, + 23, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 24, "line": 1, }, "start": Object { - "column": 27, + "column": 23, "line": 1, }, }, "range": Array [ - 27, - 28, + 23, + 24, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 29, - 33, + 25, + 26, ], - "type": "Identifier", - "value": "type", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 34, - 35, + 26, + 29, ], "type": "Identifier", - "value": "B", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 29, + "line": 1, }, }, "range": Array [ - 36, - 37, + 29, + 30, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 37, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 31, + "line": 1, }, }, "range": Array [ - 38, - 44, + 31, + 37, ], - "type": "Keyword", - "value": "import", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 38, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 37, + "line": 1, }, }, "range": Array [ - 44, - 45, + 37, + 38, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 42, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 39, + "line": 1, }, }, "range": Array [ - 45, - 48, + 39, + 42, ], - "type": "String", - "value": "\\"B\\"", + "type": "Identifier", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 43, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 42, + "line": 1, }, }, "range": Array [ - 48, - 49, + 42, + 43, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 44, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 43, + "line": 1, }, }, "range": Array [ - 49, - 50, + 43, + 44, ], "type": "Punctuator", - "value": ".", + "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, + "column": 46, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 45, + "line": 1, }, }, "range": Array [ - 53, - 54, + 45, + 46, ], "type": "Punctuator", - "value": ">", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { - "column": 25, - "line": 2, + "column": 0, + "line": 3, }, }, "range": Array [ - 54, - 55, + 48, + 49, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/import-type-with-type-parameters-in-type-reference.src 1`] = ` +exports[`typescript fixtures/basics/function-with-type-parameters.src 1`] = ` Object { "body": Array [ Object { - "id": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "b", + "range": Array [ + 36, + 37, + ], + "type": "Identifier", + }, + "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": 6, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 5, + "column": 23, "line": 1, }, }, - "name": "X", "range": Array [ - 5, - 6, + 23, + 40, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "BlockStatement", }, - "range": Array [ - 0, - 30, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { + "expression": false, + "generator": false, + "id": Object { "loc": Object { "end": Object { - "column": 29, + "column": 10, "line": 1, }, "start": Object { @@ -29415,163 +30449,195 @@ Object { "line": 1, }, }, + "name": "a", "range": Array [ 9, - 29, + 10, ], - "type": "TSTypeReference", - "typeName": Object { + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 10, + "column": 18, "line": 1, }, "start": Object { - "column": 9, + "column": 14, "line": 1, }, }, - "name": "A", + "name": "b", "range": Array [ - 9, - 10, + 14, + 18, ], "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, }, - }, - "params": Array [ - Object { - "isTypeOf": false, + "range": Array [ + 15, + 18, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 28, + "column": 18, "line": 1, }, "start": Object { - "column": 11, + "column": 17, "line": 1, }, }, - "parameter": Object { - "literal": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "raw": "\\"\\"", - "type": "Literal", - "value": "", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "TSLiteralType", - }, - "qualifier": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "B", - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - }, "range": Array [ - 11, - 28, + 17, + 18, ], - "type": "TSImportType", - "typeParameters": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 28, + "column": 18, "line": 1, }, "start": Object { - "column": 23, + "column": 17, "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", - }, - ], + "name": "X", "range": Array [ - 23, - 28, + 17, + 18, ], - "type": "TSTypeParameterInstantiation", + "type": "Identifier", }, }, - ], + }, + }, + ], + "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 [ - 10, - 29, + 21, + 22, ], - "type": "TSTypeParameterInstantiation", + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + }, + }, + "type": "FunctionDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 11, + 12, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 10, + 13, + ], + "type": "TSTypeParameterDeclaration", }, }, ], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -29580,14 +30646,14 @@ Object { }, "range": Array [ 0, - 31, + 41, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, + "column": 8, "line": 1, }, "start": Object { @@ -29597,46 +30663,10 @@ Object { }, "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": "=", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { @@ -29654,7 +30684,7 @@ Object { 10, ], "type": "Identifier", - "value": "A", + "value": "a", }, Object { "loc": Object { @@ -29677,7 +30707,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, + "column": 12, "line": 1, }, "start": Object { @@ -29687,395 +30717,226 @@ Object { }, "range": Array [ 11, - 17, + 12, ], - "type": "Keyword", - "value": "import", + "type": "Identifier", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 13, "line": 1, }, "start": Object { - "column": 17, + "column": 12, "line": 1, }, }, "range": Array [ - 17, - 18, + 12, + 13, ], "type": "Punctuator", - "value": "(", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 14, "line": 1, }, "start": Object { - "column": 18, + "column": 13, "line": 1, }, }, "range": Array [ - 18, - 20, + 13, + 14, ], - "type": "String", - "value": "\\"\\"", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 15, "line": 1, }, "start": Object { - "column": 20, + "column": 14, "line": 1, }, }, "range": Array [ - 20, - 21, + 14, + 15, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 21, + "column": 15, "line": 1, }, }, "range": Array [ - 21, - 22, + 15, + 16, ], "type": "Punctuator", - "value": ".", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 18, "line": 1, }, "start": Object { - "column": 22, + "column": 17, "line": 1, }, }, "range": Array [ - 22, - 23, + 17, + 18, ], "type": "Identifier", - "value": "B", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 19, "line": 1, }, "start": Object { - "column": 23, + "column": 18, "line": 1, }, }, "range": Array [ - 23, - 24, + 18, + 19, ], "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", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 20, "line": 1, }, "start": Object { - "column": 27, + "column": 19, "line": 1, }, }, "range": Array [ - 27, - 28, + 19, + 20, ], "type": "Punctuator", - "value": ">", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 22, "line": 1, }, "start": Object { - "column": 28, + "column": 21, "line": 1, }, }, "range": Array [ - 28, - 29, + 21, + 22, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 24, "line": 1, }, "start": Object { - "column": 29, + "column": 23, "line": 1, }, }, "range": Array [ - 29, - 30, + 23, + 24, ], "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/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", - }, - "heritage": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "Bar", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "TSInterfaceHeritage", - }, - ], - "id": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "type": "TSInterfaceDeclaration", - }, - ], - "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", + "value": "{", }, 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, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 14, - 21, + 29, + 35, ], "type": "Keyword", - "value": "extends", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 22, - 25, + 36, + 37, ], "type": "Identifier", - "value": "Bar", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 26, - "line": 1, + "column": 12, + "line": 2, }, }, "range": Array [ - 26, - 27, + 37, + 38, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { @@ -30089,8 +30950,8 @@ Object { }, }, "range": Array [ - 29, - 30, + 39, + 40, ], "type": "Punctuator", "value": "}", @@ -30100,139 +30961,108 @@ Object { } `; -exports[`typescript fixtures/basics/interface-extends-multiple.src 1`] = ` +exports[`typescript fixtures/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": 1, - "line": 3, + "column": 35, + "line": 1, }, "start": Object { - "column": 30, + "column": 33, "line": 1, }, }, "range": Array [ - 30, - 34, + 33, + 35, ], - "type": "TSInterfaceBody", + "type": "BlockStatement", }, - "heritage": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "Bar", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "TSInterfaceHeritage", - }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "Baz", - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "TSInterfaceHeritage", - }, - ], + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 16, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, - "name": "Foo", + "name": "compare", "range": Array [ - 10, - 13, + 9, + 16, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 35, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, + "params": Array [], "range": Array [ 0, - 34, + 35, ], - "type": "TSInterfaceDeclaration", + "type": "FunctionDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 28, + 29, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 16, + 30, + ], + "type": "TSTypeParameterDeclaration", + }, }, ], "loc": Object { "end": Object { - "column": 0, - "line": 4, + "column": 35, + "line": 1, }, "start": Object { "column": 0, @@ -30248,7 +31078,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 8, "line": 1, }, "start": Object { @@ -30258,128 +31088,128 @@ Object { }, "range": Array [ 0, - 9, + 8, ], "type": "Keyword", - "value": "interface", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 16, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, "range": Array [ - 10, - 13, + 9, + 16, ], "type": "Identifier", - "value": "Foo", + "value": "compare", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 17, "line": 1, }, "start": Object { - "column": 14, + "column": 16, "line": 1, }, }, "range": Array [ - 14, - 21, + 16, + 17, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 29, "line": 1, }, "start": Object { - "column": 22, + "column": 28, "line": 1, }, }, "range": Array [ - 22, - 25, + 28, + 29, ], "type": "Identifier", - "value": "Bar", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 30, "line": 1, }, "start": Object { - "column": 25, + "column": 29, "line": 1, }, }, "range": Array [ - 25, - 26, + 29, + 30, ], "type": "Punctuator", - "value": ",", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 31, "line": 1, }, "start": Object { - "column": 26, + "column": 30, "line": 1, }, }, "range": Array [ - 26, - 29, + 30, + 31, ], - "type": "Identifier", - "value": "Baz", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 32, "line": 1, }, "start": Object { - "column": 30, + "column": 31, "line": 1, }, }, "range": Array [ - 30, 31, + 32, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 34, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 33, + "line": 1, }, }, "range": Array [ @@ -30387,6 +31217,24 @@ Object { 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": "}", }, ], @@ -30394,44 +31242,82 @@ Object { } `; -exports[`typescript fixtures/basics/interface-type-parameters.src 1`] = ` +exports[`typescript fixtures/basics/function-with-type-parameters-with-constraint.src 1`] = ` Object { "body": Array [ Object { + "async": false, "body": Object { - "body": Array [], - "loc": Object { - "end": Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "b", + "range": Array [ + 47, + 48, + ], + "type": "Identifier", + }, + "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": 17, + "column": 34, "line": 1, }, }, "range": Array [ - 17, - 21, + 34, + 51, ], - "type": "TSInterfaceBody", + "type": "BlockStatement", }, - "heritage": Array [], + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 10, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, - "name": "Foo", + "name": "a", "range": Array [ + 9, 10, - 13, ], "type": "Identifier", }, @@ -30445,45 +31331,187 @@ Object { "line": 1, }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "b", + "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 { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + }, + }, + }, + }, + ], "range": Array [ 0, - 21, + 51, ], - "type": "TSInterfaceDeclaration", + "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 { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 32, + 33, + ], + "type": "Identifier", + }, + }, + }, + "type": "FunctionDeclaration", "typeParameters": Object { "loc": Object { "end": Object { - "column": 16, + "column": 24, "line": 1, }, "start": Object { - "column": 13, + "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", + }, "loc": Object { "end": Object { - "column": 15, + "column": 23, "line": 1, }, "start": Object { - "column": 14, + "column": 11, "line": 1, }, }, - "name": "T", + "name": "X", "range": Array [ - 14, - 15, + 11, + 23, ], "type": "TSTypeParameter", }, ], "range": Array [ - 13, - 16, + 10, + 24, ], "type": "TSTypeParameterDeclaration", }, @@ -30501,14 +31529,14 @@ Object { }, "range": Array [ 0, - 22, + 52, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 8, "line": 1, }, "start": Object { @@ -30518,15 +31546,33 @@ Object { }, "range": Array [ 0, - 9, + 8, ], "type": "Keyword", - "value": "interface", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 13, + "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 { @@ -30536,15 +31582,33 @@ Object { }, "range": Array [ 10, - 13, + 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": "Foo", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 20, "line": 1, }, "start": Object { @@ -30554,43 +31618,61 @@ Object { }, "range": Array [ 13, - 14, + 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": "<", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 23, "line": 1, }, "start": Object { - "column": 14, + "column": 22, "line": 1, }, }, "range": Array [ - 14, - 15, + 22, + 23, ], - "type": "Identifier", - "value": "T", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 24, "line": 1, }, "start": Object { - "column": 15, + "column": 23, "line": 1, }, }, "range": Array [ - 15, - 16, + 23, + 24, ], "type": "Punctuator", "value": ">", @@ -30598,21 +31680,201 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 25, "line": 1, }, "start": Object { - "column": 17, + "column": 24, "line": 1, }, }, "range": Array [ - 17, - 18, + 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 { @@ -30625,8 +31887,8 @@ Object { }, }, "range": Array [ - 20, - 21, + 50, + 51, ], "type": "Punctuator", "value": "}", @@ -30636,29 +31898,29 @@ Object { } `; -exports[`typescript fixtures/basics/interface-with-all-property-types.src 1`] = ` +exports[`typescript fixtures/basics/function-with-types.src 1`] = ` Object { "body": Array [ Object { + "async": false, "body": Object { "body": Array [ Object { - "computed": false, - "key": Object { + "argument": Object { "loc": Object { "end": Object { - "column": 7, + "column": 15, "line": 2, }, "start": Object { - "column": 4, + "column": 11, "line": 2, }, }, - "name": "baa", + "name": "name", "range": Array [ - 20, - 23, + 50, + 54, ], "type": "Identifier", }, @@ -30673,1234 +31935,825 @@ Object { }, }, "range": Array [ - 20, - 32, + 43, + 55, ], - "type": "TSPropertySignature", + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 57, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "message", + "range": Array [ + 9, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "name", + "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": 15, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 23, - 31, + 22, + 28, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "TSNumberKeyword", - }, + "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", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/basics/function-with-types-assignation.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [ Object { - "computed": false, - "key": Object { + "argument": Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 13, + "line": 2, }, "start": Object { - "column": 4, - "line": 3, + "column": 9, + "line": 2, }, }, - "name": "bar", + "name": "name", "range": Array [ - 37, - 40, + 89, + 93, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 17, - "line": 3, + "column": 14, + "line": 2, }, "start": Object { - "column": 4, - "line": 3, + "column": 2, + "line": 2, }, }, - "optional": true, "range": Array [ - 37, - 50, + 82, + 94, ], - "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", - }, - }, + "type": "ReturnStatement", }, - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "name": "bax", - "range": Array [ - 56, - 59, - ], - "type": "Identifier", + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 78, + "line": 1, + }, + }, + "range": Array [ + 78, + 96, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "message", + "range": Array [ + 9, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "name", + "range": Array [ + 17, + 28, + ], + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 18, - "line": 4, + "column": 28, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 21, + "line": 1, }, }, "range": Array [ - 55, - 69, + 21, + 28, ], - "type": "TSPropertySignature", + "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 17, - "line": 4, + "column": 28, + "line": 1, }, "start": Object { - "column": 9, - "line": 4, + "column": 22, + "line": 1, }, }, "range": Array [ - 60, - 68, + 22, + 28, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "range": Array [ - 62, - 68, - ], - "type": "TSStringKeyword", - }, + "type": "TSStringKeyword", }, }, - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, - }, - "start": Object { - "column": 5, - "line": 5, - }, - }, - "name": "baz", - "range": Array [ - 75, - 78, - ], - "type": "Identifier", - }, + }, + Object { + "left": Object { "loc": Object { "end": Object { - "column": 19, - "line": 5, + "column": 40, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 30, + "line": 1, }, }, - "optional": true, + "name": "age", "range": Array [ - 74, - 89, + 30, + 40, ], - "type": "TSPropertySignature", + "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 18, - "line": 5, + "column": 40, + "line": 1, }, "start": Object { - "column": 10, - "line": 5, + "column": 33, + "line": 1, }, }, "range": Array [ - 80, - 88, + 33, + 40, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 18, - "line": 5, + "column": 40, + "line": 1, }, "start": Object { - "column": 12, - "line": 5, + "column": 34, + "line": 1, }, }, "range": Array [ - 82, - 88, + 34, + 40, ], - "type": "TSStringKeyword", + "type": "TSNumberKeyword", }, }, }, - Object { - "index": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, - }, - "start": Object { - "column": 5, - "line": 6, - }, + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 46, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, }, - "name": "eee", - "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", - }, + "start": Object { + "column": 43, + "line": 1, }, }, + "range": Array [ + 43, + 46, + ], + "raw": "100", + "type": "Literal", + "value": 100, + }, + "type": "AssignmentPattern", + }, + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 26, - "line": 6, + "column": 69, + "line": 1, }, "start": Object { - "column": 4, - "line": 6, + "column": 51, + "line": 1, }, }, + "name": "args", "range": Array [ - 94, - 116, + 51, + 69, ], - "static": false, - "type": "TSIndexSignature", + "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 25, - "line": 6, + "column": 69, + "line": 1, }, "start": Object { - "column": 17, - "line": 6, + "column": 55, + "line": 1, }, }, "range": Array [ - 107, - 115, + 55, + 69, ], "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 { - "index": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 5, - "line": 7, - }, - }, - "name": "fff", - "optional": true, - "range": Array [ - 122, - 134, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 7, + "column": 69, + "line": 1, }, "start": Object { - "column": 9, - "line": 7, + "column": 56, + "line": 1, }, }, "range": Array [ - 126, - 134, + 56, + 69, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 17, - "line": 7, + "column": 61, + "line": 1, }, "start": Object { - "column": 11, - "line": 7, + "column": 56, + "line": 1, }, }, + "name": "Array", "range": Array [ - 128, - 134, + 56, + 61, ], - "type": "TSNumberKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 27, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 121, - 144, - ], - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 7, - }, - "start": Object { - "column": 18, - "line": 7, + "type": "Identifier", }, - }, - "range": Array [ - 135, - 143, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 7, - }, - "start": Object { - "column": 20, - "line": 7, + "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", }, - "range": Array [ - 137, - 143, - ], - "type": "TSStringKeyword", }, }, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "name": "doo", - "range": Array [ - 149, - 152, - ], - "type": "Identifier", + "loc": Object { + "end": Object { + "column": 69, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 16, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "optional": false, - "params": Array [], - "range": Array [ - 149, - 161, - ], - "static": false, - "type": "TSMethodSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 9, - "line": 8, - }, - }, - "range": Array [ - 154, - 160, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 11, - "line": 8, - }, - }, - "range": Array [ - 156, - 160, - ], - "type": "TSVoidKeyword", - }, + "start": Object { + "column": 48, + "line": 1, }, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "name": "doo", - "range": Array [ - 166, - 169, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 9, - }, - }, - "optional": true, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 9, - }, - "start": Object { - "column": 9, - "line": 9, - }, - }, - "name": "a", - "range": Array [ - 171, - 172, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "name": "b", - "range": Array [ - 174, - 175, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 9, - }, - "start": Object { - "column": 15, - "line": 9, - }, - }, - "name": "c", - "range": Array [ - 177, - 178, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 166, - 186, - ], - "static": false, - "type": "TSMethodSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "range": Array [ - 179, - 185, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 9, - }, - "start": Object { - "column": 19, - "line": 9, - }, - }, - "range": Array [ - 181, - 185, - ], - "type": "TSVoidKeyword", - }, - }, + "range": Array [ + 48, + 69, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 0, + 96, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 77, + "line": 1, }, - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 10, - }, - "start": Object { - "column": 5, - "line": 10, - }, - }, - "name": "loo", - "range": Array [ - 192, - 195, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 10, - }, - }, - "optional": true, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 10, - }, - "start": Object { - "column": 11, - "line": 10, - }, - }, - "name": "a", - "range": Array [ - 198, - 199, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 10, - }, - "start": Object { - "column": 14, - "line": 10, - }, - }, - "name": "b", - "range": Array [ - 201, - 202, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 10, - }, - "start": Object { - "column": 17, - "line": 10, - }, - }, - "name": "c", - "range": Array [ - 204, - 205, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 191, - 213, - ], - "static": false, - "type": "TSMethodSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 10, - }, - "start": Object { - "column": 19, - "line": 10, - }, - }, - "range": Array [ - 206, - 212, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 10, - }, - "start": Object { - "column": 21, - "line": 10, - }, - }, - "range": Array [ - 208, - 212, - ], - "type": "TSVoidKeyword", - }, - }, + "start": Object { + "column": 70, + "line": 1, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "name": "boo", - "range": Array [ - 218, - 221, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "optional": false, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 11, - }, - "start": Object { - "column": 11, - "line": 11, - }, - }, - "name": "a", - "range": Array [ - 225, - 226, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 11, - }, - "start": Object { - "column": 14, - "line": 11, - }, - }, - "name": "b", - "range": Array [ - 228, - 229, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 11, - }, - "start": Object { - "column": 17, - "line": 11, - }, - }, - "name": "c", - "range": Array [ - 231, - 232, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 218, - 240, - ], - "static": false, - "type": "TSMethodSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 11, - }, - "start": Object { - "column": 19, - "line": 11, - }, - }, - "range": Array [ - 233, - 239, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 11, - }, - "start": Object { - "column": 21, - "line": 11, - }, - }, - "range": Array [ - 235, - 239, - ], - "type": "TSVoidKeyword", - }, + }, + "range": Array [ + 70, + 77, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 77, + "line": 1, }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 11, - }, - "start": Object { - "column": 7, - "line": 11, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 11, - }, - "start": Object { - "column": 8, - "line": 11, - }, - }, - "name": "J", - "range": Array [ - 222, - 223, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 221, - 224, - ], - "type": "TSTypeParameterDeclaration", + "start": Object { + "column": 71, + "line": 1, }, }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 12, - }, - "start": Object { - "column": 4, - "line": 12, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 12, - }, - "start": Object { - "column": 9, - "line": 12, - }, - }, - "name": "a", - "range": Array [ - 250, - 251, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 12, - }, - "start": Object { - "column": 12, - "line": 12, - }, - }, - "name": "b", - "optional": true, - "range": Array [ - 253, - 254, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 245, - 265, - ], - "type": "TSConstructSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 12, - }, - "start": Object { - "column": 15, - "line": 12, - }, - }, - "range": Array [ - 256, - 264, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 12, - }, - "start": Object { - "column": 17, - "line": 12, - }, - }, - "range": Array [ - 258, - 264, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 13, - }, - "start": Object { - "column": 4, - "line": 13, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 13, - }, - "start": Object { - "column": 12, - "line": 13, - }, - }, - "name": "a", - "range": Array [ - 278, - 279, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 13, - }, - "start": Object { - "column": 15, - "line": 13, - }, - }, - "name": "b", - "optional": true, - "range": Array [ - 281, - 282, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 270, - 293, - ], - "type": "TSConstructSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 13, - }, - "start": Object { - "column": 18, - "line": 13, - }, - }, - "range": Array [ - 284, - 292, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 13, - }, - "start": Object { - "column": 20, - "line": 13, - }, - }, - "range": Array [ - 286, - 292, - ], - "type": "TSStringKeyword", - }, - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 13, - }, - "start": Object { - "column": 8, - "line": 13, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 13, - }, - "start": Object { - "column": 9, - "line": 13, - }, - }, - "name": "F", - "range": Array [ - 275, - 276, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 274, - 277, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 14, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 295, - ], - "type": "TSInterfaceBody", - }, - "heritage": Array [], - "id": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 14, - }, - "start": Object { - "column": 0, - "line": 1, + "range": Array [ + 71, + 77, + ], + "type": "TSStringKeyword", }, }, - "range": Array [ - 0, - 295, - ], - "type": "TSInterfaceDeclaration", + "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 16, + "line": 4, }, "start": Object { "column": 0, @@ -31909,14 +32762,14 @@ Object { }, "range": Array [ 0, - 297, + 97, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 8, "line": 1, }, "start": Object { @@ -31926,79 +32779,79 @@ Object { }, "range": Array [ 0, - 9, + 8, ], "type": "Keyword", - "value": "interface", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 16, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, "range": Array [ - 10, - 13, + 9, + 16, ], "type": "Identifier", - "value": "Foo", + "value": "message", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 17, "line": 1, }, "start": Object { - "column": 14, + "column": 16, "line": 1, }, }, "range": Array [ - 14, - 15, + 16, + 17, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 20, - 23, + 17, + 21, ], "type": "Identifier", - "value": "baa", + "value": "name", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 23, - 24, + 21, + 22, ], "type": "Punctuator", "value": ":", @@ -32006,84 +32859,102 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 25, - 31, + 22, + 28, ], "type": "Identifier", - "value": "number", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 31, - 32, + 28, + 29, ], "type": "Punctuator", - "value": ";", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 33, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 30, + "line": 1, }, }, "range": Array [ - 37, - 40, + 30, + 33, ], "type": "Identifier", - "value": "bar", + "value": "age", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 34, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 33, + "line": 1, }, }, "range": Array [ - 40, - 41, + 33, + 34, ], "type": "Punctuator", - "value": "?", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 40, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "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 [ @@ -32091,125 +32962,143 @@ Object { 42, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 46, + "line": 1, }, "start": Object { - "column": 10, - "line": 3, + "column": 43, + "line": 1, }, }, "range": Array [ 43, - 49, + 46, ], - "type": "Identifier", - "value": "number", + "type": "Numeric", + "value": "100", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 3, + "column": 47, + "line": 1, }, "start": Object { - "column": 16, - "line": 3, + "column": 46, + "line": 1, }, }, "range": Array [ - 49, - 50, + 46, + 47, ], "type": "Punctuator", - "value": ";", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 51, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 48, + "line": 1, }, }, "range": Array [ - 55, - 56, + 48, + 51, ], "type": "Punctuator", - "value": "[", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 4, + "column": 55, + "line": 1, }, "start": Object { - "column": 5, - "line": 4, + "column": 51, + "line": 1, }, }, "range": Array [ - 56, - 59, + 51, + 55, ], "type": "Identifier", - "value": "bax", + "value": "args", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 4, + "column": 56, + "line": 1, }, "start": Object { - "column": 8, - "line": 4, + "column": 55, + "line": 1, }, }, "range": Array [ - 59, - 60, + 55, + 56, ], "type": "Punctuator", - "value": "]", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 4, + "column": 61, + "line": 1, }, "start": Object { - "column": 9, - "line": 4, + "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 [ - 60, 61, + 62, ], "type": "Punctuator", - "value": ":", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 4, + "column": 68, + "line": 1, }, "start": Object { - "column": 11, - "line": 4, + "column": 62, + "line": 1, }, }, "range": Array [ @@ -32222,12 +33111,12 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, - "line": 4, + "column": 69, + "line": 1, }, "start": Object { - "column": 17, - "line": 4, + "column": 68, + "line": 1, }, }, "range": Array [ @@ -32235,130 +33124,130 @@ Object { 69, ], "type": "Punctuator", - "value": ";", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 70, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 69, + "line": 1, }, }, "range": Array [ - 74, - 75, + 69, + 70, ], "type": "Punctuator", - "value": "[", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 5, + "column": 71, + "line": 1, }, "start": Object { - "column": 5, - "line": 5, + "column": 70, + "line": 1, }, }, "range": Array [ - 75, - 78, + 70, + 71, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 77, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 71, + "line": 1, }, }, "range": Array [ - 78, - 79, + 71, + 77, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 5, + "column": 79, + "line": 1, }, "start": Object { - "column": 9, - "line": 5, + "column": 78, + "line": 1, }, }, "range": Array [ + 78, 79, - 80, ], "type": "Punctuator", - "value": "?", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 5, + "column": 8, + "line": 2, }, "start": Object { - "column": 10, - "line": 5, + "column": 2, + "line": 2, }, }, "range": Array [ - 80, - 81, + 82, + 88, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 5, + "column": 13, + "line": 2, }, "start": Object { - "column": 12, - "line": 5, + "column": 9, + "line": 2, }, }, "range": Array [ - 82, - 88, + 89, + 93, ], "type": "Identifier", - "value": "string", + "value": "name", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 5, + "column": 14, + "line": 2, }, "start": Object { - "column": 18, - "line": 5, + "column": 13, + "line": 2, }, }, "range": Array [ - 88, - 89, + 93, + 94, ], "type": "Punctuator", "value": ";", @@ -32366,1007 +33255,1663 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 6, + "column": 1, + "line": 3, }, "start": Object { - "column": 4, - "line": 6, + "column": 0, + "line": 3, }, }, "range": Array [ - 94, 95, + 96, ], "type": "Punctuator", - "value": "[", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/import-type.src 1`] = ` +Object { + "body": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 8, - "line": 6, + "column": 28, + "line": 1, }, "start": Object { - "column": 5, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 95, - 98, + 0, + 28, ], - "type": "Identifier", - "value": "eee", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "isTypeOf": true, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "parameter": Object { + "literal": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 26, + ], + "raw": "'A'", + "type": "Literal", + "value": "A", + }, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 26, + ], + "type": "TSLiteralType", + }, + "qualifier": null, + "range": Array [ + 9, + 27, + ], + "type": "TSImportType", + "typeParameters": null, + }, }, Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "B", + "range": Array [ + 34, + 35, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 9, - "line": 6, + "column": 26, + "line": 2, }, "start": Object { - "column": 8, - "line": 6, + "column": 0, + "line": 2, }, }, "range": Array [ - 98, - 99, + 29, + 55, ], - "type": "Punctuator", - "value": ":", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "isTypeOf": false, + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "parameter": Object { + "literal": Object { + "loc": Object { + "end": Object { + "column": 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", + }, + "qualifier": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "name": "X", + "range": Array [ + 50, + 51, + ], + "type": "Identifier", + }, + "range": Array [ + 38, + 54, + ], + "type": "TSImportType", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "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 { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "name": "Y", + "range": Array [ + 52, + 53, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 51, + 54, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + }, + ], + "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": 16, - "line": 6, + "column": 4, + "line": 1, }, "start": Object { - "column": 10, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 100, - 106, + 0, + 4, ], "type": "Identifier", - "value": "number", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 6, + "column": 6, + "line": 1, }, "start": Object { - "column": 16, - "line": 6, + "column": 5, + "line": 1, }, }, "range": Array [ - 106, - 107, + 5, + 6, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 6, + "column": 8, + "line": 1, }, "start": Object { - "column": 17, - "line": 6, + "column": 7, + "line": 1, }, }, "range": Array [ - 107, - 108, + 7, + 8, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 6, + "column": 15, + "line": 1, }, "start": Object { - "column": 19, - "line": 6, + "column": 9, + "line": 1, }, }, "range": Array [ - 109, - 115, + 9, + 15, ], - "type": "Identifier", - "value": "string", + "type": "Keyword", + "value": "typeof", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 6, + "column": 22, + "line": 1, }, "start": Object { - "column": 25, - "line": 6, + "column": 16, + "line": 1, }, }, "range": Array [ - 115, - 116, + 16, + 22, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 7, + "column": 23, + "line": 1, }, "start": Object { - "column": 4, - "line": 7, + "column": 22, + "line": 1, }, }, "range": Array [ - 121, - 122, + 22, + 23, ], "type": "Punctuator", - "value": "[", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 7, + "column": 26, + "line": 1, }, "start": Object { - "column": 5, - "line": 7, + "column": 23, + "line": 1, }, }, "range": Array [ - 122, - 125, + 23, + 26, ], - "type": "Identifier", - "value": "fff", + "type": "String", + "value": "'A'", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 7, + "column": 27, + "line": 1, }, "start": Object { - "column": 8, - "line": 7, + "column": 26, + "line": 1, }, }, "range": Array [ - 125, - 126, + 26, + 27, ], "type": "Punctuator", - "value": "?", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 7, + "column": 28, + "line": 1, }, "start": Object { - "column": 9, - "line": 7, + "column": 27, + "line": 1, }, }, "range": Array [ - 126, - 127, + 27, + 28, ], "type": "Punctuator", - "value": ":", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 7, + "column": 4, + "line": 2, }, "start": Object { - "column": 11, - "line": 7, + "column": 0, + "line": 2, }, }, "range": Array [ - 128, - 134, + 29, + 33, ], "type": "Identifier", - "value": "number", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 7, + "column": 6, + "line": 2, }, "start": Object { - "column": 17, - "line": 7, + "column": 5, + "line": 2, }, }, "range": Array [ - 134, - 135, + 34, + 35, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "B", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 7, + "column": 8, + "line": 2, }, "start": Object { - "column": 18, - "line": 7, + "column": 7, + "line": 2, }, }, "range": Array [ - 135, - 136, + 36, + 37, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 7, + "column": 15, + "line": 2, }, "start": Object { - "column": 20, - "line": 7, + "column": 9, + "line": 2, }, }, "range": Array [ - 137, - 143, + 38, + 44, ], - "type": "Identifier", - "value": "string", + "type": "Keyword", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 7, + "column": 16, + "line": 2, }, "start": Object { - "column": 26, - "line": 7, + "column": 15, + "line": 2, }, }, "range": Array [ - 143, - 144, + 44, + 45, ], "type": "Punctuator", - "value": ";", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 8, + "column": 19, + "line": 2, }, "start": Object { - "column": 4, - "line": 8, + "column": 16, + "line": 2, }, }, "range": Array [ - 149, - 152, + 45, + 48, ], - "type": "Identifier", - "value": "doo", + "type": "String", + "value": "\\"B\\"", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 8, + "column": 20, + "line": 2, }, "start": Object { - "column": 7, - "line": 8, + "column": 19, + "line": 2, }, }, "range": Array [ - 152, - 153, + 48, + 49, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 8, + "column": 21, + "line": 2, }, "start": Object { - "column": 8, - "line": 8, + "column": 20, + "line": 2, }, }, "range": Array [ - 153, - 154, + 49, + 50, ], "type": "Punctuator", - "value": ")", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 8, + "column": 22, + "line": 2, }, "start": Object { - "column": 9, - "line": 8, + "column": 21, + "line": 2, }, }, "range": Array [ - 154, - 155, + 50, + 51, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 8, + "column": 23, + "line": 2, }, "start": Object { - "column": 11, - "line": 8, + "column": 22, + "line": 2, }, }, "range": Array [ - 156, - 160, + 51, + 52, ], - "type": "Keyword", - "value": "void", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 8, + "column": 24, + "line": 2, }, "start": Object { - "column": 15, - "line": 8, + "column": 23, + "line": 2, }, }, "range": Array [ - 160, - 161, + 52, + 53, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "Y", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 9, + "column": 25, + "line": 2, }, "start": Object { - "column": 4, - "line": 9, + "column": 24, + "line": 2, }, }, "range": Array [ - 166, - 169, + 53, + 54, ], - "type": "Identifier", - "value": "doo", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 9, + "column": 26, + "line": 2, }, "start": Object { - "column": 7, - "line": 9, + "column": 25, + "line": 2, }, }, "range": Array [ - 169, - 170, + 54, + 55, ], "type": "Punctuator", - "value": "?", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/import-type-with-type-parameters-in-type-reference.src 1`] = ` +Object { + "body": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 9, - "line": 9, + "column": 30, + "line": 1, }, "start": Object { - "column": 8, - "line": 9, + "column": 0, + "line": 1, }, }, "range": Array [ - 170, - 171, + 0, + 30, ], - "type": "Punctuator", - "value": "(", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 29, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "params": Array [ + Object { + "isTypeOf": false, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "parameter": Object { + "literal": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 20, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 20, + ], + "type": "TSLiteralType", + }, + "qualifier": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "B", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "range": Array [ + 11, + 28, + ], + "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", + }, + }, + }, + ], + "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": 10, - "line": 9, + "column": 4, + "line": 1, }, "start": Object { - "column": 9, - "line": 9, + "column": 0, + "line": 1, }, }, "range": Array [ - 171, - 172, + 0, + 4, ], "type": "Identifier", - "value": "a", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 9, + "column": 6, + "line": 1, }, "start": Object { - "column": 10, - "line": 9, + "column": 5, + "line": 1, }, }, "range": Array [ - 172, - 173, + 5, + 6, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 9, + "column": 8, + "line": 1, }, "start": Object { - "column": 12, - "line": 9, + "column": 7, + "line": 1, }, }, "range": Array [ - 174, - 175, + 7, + 8, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 9, + "column": 10, + "line": 1, }, "start": Object { - "column": 13, - "line": 9, + "column": 9, + "line": 1, }, }, "range": Array [ - 175, - 176, + 9, + 10, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 9, + "column": 11, + "line": 1, }, "start": Object { - "column": 15, - "line": 9, + "column": 10, + "line": 1, }, }, "range": Array [ - 177, - 178, + 10, + 11, ], - "type": "Identifier", - "value": "c", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { "column": 17, - "line": 9, + "line": 1, }, "start": Object { - "column": 16, - "line": 9, + "column": 11, + "line": 1, }, }, "range": Array [ - 178, - 179, + 11, + 17, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "import", }, Object { "loc": Object { "end": Object { "column": 18, - "line": 9, + "line": 1, }, "start": Object { "column": 17, - "line": 9, + "line": 1, }, }, "range": Array [ - 179, - 180, + 17, + 18, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 9, + "column": 20, + "line": 1, }, "start": Object { - "column": 19, - "line": 9, + "column": 18, + "line": 1, }, }, "range": Array [ - 181, - 185, + 18, + 20, ], - "type": "Keyword", - "value": "void", + "type": "String", + "value": "\\"\\"", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 9, + "column": 21, + "line": 1, }, "start": Object { - "column": 23, - "line": 9, + "column": 20, + "line": 1, }, }, "range": Array [ - 185, - 186, + 20, + 21, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 10, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 10, + "column": 21, + "line": 1, }, }, "range": Array [ - 191, - 192, + 21, + 22, ], "type": "Punctuator", - "value": "[", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 10, + "column": 23, + "line": 1, }, "start": Object { - "column": 5, - "line": 10, + "column": 22, + "line": 1, }, }, "range": Array [ - 192, - 195, + 22, + 23, ], "type": "Identifier", - "value": "loo", + "value": "B", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 10, + "column": 24, + "line": 1, }, "start": Object { - "column": 8, - "line": 10, + "column": 23, + "line": 1, }, }, "range": Array [ - 195, - 196, + 23, + 24, ], "type": "Punctuator", - "value": "]", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 10, + "column": 27, + "line": 1, }, "start": Object { - "column": 9, - "line": 10, + "column": 24, + "line": 1, }, }, "range": Array [ - 196, - 197, + 24, + 27, ], - "type": "Punctuator", - "value": "?", + "type": "Identifier", + "value": "any", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 10, + "column": 28, + "line": 1, }, "start": Object { - "column": 10, - "line": 10, + "column": 27, + "line": 1, }, }, "range": Array [ - 197, - 198, + 27, + 28, ], "type": "Punctuator", - "value": "(", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 10, + "column": 29, + "line": 1, }, "start": Object { - "column": 11, - "line": 10, + "column": 28, + "line": 1, }, }, "range": Array [ - 198, - 199, + 28, + 29, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 10, + "column": 30, + "line": 1, }, "start": Object { - "column": 12, - "line": 10, + "column": 29, + "line": 1, }, }, "range": Array [ - 199, - 200, + 29, + 30, ], "type": "Punctuator", - "value": ",", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/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", + }, + "heritage": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "Bar", + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 25, + ], + "type": "TSInterfaceHeritage", + }, + ], + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 15, - "line": 10, + "column": 1, + "line": 3, }, "start": Object { - "column": 14, - "line": 10, + "column": 0, + "line": 1, }, }, "range": Array [ - 201, - 202, + 0, + 30, ], - "type": "Identifier", - "value": "b", + "type": "TSInterfaceDeclaration", + }, + ], + "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": 16, - "line": 10, + "column": 9, + "line": 1, }, "start": Object { - "column": 15, - "line": 10, + "column": 0, + "line": 1, }, }, "range": Array [ - 202, - 203, + 0, + 9, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 10, + "column": 13, + "line": 1, }, "start": Object { - "column": 17, - "line": 10, + "column": 10, + "line": 1, }, }, "range": Array [ - 204, - 205, + 10, + 13, ], "type": "Identifier", - "value": "c", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 10, + "column": 21, + "line": 1, }, "start": Object { - "column": 18, - "line": 10, + "column": 14, + "line": 1, }, }, "range": Array [ - 205, - 206, + 14, + 21, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 10, + "column": 25, + "line": 1, }, "start": Object { - "column": 19, - "line": 10, + "column": 22, + "line": 1, }, }, "range": Array [ - 206, - 207, + 22, + 25, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 10, + "column": 27, + "line": 1, }, "start": Object { - "column": 21, - "line": 10, + "column": 26, + "line": 1, }, }, "range": Array [ - 208, - 212, + 26, + 27, ], - "type": "Keyword", - "value": "void", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 10, + "column": 1, + "line": 3, }, "start": Object { - "column": 25, - "line": 10, + "column": 0, + "line": 3, }, }, "range": Array [ - 212, - 213, + 29, + 30, ], "type": "Punctuator", - "value": ";", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/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", + }, + "heritage": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "Bar", + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 25, + ], + "type": "TSInterfaceHeritage", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "Baz", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "TSInterfaceHeritage", + }, + ], + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 7, - "line": 11, + "column": 1, + "line": 3, }, "start": Object { - "column": 4, - "line": 11, + "column": 0, + "line": 1, }, }, "range": Array [ - 218, - 221, + 0, + 34, ], - "type": "Identifier", - "value": "boo", + "type": "TSInterfaceDeclaration", + }, + ], + "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": 8, - "line": 11, + "column": 9, + "line": 1, }, "start": Object { - "column": 7, - "line": 11, + "column": 0, + "line": 1, }, }, "range": Array [ - 221, - 222, + 0, + 9, ], - "type": "Punctuator", - "value": "<", + "type": "Keyword", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 11, + "column": 13, + "line": 1, }, "start": Object { - "column": 8, - "line": 11, + "column": 10, + "line": 1, }, }, "range": Array [ - 222, - 223, + 10, + 13, ], "type": "Identifier", - "value": "J", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 11, - }, - "start": Object { - "column": 9, - "line": 11, - }, - }, - "range": Array [ - 223, - 224, - ], - "type": "Punctuator", - "value": ">", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 11, + "column": 21, + "line": 1, }, "start": Object { - "column": 10, - "line": 11, + "column": 14, + "line": 1, }, }, "range": Array [ - 224, - 225, + 14, + 21, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 11, + "column": 25, + "line": 1, }, "start": Object { - "column": 11, - "line": 11, + "column": 22, + "line": 1, }, }, "range": Array [ - 225, - 226, + 22, + 25, ], "type": "Identifier", - "value": "a", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 11, + "column": 26, + "line": 1, }, "start": Object { - "column": 12, - "line": 11, + "column": 25, + "line": 1, }, }, "range": Array [ - 226, - 227, + 25, + 26, ], "type": "Punctuator", "value": ",", @@ -33374,576 +34919,333 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 11, + "column": 29, + "line": 1, }, "start": Object { - "column": 14, - "line": 11, + "column": 26, + "line": 1, }, }, "range": Array [ - 228, - 229, + 26, + 29, ], "type": "Identifier", - "value": "b", + "value": "Baz", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 11, + "column": 31, + "line": 1, }, "start": Object { - "column": 15, - "line": 11, + "column": 30, + "line": 1, }, }, "range": Array [ - 229, - 230, + 30, + 31, ], "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 11, - }, - "start": Object { - "column": 17, - "line": 11, - }, - }, - "range": Array [ - 231, - 232, - ], - "type": "Identifier", - "value": "c", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 11, + "column": 1, + "line": 3, }, "start": Object { - "column": 18, - "line": 11, + "column": 0, + "line": 3, }, }, "range": Array [ - 232, - 233, + 33, + 34, ], "type": "Punctuator", - "value": ")", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/interface-type-parameters.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 11, - }, - "start": Object { - "column": 19, - "line": 11, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 1, + }, }, + "range": Array [ + 17, + 21, + ], + "type": "TSInterfaceBody", }, - "range": Array [ - 233, - 234, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 11, - }, - "start": Object { - "column": 21, - "line": 11, + "heritage": Array [], + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", }, - "range": Array [ - 235, - 239, - ], - "type": "Keyword", - "value": "void", - }, - Object { "loc": Object { "end": Object { - "column": 26, - "line": 11, + "column": 1, + "line": 3, }, "start": Object { - "column": 25, - "line": 11, + "column": 0, + "line": 1, }, }, "range": Array [ - 239, - 240, + 0, + 21, ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 12, - }, - "start": Object { - "column": 4, - "line": 12, + "type": "TSInterfaceDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 14, + 15, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 13, + 16, + ], + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 245, - 248, - ], - "type": "Keyword", - "value": "new", }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 12, - }, - "start": Object { - "column": 8, - "line": 12, - }, - }, - "range": Array [ - 249, - 250, - ], - "type": "Punctuator", - "value": "(", + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 12, - }, - "start": Object { - "column": 9, - "line": 12, - }, - }, - "range": Array [ - 250, - 251, - ], - "type": "Identifier", - "value": "a", + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 22, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 11, - "line": 12, + "column": 9, + "line": 1, }, "start": Object { - "column": 10, - "line": 12, + "column": 0, + "line": 1, }, }, "range": Array [ - 251, - 252, + 0, + 9, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "interface", }, Object { "loc": Object { "end": Object { "column": 13, - "line": 12, + "line": 1, }, "start": Object { - "column": 12, - "line": 12, + "column": 10, + "line": 1, }, }, "range": Array [ - 253, - 254, + 10, + 13, ], "type": "Identifier", - "value": "b", + "value": "Foo", }, Object { "loc": Object { "end": Object { "column": 14, - "line": 12, + "line": 1, }, "start": Object { "column": 13, - "line": 12, + "line": 1, }, }, "range": Array [ - 254, - 255, + 13, + 14, ], "type": "Punctuator", - "value": "?", + "value": "<", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 12, + "line": 1, }, "start": Object { "column": 14, - "line": 12, + "line": 1, }, }, "range": Array [ - 255, - 256, + 14, + 15, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { "column": 16, - "line": 12, + "line": 1, }, "start": Object { "column": 15, - "line": 12, + "line": 1, }, }, "range": Array [ - 256, - 257, + 15, + 16, ], "type": "Punctuator", - "value": ":", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 12, + "column": 18, + "line": 1, }, "start": Object { "column": 17, - "line": 12, - }, - }, - "range": Array [ - 258, - 264, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 12, - }, - "start": Object { - "column": 23, - "line": 12, - }, - }, - "range": Array [ - 264, - 265, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 13, - }, - "start": Object { - "column": 4, - "line": 13, - }, - }, - "range": Array [ - 270, - 273, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 13, - }, - "start": Object { - "column": 8, - "line": 13, - }, - }, - "range": Array [ - 274, - 275, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 13, - }, - "start": Object { - "column": 9, - "line": 13, - }, - }, - "range": Array [ - 275, - 276, - ], - "type": "Identifier", - "value": "F", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 13, - }, - "start": Object { - "column": 10, - "line": 13, + "line": 1, }, }, "range": Array [ - 276, - 277, + 17, + 18, ], "type": "Punctuator", - "value": ">", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 13, + "column": 1, + "line": 3, }, "start": Object { - "column": 11, - "line": 13, + "column": 0, + "line": 3, }, }, "range": Array [ - 277, - 278, + 20, + 21, ], "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 13, - }, - "start": Object { - "column": 12, - "line": 13, - }, - }, - "range": Array [ - 278, - 279, - ], - "type": "Identifier", - "value": "a", + "value": "}", }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 13, - }, - "start": Object { - "column": 13, - "line": 13, - }, - }, - "range": Array [ - 279, - 280, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 13, - }, - "start": Object { - "column": 15, - "line": 13, - }, - }, - "range": Array [ - 281, - 282, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 13, - }, - "start": Object { - "column": 16, - "line": 13, - }, - }, - "range": Array [ - 282, - 283, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 13, - }, - "start": Object { - "column": 17, - "line": 13, - }, - }, - "range": Array [ - 283, - 284, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 13, - }, - "start": Object { - "column": 18, - "line": 13, - }, - }, - "range": Array [ - 284, - 285, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 13, - }, - "start": Object { - "column": 20, - "line": 13, - }, - }, - "range": Array [ - 286, - 292, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 13, - }, - "start": Object { - "column": 26, - "line": 13, - }, - }, - "range": Array [ - 292, - 293, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 14, - }, - "start": Object { - "column": 0, - "line": 14, - }, - }, - "range": Array [ - 294, - 295, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/interface-with-construct-signature-with-parameter-accessibility.src 1`] = ` -Object { - "body": Array [ + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/interface-with-all-property-types.src 1`] = ` +Object { + "body": Array [ Object { "body": Object { "body": Array [ Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "baa", + "range": Array [ + 20, + 23, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 30, + "column": 16, "line": 2, }, "start": Object { @@ -33951,12 +35253,31 @@ Object { "line": 2, }, }, - "params": Array [ - Object { - "accessibility": "public", + "range": Array [ + 20, + 32, + ], + "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": 17, + "column": 15, "line": 2, }, "start": Object { @@ -33964,1489 +35285,664 @@ Object { "line": 2, }, }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, + "range": Array [ + 25, + 31, + ], + "type": "TSNumberKeyword", + }, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 37, + 40, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "optional": true, + "range": Array [ + 37, + 50, + ], + "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, }, - "name": "x", - "range": Array [ - 33, - 34, - ], - "type": "Identifier", }, "range": Array [ - 26, - 34, + 43, + 49, ], - "type": "TSParameterProperty", + "type": "TSNumberKeyword", }, - Object { - "accessibility": "private", + }, + }, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 5, + "line": 4, + }, + }, + "name": "bax", + "range": Array [ + 56, + 59, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 55, + 69, + ], + "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": 28, - "line": 2, + "column": 17, + "line": 4, }, "start": Object { - "column": 19, - "line": 2, + "column": 11, + "line": 4, }, }, - "parameter": Object { + "range": Array [ + 62, + 68, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 5, + }, + "start": Object { + "column": 5, + "line": 5, + }, + }, + "name": "baz", + "range": Array [ + 75, + 78, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "optional": true, + "range": Array [ + 74, + 89, + ], + "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 { + "index": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 6, + }, + "start": Object { + "column": 5, + "line": 6, + }, + }, + "name": "eee", + "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": 28, - "line": 2, + "column": 16, + "line": 6, }, "start": Object { - "column": 27, - "line": 2, + "column": 10, + "line": 6, }, }, - "name": "y", "range": Array [ - 44, - 45, + 100, + 106, ], - "type": "Identifier", + "type": "TSNumberKeyword", }, - "range": Array [ - 36, - 45, - ], - "type": "TSParameterProperty", }, - ], + }, + "loc": Object { + "end": Object { + "column": 26, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, "range": Array [ - 21, - 47, + 94, + 116, ], - "type": "TSConstructSignature", - "typeAnnotation": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 49, - ], - "type": "TSInterfaceBody", - }, - "heritage": Array [], - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Test", - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 49, - ], - "type": "TSInterfaceDeclaration", - }, - ], - "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", -} -`; - -exports[`typescript fixtures/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", - }, - "heritage": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, + "static": false, + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 6, + }, + "start": Object { + "column": 17, + "line": 6, + }, }, - "start": Object { - "column": 25, - "line": 1, + "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", }, }, - "name": "Bar", - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, }, - "range": Array [ - 25, - 28, - ], - "type": "TSInterfaceHeritage", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, + Object { + "index": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 7, + }, + "start": Object { + "column": 5, + "line": 7, + }, }, - }, - "params": Array [ - Object { + "name": "fff", + "optional": true, + "range": Array [ + 122, + 134, + ], + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 17, + "line": 7, }, "start": Object { - "column": 29, - "line": 1, + "column": 9, + "line": 7, }, }, "range": Array [ - 29, - 30, + 126, + 134, ], - "type": "TSTypeReference", - "typeName": Object { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 17, + "line": 7, }, "start": Object { - "column": 29, - "line": 1, + "column": 11, + "line": 7, }, }, - "name": "J", "range": Array [ - 29, - 30, + 128, + 134, ], - "type": "Identifier", + "type": "TSNumberKeyword", }, }, - ], - "range": Array [ - 28, - 31, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - ], - "id": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - }, - "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 { + }, "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 27, + "line": 7, }, "start": Object { - "column": 14, - "line": 1, + "column": 4, + "line": 7, }, }, - "name": "T", "range": Array [ - 14, - 15, + 121, + 144, ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 13, - 16, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "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", -} -`; - -exports[`typescript fixtures/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", - }, - "heritage": Array [], - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Test", - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - }, - "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, + "static": false, + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 7, + }, + "start": Object { + "column": 18, + "line": 7, + }, + }, + "range": Array [ + 135, + 143, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 7, + }, + "start": Object { + "column": 20, + "line": 7, + }, + }, + "range": Array [ + 137, + 143, + ], + "type": "TSStringKeyword", + }, + }, }, - }, - "params": Array [ Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "name": "doo", + "range": Array [ + 149, + 152, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { "column": 16, - "line": 1, + "line": 8, }, "start": Object { - "column": 15, - "line": 1, + "column": 4, + "line": 8, }, }, - "name": "T", + "optional": false, + "params": Array [], "range": Array [ - 15, - 16, + 149, + 161, ], - "type": "TSTypeParameter", + "static": false, + "type": "TSMethodSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 8, + }, + "start": Object { + "column": 9, + "line": 8, + }, + }, + "range": Array [ + 154, + 160, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 8, + }, + "start": Object { + "column": 11, + "line": 8, + }, + }, + "range": Array [ + 156, + 160, + ], + "type": "TSVoidKeyword", + }, + }, }, - ], - "range": Array [ - 14, - 17, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "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", -} -`; - -exports[`typescript fixtures/basics/interface-with-jsdoc.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ Object { "computed": false, "key": Object { "loc": Object { "end": Object { "column": 7, - "line": 6, + "line": 9, }, "start": Object { "column": 4, - "line": 6, + "line": 9, }, }, - "name": "foo", + "name": "doo", "range": Array [ - 76, - 79, + 166, + 169, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 13, - "line": 6, + "column": 24, + "line": 9, }, "start": Object { "column": 4, - "line": 6, + "line": 9, }, }, - "optional": false, + "optional": true, "params": Array [ Object { "loc": Object { "end": Object { - "column": 11, - "line": 6, + "column": 10, + "line": 9, }, "start": Object { - "column": 8, - "line": 6, + "column": 9, + "line": 9, }, }, - "name": "bar", + "name": "a", "range": Array [ - 80, - 83, + 171, + 172, ], "type": "Identifier", }, - ], - "range": Array [ - 76, - 85, - ], - "static": false, - "type": "TSMethodSignature", - "typeAnnotation": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 87, - ], - "type": "TSInterfaceBody", - }, - "heritage": Array [], - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "Test", - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 87, - ], - "type": "TSInterfaceDeclaration", - }, - ], - "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", -} -`; - -exports[`typescript fixtures/basics/interface-with-optional-properties.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 9, + }, + "start": Object { + "column": 12, + "line": 9, + }, }, + "name": "b", + "range": Array [ + 174, + 175, + ], + "type": "Identifier", }, - "name": "foo", - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "optional": true, - "range": Array [ - 21, - 26, - ], - "type": "TSPropertySignature", - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 9, + }, + "start": Object { + "column": 15, + "line": 9, + }, }, + "name": "c", + "range": Array [ + 177, + 178, + ], + "type": "Identifier", }, - "name": "bar", - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "optional": true, + ], "range": Array [ - 31, - 44, + 166, + 186, ], - "type": "TSPropertySignature", + "static": false, + "type": "TSMethodSignature", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 23, + "line": 9, }, "start": Object { - "column": 8, - "line": 3, + "column": 17, + "line": 9, }, }, "range": Array [ - 35, - 43, + 179, + 185, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 23, + "line": 9, }, "start": Object { - "column": 10, - "line": 3, + "column": 19, + "line": 9, }, }, "range": Array [ - 37, - 43, + 181, + 185, ], - "type": "TSStringKeyword", + "type": "TSVoidKeyword", }, }, }, Object { - "computed": false, + "computed": true, "key": Object { "loc": Object { "end": Object { - "column": 7, - "line": 4, + "column": 8, + "line": 10, }, "start": Object { - "column": 4, - "line": 4, + "column": 5, + "line": 10, }, }, - "name": "baz", + "name": "loo", "range": Array [ - 49, - 52, + 192, + 195, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 34, - "line": 4, + "column": 26, + "line": 10, }, "start": Object { "column": 4, - "line": 4, + "line": 10, }, }, "optional": true, @@ -35455,115 +35951,494 @@ Object { "loc": Object { "end": Object { "column": 12, - "line": 4, + "line": 10, }, "start": Object { - "column": 9, - "line": 4, + "column": 11, + "line": 10, }, }, - "name": "foo", + "name": "a", "range": Array [ - 54, - 57, + 198, + 199, ], "type": "Identifier", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 4, + "column": 15, + "line": 10, }, "start": Object { "column": 14, - "line": 4, + "line": 10, }, }, - "name": "bar", - "optional": true, + "name": "b", "range": Array [ - 59, - 71, + 201, + 202, ], "type": "Identifier", - "typeAnnotation": Object { + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 10, + }, + "start": Object { + "column": 17, + "line": 10, + }, + }, + "name": "c", + "range": Array [ + 204, + 205, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 191, + 213, + ], + "static": false, + "type": "TSMethodSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 10, + }, + "start": Object { + "column": 19, + "line": 10, + }, + }, + "range": Array [ + 206, + 212, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 10, + }, + "start": Object { + "column": 21, + "line": 10, + }, + }, + "range": Array [ + 208, + 212, + ], + "type": "TSVoidKeyword", + }, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 11, + }, + "start": Object { + "column": 4, + "line": 11, + }, + }, + "name": "boo", + "range": Array [ + 218, + 221, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 26, + "line": 11, + }, + "start": Object { + "column": 4, + "line": 11, + }, + }, + "optional": false, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 11, + }, + "start": Object { + "column": 11, + "line": 11, + }, + }, + "name": "a", + "range": Array [ + 225, + 226, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 11, + }, + "start": Object { + "column": 14, + "line": 11, + }, + }, + "name": "b", + "range": Array [ + 228, + 229, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 11, + }, + "start": Object { + "column": 17, + "line": 11, + }, + }, + "name": "c", + "range": Array [ + 231, + 232, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 218, + 240, + ], + "static": false, + "type": "TSMethodSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 11, + }, + "start": Object { + "column": 19, + "line": 11, + }, + }, + "range": Array [ + 233, + 239, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 11, + }, + "start": Object { + "column": 21, + "line": 11, + }, + }, + "range": Array [ + 235, + 239, + ], + "type": "TSVoidKeyword", + }, + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 11, + }, + "start": Object { + "column": 7, + "line": 11, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 26, - "line": 4, + "column": 9, + "line": 11, }, "start": Object { - "column": 18, - "line": 4, + "column": 8, + "line": 11, }, }, + "name": "J", "range": Array [ - 63, - 71, + 222, + 223, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 20, - "line": 4, - }, - }, - "range": Array [ - 65, - 71, - ], - "type": "TSStringKeyword", + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 221, + 224, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 12, + }, + "start": Object { + "column": 4, + "line": 12, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 12, + }, + "start": Object { + "column": 9, + "line": 12, }, }, + "name": "a", + "range": Array [ + 250, + 251, + ], + "type": "Identifier", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 4, + "column": 13, + "line": 12, }, "start": Object { - "column": 28, - "line": 4, + "column": 12, + "line": 12, }, }, - "name": "baz", + "name": "b", "optional": true, "range": Array [ - 73, - 76, + 253, + 254, ], "type": "Identifier", }, ], "range": Array [ - 49, - 79, + 245, + 265, ], - "static": false, - "type": "TSMethodSignature", - "typeAnnotation": null, + "type": "TSConstructSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 12, + }, + "start": Object { + "column": 15, + "line": 12, + }, + }, + "range": Array [ + 256, + 264, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 12, + }, + "start": Object { + "column": 17, + "line": 12, + }, + }, + "range": Array [ + 258, + 264, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 13, + }, + "start": Object { + "column": 4, + "line": 13, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 13, + }, + "start": Object { + "column": 12, + "line": 13, + }, + }, + "name": "a", + "range": Array [ + 278, + 279, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 13, + }, + "start": Object { + "column": 15, + "line": 13, + }, + }, + "name": "b", + "optional": true, + "range": Array [ + 281, + 282, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 270, + 293, + ], + "type": "TSConstructSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 13, + }, + "start": Object { + "column": 18, + "line": 13, + }, + }, + "range": Array [ + 284, + 292, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 13, + }, + "start": Object { + "column": 20, + "line": 13, + }, + }, + "range": Array [ + 286, + 292, + ], + "type": "TSStringKeyword", + }, + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 13, + }, + "start": Object { + "column": 8, + "line": 13, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 13, + }, + "start": Object { + "column": 9, + "line": 13, + }, + }, + "name": "F", + "range": Array [ + 275, + 276, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 274, + 277, + ], + "type": "TSTypeParameterDeclaration", + }, }, ], "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 14, }, "start": Object { - "column": 15, + "column": 14, "line": 1, }, }, "range": Array [ - 15, - 81, + 14, + 295, ], "type": "TSInterfaceBody", }, @@ -35571,7 +36446,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 14, + "column": 13, "line": 1, }, "start": Object { @@ -35579,17 +36454,17 @@ Object { "line": 1, }, }, - "name": "test", + "name": "Foo", "range": Array [ 10, - 14, + 13, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 14, }, "start": Object { "column": 0, @@ -35598,7 +36473,7 @@ Object { }, "range": Array [ 0, - 81, + 295, ], "type": "TSInterfaceDeclaration", }, @@ -35606,7 +36481,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 16, }, "start": Object { "column": 0, @@ -35615,7 +36490,7 @@ Object { }, "range": Array [ 0, - 82, + 297, ], "sourceType": "script", "tokens": Array [ @@ -35640,7 +36515,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 13, "line": 1, }, "start": Object { @@ -35650,25 +36525,25 @@ Object { }, "range": Array [ 10, - 14, + 13, ], "type": "Identifier", - "value": "test", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 15, "line": 1, }, "start": Object { - "column": 15, + "column": 14, "line": 1, }, }, "range": Array [ + 14, 15, - 16, ], "type": "Punctuator", "value": "{", @@ -35685,11 +36560,11 @@ Object { }, }, "range": Array [ - 21, - 24, + 20, + 23, ], "type": "Identifier", - "value": "foo", + "value": "baa", }, Object { "loc": Object { @@ -35703,26 +36578,44 @@ Object { }, }, "range": Array [ + 23, 24, - 25, ], "type": "Punctuator", - "value": "?", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 15, "line": 2, }, "start": Object { - "column": 8, + "column": 9, "line": 2, }, }, "range": Array [ 25, - 26, + 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": ";", @@ -35739,8 +36632,8 @@ Object { }, }, "range": Array [ - 31, - 34, + 37, + 40, ], "type": "Identifier", "value": "bar", @@ -35757,8 +36650,8 @@ Object { }, }, "range": Array [ - 34, - 35, + 40, + 41, ], "type": "Punctuator", "value": "?", @@ -35775,8 +36668,8 @@ Object { }, }, "range": Array [ - 35, - 36, + 41, + 42, ], "type": "Punctuator", "value": ":", @@ -35793,11 +36686,11 @@ Object { }, }, "range": Array [ - 37, 43, + 49, ], "type": "Identifier", - "value": "string", + "value": "number", }, Object { "loc": Object { @@ -35811,8 +36704,8 @@ Object { }, }, "range": Array [ - 43, - 44, + 49, + 50, ], "type": "Punctuator", "value": ";", @@ -35820,7 +36713,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 4, }, "start": Object { @@ -35829,11 +36722,11 @@ Object { }, }, "range": Array [ - 49, - 52, + 55, + 56, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { @@ -35842,16 +36735,16 @@ Object { "line": 4, }, "start": Object { - "column": 7, + "column": 5, "line": 4, }, }, "range": Array [ - 52, - 53, + 56, + 59, ], - "type": "Punctuator", - "value": "?", + "type": "Identifier", + "value": "bax", }, Object { "loc": Object { @@ -35865,16 +36758,16 @@ Object { }, }, "range": Array [ - 53, - 54, + 59, + 60, ], "type": "Punctuator", - "value": "(", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 10, "line": 4, }, "start": Object { @@ -35883,29 +36776,11 @@ Object { }, }, "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, + 60, + 61, ], "type": "Punctuator", - "value": ",", + "value": ":", }, Object { "loc": Object { @@ -35914,16 +36789,16 @@ Object { "line": 4, }, "start": Object { - "column": 14, + "column": 11, "line": 4, }, }, "range": Array [ - 59, 62, + 68, ], "type": "Identifier", - "value": "bar", + "value": "string", }, Object { "loc": Object { @@ -35937,134 +36812,134 @@ Object { }, }, "range": Array [ - 62, - 63, + 68, + 69, ], "type": "Punctuator", - "value": "?", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 4, + "column": 5, + "line": 5, }, "start": Object { - "column": 18, - "line": 4, + "column": 4, + "line": 5, }, }, "range": Array [ - 63, - 64, + 74, + 75, ], "type": "Punctuator", - "value": ":", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 4, + "column": 8, + "line": 5, }, "start": Object { - "column": 20, - "line": 4, + "column": 5, + "line": 5, }, }, "range": Array [ - 65, - 71, + 75, + 78, ], "type": "Identifier", - "value": "string", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 4, + "column": 9, + "line": 5, }, "start": Object { - "column": 26, - "line": 4, + "column": 8, + "line": 5, }, }, "range": Array [ - 71, - 72, + 78, + 79, ], "type": "Punctuator", - "value": ",", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 4, + "column": 10, + "line": 5, }, "start": Object { - "column": 28, - "line": 4, + "column": 9, + "line": 5, }, }, "range": Array [ - 73, - 76, + 79, + 80, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 4, + "column": 11, + "line": 5, }, "start": Object { - "column": 31, - "line": 4, + "column": 10, + "line": 5, }, }, "range": Array [ - 76, - 77, + 80, + 81, ], "type": "Punctuator", - "value": "?", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 4, + "column": 18, + "line": 5, }, "start": Object { - "column": 32, - "line": 4, + "column": 12, + "line": 5, }, }, "range": Array [ - 77, - 78, + 82, + 88, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 4, + "column": 19, + "line": 5, }, "start": Object { - "column": 33, - "line": 4, + "column": 18, + "line": 5, }, }, "range": Array [ - 78, - 79, + 88, + 89, ], "type": "Punctuator", "value": ";", @@ -36072,223 +36947,143 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 5, + "line": 6, }, "start": Object { - "column": 0, - "line": 5, + "column": 4, + "line": 6, }, }, "range": Array [ - 80, - 81, + 94, + 95, ], "type": "Punctuator", - "value": "}", + "value": "[", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/interface-without-type-annotation.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 25, - ], - "type": "TSPropertySignature", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 27, - ], - "type": "TSInterfaceBody", - }, - "heritage": Array [], - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "test", - "range": Array [ - 10, - 14, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 8, + "line": 6, }, "start": Object { - "column": 0, - "line": 1, + "column": 5, + "line": 6, }, }, "range": Array [ - 0, - 27, + 95, + 98, ], - "type": "TSInterfaceDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "eee", }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { "column": 9, - "line": 1, + "line": 6, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 6, }, }, "range": Array [ - 0, - 9, + 98, + 99, ], - "type": "Keyword", - "value": "interface", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 16, + "line": 6, }, "start": Object { "column": 10, - "line": 1, + "line": 6, }, }, "range": Array [ - 10, - 14, + 100, + 106, ], "type": "Identifier", - "value": "test", + "value": "number", }, Object { "loc": Object { "end": Object { + "column": 17, + "line": 6, + }, + "start": Object { "column": 16, - "line": 1, + "line": 6, + }, + }, + "range": Array [ + 106, + 107, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 6, }, "start": Object { - "column": 15, - "line": 1, + "column": 17, + "line": 6, }, }, "range": Array [ - 15, - 16, + 107, + 108, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 25, + "line": 6, }, "start": Object { - "column": 4, - "line": 2, + "column": 19, + "line": 6, }, }, "range": Array [ - 21, - 24, + 109, + 115, ], "type": "Identifier", - "value": "foo", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 26, + "line": 6, }, "start": Object { - "column": 7, - "line": 2, + "column": 25, + "line": 6, }, }, "range": Array [ - 24, - 25, + 115, + 116, ], "type": "Punctuator", "value": ";", @@ -36296,569 +37091,233 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 5, + "line": 7, }, "start": Object { - "column": 0, - "line": 3, + "column": 4, + "line": 7, }, }, "range": Array [ - 26, - 27, + 121, + 122, ], "type": "Punctuator", - "value": "}", + "value": "[", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/keyof-operator.src 1`] = ` -Object { - "body": Array [ Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 8, + "line": 7, + }, + "start": Object { + "column": 5, + "line": 7, }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", }, + "range": Array [ + 122, + 125, + ], + "type": "Identifier", + "value": "fff", + }, + Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 9, + "line": 7, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 7, }, }, "range": Array [ - 0, - 19, + 125, + 126, ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "operator": "keyof", - "range": Array [ - 9, - 18, - ], - "type": "TSTypeOperator", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 18, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - }, - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "?", }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 10, + "line": 7, }, "start": Object { - "column": 0, - "line": 1, + "column": 9, + "line": 7, }, }, "range": Array [ - 0, - 4, + 126, + 127, ], - "type": "Identifier", - "value": "type", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 17, + "line": 7, }, "start": Object { - "column": 5, - "line": 1, + "column": 11, + "line": 7, }, }, "range": Array [ - 5, - 6, + 128, + 134, ], "type": "Identifier", - "value": "x", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 18, + "line": 7, }, "start": Object { - "column": 7, - "line": 1, + "column": 17, + "line": 7, }, }, "range": Array [ - 7, - 8, + 134, + 135, ], "type": "Punctuator", - "value": "=", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 19, + "line": 7, }, "start": Object { - "column": 9, - "line": 1, + "column": 18, + "line": 7, }, }, "range": Array [ - 9, - 14, + 135, + 136, ], - "type": "Identifier", - "value": "keyof", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 26, + "line": 7, }, "start": Object { - "column": 15, - "line": 1, + "column": 20, + "line": 7, }, }, "range": Array [ - 15, - 18, + 137, + 143, ], "type": "Identifier", - "value": "foo", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 27, + "line": 7, }, "start": Object { - "column": 18, - "line": 1, + "column": 26, + "line": 7, }, }, "range": Array [ - 18, - 19, + 143, + 144, ], "type": "Punctuator", "value": ";", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/nested-type-arguments.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "nestedArray", - "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 { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "Array", - "range": Array [ - 17, - 22, - ], - "type": "Identifier", - }, - "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 { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "Array", - "range": Array [ - 23, - 28, - ], - "type": "Identifier", - }, - "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 { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "Array", - "range": Array [ - 29, - 34, - ], - "type": "Identifier", - }, - "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", - }, - ], - "kind": "var", "loc": Object { "end": Object { - "column": 44, - "line": 1, + "column": 7, + "line": 8, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 8, }, }, "range": Array [ - 0, - 44, + 149, + 152, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "doo", }, - }, - "range": Array [ - 0, - 44, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 8, + "line": 8, }, "start": Object { - "column": 0, - "line": 1, + "column": 7, + "line": 8, }, }, "range": Array [ - 0, - 3, + 152, + 153, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 9, + "line": 8, }, "start": Object { - "column": 4, - "line": 1, + "column": 8, + "line": 8, }, }, "range": Array [ - 4, - 15, + 153, + 154, ], - "type": "Identifier", - "value": "nestedArray", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 10, + "line": 8, }, "start": Object { - "column": 15, - "line": 1, + "column": 9, + "line": 8, }, }, "range": Array [ - 15, - 16, + 154, + 155, ], "type": "Punctuator", "value": ":", @@ -36866,1240 +37325,719 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 15, + "line": 8, }, "start": Object { - "column": 17, - "line": 1, + "column": 11, + "line": 8, }, }, "range": Array [ - 17, - 22, + 156, + 160, ], - "type": "Identifier", - "value": "Array", + "type": "Keyword", + "value": "void", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 16, + "line": 8, }, "start": Object { - "column": 22, - "line": 1, + "column": 15, + "line": 8, }, }, "range": Array [ - 22, - 23, + 160, + 161, ], "type": "Punctuator", - "value": "<", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 7, + "line": 9, }, "start": Object { - "column": 23, - "line": 1, + "column": 4, + "line": 9, }, }, "range": Array [ - 23, - 28, + 166, + 169, ], "type": "Identifier", - "value": "Array", + "value": "doo", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 8, + "line": 9, }, "start": Object { - "column": 28, - "line": 1, - }, + "column": 7, + "line": 9, + }, }, "range": Array [ - 28, - 29, + 169, + 170, ], "type": "Punctuator", - "value": "<", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 9, + "line": 9, }, "start": Object { - "column": 29, - "line": 1, + "column": 8, + "line": 9, }, }, "range": Array [ - 29, - 34, + 170, + 171, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 9, + }, + "start": Object { + "column": 9, + "line": 9, + }, + }, + "range": Array [ + 171, + 172, ], "type": "Identifier", - "value": "Array", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 11, + "line": 9, }, "start": Object { - "column": 34, - "line": 1, + "column": 10, + "line": 9, }, }, "range": Array [ - 34, - 35, + 172, + 173, ], "type": "Punctuator", - "value": "<", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 1, + "column": 13, + "line": 9, }, "start": Object { - "column": 35, - "line": 1, + "column": 12, + "line": 9, }, }, "range": Array [ - 35, - 41, + 174, + 175, ], "type": "Identifier", - "value": "string", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 14, + "line": 9, }, "start": Object { - "column": 41, - "line": 1, + "column": 13, + "line": 9, }, }, "range": Array [ - 41, - 42, + 175, + 176, ], "type": "Punctuator", - "value": ">", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 43, - "line": 1, + "column": 16, + "line": 9, }, "start": Object { - "column": 42, - "line": 1, + "column": 15, + "line": 9, }, }, "range": Array [ - 42, - 43, + 177, + 178, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 44, - "line": 1, + "column": 17, + "line": 9, }, "start": Object { - "column": 43, - "line": 1, + "column": 16, + "line": 9, }, }, "range": Array [ - 43, - 44, + 178, + 179, ], "type": "Punctuator", - "value": ">", + "value": ")", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/never-type-param.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 6, - 17, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 17, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 17, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "X", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 16, - ], - "type": "TSNeverKeyword", - }, - ], - "range": Array [ - 10, - 17, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 17, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "const", "loc": Object { "end": Object { "column": 18, - "line": 1, + "line": 9, }, "start": Object { - "column": 0, - "line": 1, + "column": 17, + "line": 9, }, }, "range": Array [ - 0, - 18, + 179, + 180, ], - "type": "VariableDeclaration", + "type": "Punctuator", + "value": ":", }, Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "name": "Observable", - "range": Array [ - 19, - 29, - ], - "type": "Identifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "empty", - "range": Array [ - 30, - 35, - ], - "type": "Identifier", - }, - "range": Array [ - 19, - 35, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, + "loc": Object { + "end": Object { + "column": 23, + "line": 9, }, - "range": Array [ - 19, - 44, - ], - "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 [ - 36, - 41, - ], - "type": "TSNeverKeyword", - }, - ], - "range": Array [ - 35, - 42, - ], - "type": "TSTypeParameterInstantiation", + "start": Object { + "column": 19, + "line": 9, }, }, + "range": Array [ + 181, + 185, + ], + "type": "Keyword", + "value": "void", + }, + Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 24, + "line": 9, }, "start": Object { - "column": 0, - "line": 2, + "column": 23, + "line": 9, }, }, "range": Array [ - 19, - 45, + 185, + 186, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ";", }, - }, - "range": Array [ - 0, - 46, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 10, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 10, }, }, "range": Array [ - 0, - 5, + 191, + 192, ], - "type": "Keyword", - "value": "const", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 8, + "line": 10, }, "start": Object { - "column": 6, - "line": 1, + "column": 5, + "line": 10, }, }, "range": Array [ - 6, - 7, + 192, + 195, ], "type": "Identifier", - "value": "x", + "value": "loo", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 9, + "line": 10, }, "start": Object { - "column": 7, - "line": 1, + "column": 8, + "line": 10, }, }, "range": Array [ - 7, - 8, + 195, + 196, ], "type": "Punctuator", - "value": ":", + "value": "]", }, Object { "loc": Object { "end": Object { "column": 10, - "line": 1, + "line": 10, }, "start": Object { "column": 9, - "line": 1, + "line": 10, }, }, "range": Array [ - 9, - 10, + 196, + 197, ], - "type": "Identifier", - "value": "X", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 1, + "line": 10, }, "start": Object { "column": 10, - "line": 1, + "line": 10, }, }, "range": Array [ - 10, - 11, + 197, + 198, ], "type": "Punctuator", - "value": "<", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 12, + "line": 10, }, "start": Object { "column": 11, - "line": 1, + "line": 10, }, }, "range": Array [ - 11, - 16, + 198, + 199, ], "type": "Identifier", - "value": "never", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 13, + "line": 10, }, "start": Object { - "column": 16, - "line": 1, + "column": 12, + "line": 10, }, }, "range": Array [ - 16, - 17, + 199, + 200, ], "type": "Punctuator", - "value": ">", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 15, + "line": 10, }, "start": Object { - "column": 17, - "line": 1, + "column": 14, + "line": 10, }, }, "range": Array [ - 17, - 18, + 201, + 202, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 16, + "line": 10, }, "start": Object { - "column": 0, - "line": 2, + "column": 15, + "line": 10, }, }, "range": Array [ - 19, - 29, + 202, + 203, ], - "type": "Identifier", - "value": "Observable", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 18, + "line": 10, }, "start": Object { - "column": 10, - "line": 2, + "column": 17, + "line": 10, }, }, "range": Array [ - 29, - 30, + 204, + 205, ], - "type": "Punctuator", - "value": ".", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 19, + "line": 10, }, "start": Object { - "column": 11, - "line": 2, + "column": 18, + "line": 10, }, }, "range": Array [ - 30, - 35, + 205, + 206, ], - "type": "Identifier", - "value": "empty", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 20, + "line": 10, }, "start": Object { - "column": 16, - "line": 2, + "column": 19, + "line": 10, }, }, "range": Array [ - 35, - 36, + 206, + 207, ], "type": "Punctuator", - "value": "<", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 25, + "line": 10, }, "start": Object { - "column": 17, - "line": 2, + "column": 21, + "line": 10, }, }, "range": Array [ - 36, - 41, + 208, + 212, ], - "type": "Identifier", - "value": "never", + "type": "Keyword", + "value": "void", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 26, + "line": 10, }, "start": Object { - "column": 22, - "line": 2, + "column": 25, + "line": 10, }, }, "range": Array [ - 41, - 42, + 212, + 213, ], "type": "Punctuator", - "value": ">", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 7, + "line": 11, }, "start": Object { - "column": 23, - "line": 2, + "column": 4, + "line": 11, }, }, "range": Array [ - 42, - 43, + 218, + 221, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "boo", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 8, + "line": 11, }, "start": Object { - "column": 24, - "line": 2, + "column": 7, + "line": 11, }, }, "range": Array [ - 43, - 44, + 221, + 222, ], "type": "Punctuator", - "value": ")", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 9, + "line": 11, }, "start": Object { - "column": 25, - "line": 2, + "column": 8, + "line": 11, }, }, "range": Array [ - 44, - 45, + 222, + 223, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "J", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/non-null-assertion-operator.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "name": "e", - "range": Array [ - 56, - 57, - ], - "type": "Identifier", - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "validateEntity", - "range": Array [ - 41, - 55, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 41, - 58, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 41, - 59, - ], - "type": "ExpressionStatement", - }, - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "s", - "range": Array [ - 68, - 69, - ], - "type": "Identifier", - }, - "init": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "object": Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "name": "e", - "range": Array [ - 72, - 73, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 72, - 74, - ], - "type": "TSNonNullExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "name", - "range": Array [ - 75, - 79, - ], - "type": "Identifier", - }, - "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", - }, - ], - "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", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "processEntity", - "range": Array [ - 9, - 22, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 10, + "line": 11, }, "start": Object { - "column": 0, - "line": 1, + "column": 9, + "line": 11, }, }, - "params": Array [ - Object { - "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 { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "name": "Entity", - "range": Array [ - 27, - 33, - ], - "type": "Identifier", - }, - }, - }, - }, - ], "range": Array [ - 0, - 82, + 223, + 224, ], - "type": "FunctionDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ">", }, - }, - "range": Array [ - 0, - 82, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 11, + "line": 11, }, "start": Object { - "column": 0, - "line": 1, + "column": 10, + "line": 11, }, }, "range": Array [ - 0, - 8, + 224, + 225, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 12, + "line": 11, }, "start": Object { - "column": 9, - "line": 1, + "column": 11, + "line": 11, }, }, "range": Array [ - 9, - 22, + 225, + 226, ], "type": "Identifier", - "value": "processEntity", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 13, + "line": 11, }, "start": Object { - "column": 22, - "line": 1, + "column": 12, + "line": 11, }, }, "range": Array [ - 22, - 23, + 226, + 227, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 15, + "line": 11, }, "start": Object { - "column": 23, - "line": 1, + "column": 14, + "line": 11, }, }, "range": Array [ - 23, - 24, + 228, + 229, ], "type": "Identifier", - "value": "e", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 16, + "line": 11, }, "start": Object { - "column": 24, - "line": 1, + "column": 15, + "line": 11, }, }, "range": Array [ - 24, - 25, + 229, + 230, ], "type": "Punctuator", - "value": "?", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 18, + "line": 11, }, "start": Object { - "column": 25, - "line": 1, + "column": 17, + "line": 11, }, }, "range": Array [ - 25, - 26, + 231, + 232, + ], + "type": "Identifier", + "value": "c", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 11, + }, + "start": Object { + "column": 18, + "line": 11, + }, + }, + "range": Array [ + 232, + 233, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 11, + }, + "start": Object { + "column": 19, + "line": 11, + }, + }, + "range": Array [ + 233, + 234, ], "type": "Punctuator", "value": ":", @@ -38107,125 +38045,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 25, + "line": 11, }, "start": Object { - "column": 27, - "line": 1, + "column": 21, + "line": 11, }, }, "range": Array [ - 27, - 33, + 235, + 239, ], - "type": "Identifier", - "value": "Entity", + "type": "Keyword", + "value": "void", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 26, + "line": 11, }, "start": Object { - "column": 33, - "line": 1, + "column": 25, + "line": 11, }, }, "range": Array [ - 33, - 34, + 239, + 240, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 7, + "line": 12, }, "start": Object { - "column": 35, - "line": 1, + "column": 4, + "line": 12, }, }, "range": Array [ - 35, - 36, + 245, + 248, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 12, + }, + "start": Object { + "column": 8, + "line": 12, + }, + }, + "range": Array [ + 249, + 250, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 10, + "line": 12, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 12, }, }, "range": Array [ - 41, - 55, + 250, + 251, ], "type": "Identifier", - "value": "validateEntity", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 11, + "line": 12, }, "start": Object { - "column": 18, - "line": 2, + "column": 10, + "line": 12, }, }, "range": Array [ - 55, - 56, + 251, + 252, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 13, + "line": 12, }, "start": Object { - "column": 19, - "line": 2, + "column": 12, + "line": 12, }, }, "range": Array [ - 56, - 57, + 253, + 254, ], "type": "Identifier", - "value": "e", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 14, + "line": 12, }, "start": Object { - "column": 20, - "line": 2, + "column": 13, + "line": 12, }, }, "range": Array [ - 57, - 58, + 254, + 255, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 12, + }, + "start": Object { + "column": 14, + "line": 12, + }, + }, + "range": Array [ + 255, + 256, ], "type": "Punctuator", "value": ")", @@ -38233,17 +38207,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 16, + "line": 12, }, "start": Object { - "column": 21, - "line": 2, + "column": 15, + "line": 12, }, }, "range": Array [ - 58, - 59, + 256, + 257, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 12, + }, + "start": Object { + "column": 17, + "line": 12, + }, + }, + "range": Array [ + 258, + 264, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 12, + }, + "start": Object { + "column": 23, + "line": 12, + }, + }, + "range": Array [ + 264, + 265, ], "type": "Punctuator", "value": ";", @@ -38252,142 +38262,232 @@ Object { "loc": Object { "end": Object { "column": 7, - "line": 3, + "line": 13, }, "start": Object { "column": 4, - "line": 3, + "line": 13, }, }, "range": Array [ - 64, - 67, + 270, + 273, ], "type": "Keyword", - "value": "let", + "value": "new", }, Object { "loc": Object { "end": Object { "column": 9, - "line": 3, + "line": 13, }, "start": Object { "column": 8, - "line": 3, + "line": 13, }, }, "range": Array [ - 68, - 69, + 274, + 275, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 13, + }, + "start": Object { + "column": 9, + "line": 13, + }, + }, + "range": Array [ + 275, + 276, ], "type": "Identifier", - "value": "s", + "value": "F", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 3, + "line": 13, }, "start": Object { "column": 10, - "line": 3, + "line": 13, }, }, "range": Array [ - 70, - 71, + 276, + 277, ], "type": "Punctuator", - "value": "=", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 13, + }, + "start": Object { + "column": 11, + "line": 13, + }, + }, + "range": Array [ + 277, + 278, + ], + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 13, - "line": 3, + "line": 13, }, "start": Object { "column": 12, - "line": 3, + "line": 13, }, }, "range": Array [ - 72, - 73, + 278, + 279, ], "type": "Identifier", - "value": "e", + "value": "a", }, Object { "loc": Object { "end": Object { "column": 14, - "line": 3, + "line": 13, }, "start": Object { "column": 13, - "line": 3, + "line": 13, }, }, "range": Array [ - 73, - 74, + 279, + 280, ], "type": "Punctuator", - "value": "!", + "value": ",", }, Object { "loc": Object { "end": Object { + "column": 16, + "line": 13, + }, + "start": Object { "column": 15, - "line": 3, + "line": 13, + }, + }, + "range": Array [ + 281, + 282, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 13, }, "start": Object { - "column": 14, - "line": 3, + "column": 16, + "line": 13, }, }, "range": Array [ - 74, - 75, + 282, + 283, ], "type": "Punctuator", - "value": ".", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 13, + }, + "start": Object { + "column": 17, + "line": 13, + }, + }, + "range": Array [ + 283, + 284, + ], + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { "column": 19, - "line": 3, + "line": 13, }, "start": Object { - "column": 15, - "line": 3, + "column": 18, + "line": 13, }, }, "range": Array [ - 75, - 79, + 284, + 285, ], - "type": "Identifier", - "value": "name", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { + "column": 26, + "line": 13, + }, + "start": Object { "column": 20, - "line": 3, + "line": 13, + }, + }, + "range": Array [ + 286, + 292, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 13, }, "start": Object { - "column": 19, - "line": 3, + "column": 26, + "line": 13, }, }, "range": Array [ - 79, - 80, + 292, + 293, ], "type": "Punctuator", "value": ";", @@ -38396,16 +38496,16 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 14, }, "start": Object { "column": 0, - "line": 4, + "line": 14, }, }, "range": Array [ - 81, - 82, + 294, + 295, ], "type": "Punctuator", "value": "}", @@ -38415,194 +38515,161 @@ Object { } `; -exports[`typescript fixtures/basics/null-and-undefined-type-annotations.src 1`] = ` +exports[`typescript fixtures/basics/interface-with-construct-signature-with-parameter-accessibility.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "body": Object { + "body": Array [ + Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 30, + "line": 2, }, "start": Object { "column": 4, - "line": 1, + "line": 2, }, }, - "name": "x", - "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 { + "params": Array [ + Object { + "accessibility": "public", "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 9, + "line": 2, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, }, + "name": "x", + "range": Array [ + 33, + 34, + ], + "type": "Identifier", }, "range": Array [ - 7, - 11, + 26, + 34, ], - "type": "TSNullKeyword", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 11, - ], - "type": "VariableDeclarator", - }, - ], - "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 { - "id": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "y", - "range": Array [ - 17, - 29, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, + "type": "TSParameterProperty", }, - "range": Array [ - 18, - 29, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + Object { + "accessibility": "private", "loc": Object { "end": Object { - "column": 16, + "column": 28, "line": 2, }, "start": Object { - "column": 7, + "column": 19, "line": 2, }, }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "name": "y", + "range": Array [ + 44, + 45, + ], + "type": "Identifier", + }, "range": Array [ - 20, - 29, + 36, + 45, ], - "type": "TSUndefinedKeyword", + "type": "TSParameterProperty", }, - }, + ], + "range": Array [ + 21, + 47, + ], + "type": "TSConstructSignature", + "typeAnnotation": null, }, - "init": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 1, }, - "range": Array [ - 17, - 29, - ], - "type": "VariableDeclarator", }, - ], - "kind": "let", + "range": Array [ + 15, + 49, + ], + "type": "TSInterfaceBody", + }, + "heritage": Array [], + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Test", + "range": Array [ + 10, + 14, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 13, - 30, + 0, + 49, ], - "type": "VariableDeclaration", + "type": "TSInterfaceDeclaration", }, ], "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -38611,14 +38678,14 @@ Object { }, "range": Array [ 0, - 30, + 50, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 9, "line": 1, }, "start": Object { @@ -38628,604 +38695,421 @@ Object { }, "range": Array [ 0, - 3, + 9, ], "type": "Keyword", - "value": "let", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 14, "line": 1, }, "start": Object { - "column": 4, + "column": 10, "line": 1, }, }, "range": Array [ - 4, - 5, + 10, + 14, ], "type": "Identifier", - "value": "x", + "value": "Test", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 16, "line": 1, }, "start": Object { - "column": 5, + "column": 15, "line": 1, }, }, "range": Array [ - 5, - 6, + 15, + 16, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 7, - 11, + 21, + 24, ], "type": "Keyword", - "value": "null", + "value": "new", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 11, - 12, + 25, + 26, ], "type": "Punctuator", - "value": ";", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 15, "line": 2, }, "start": Object { - "column": 0, + "column": 9, "line": 2, }, }, "range": Array [ - 13, - 16, + 26, + 32, ], "type": "Keyword", - "value": "let", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 17, "line": 2, }, "start": Object { - "column": 4, + "column": 16, "line": 2, }, }, "range": Array [ - 17, - 18, + 33, + 34, ], "type": "Identifier", - "value": "y", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 18, "line": 2, }, "start": Object { - "column": 5, + "column": 17, "line": 2, }, }, "range": Array [ - 18, - 19, + 34, + 35, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 26, "line": 2, }, "start": Object { - "column": 7, + "column": 19, "line": 2, }, }, "range": Array [ - 20, - 29, + 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": "undefined", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 29, "line": 2, }, "start": Object { - "column": 16, + "column": 28, "line": 2, }, }, "range": Array [ - 29, - 30, + 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", } `; -exports[`typescript fixtures/basics/object-with-escaped-properties.src 1`] = ` +exports[`typescript fixtures/basics/interface-with-extends-type-parameters.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 1, + "column": 32, "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", + "range": Array [ + 32, + 36, + ], + "type": "TSInterfaceBody", + }, + "heritage": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 28, "line": 1, }, "start": Object { - "column": 3, + "column": 25, "line": 1, }, }, - "method": false, + "name": "Bar", "range": Array [ - 3, - 13, + 25, + 28, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 28, + ], + "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, + }, }, - "start": Object { - "column": 9, - "line": 1, + "range": Array [ + 29, + 30, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "name": "J", + "range": Array [ + 29, + 30, + ], + "type": "Identifier", }, }, - "range": Array [ - 9, - 13, - ], - "raw": "null", - "type": "Literal", - "value": null, - }, + ], + "range": Array [ + 28, + 31, + ], + "type": "TSTypeParameterInstantiation", }, - ], - "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 { - "expression": Object { + "id": Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 13, + "line": 1, }, "start": Object { - "column": 1, - "line": 3, + "column": 10, + "line": 1, }, }, - "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, - "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", - }, - "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, - ], - "type": "FunctionExpression", - }, - }, - ], + "name": "Foo", "range": Array [ - 20, - 33, + 10, + 13, ], - "type": "ObjectExpression", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 16, + "column": 1, "line": 3, }, "start": Object { "column": 0, - "line": 3, + "line": 1, }, }, "range": Array [ - 19, - 35, + 0, + 36, ], - "type": "ExpressionStatement", - }, - Object { - "expression": Object { + "type": "TSInterfaceDeclaration", + "typeParameters": Object { "loc": Object { "end": Object { - "column": 17, - "line": 5, + "column": 16, + "line": 1, }, "start": Object { - "column": 1, - "line": 5, + "column": 13, + "line": 1, }, }, - "properties": Array [ + "params": 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, - "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 { - "body": Object { - "body": Array [ - Object { - "computed": 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, + "line": 1, }, "start": Object { - "column": 10, - "line": 7, + "column": 14, + "line": 1, }, }, + "name": "T", "range": Array [ - 68, - 79, + 14, + 15, ], - "static": false, - "type": "ClassProperty", - "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, + "type": "TSTypeParameter", }, - }, - "range": Array [ - 66, - 81, ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "name": "X", "range": Array [ - 64, - 65, + 13, + 16, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 58, - 81, - ], - "superClass": null, - "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 8, + "line": 4, }, "start": Object { "column": 0, @@ -39234,14 +39118,14 @@ Object { }, "range": Array [ 0, - 82, + 37, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 9, "line": 1, }, "start": Object { @@ -39251,82 +39135,46 @@ Object { }, "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, + 9, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 13, "line": 1, }, "start": Object { - "column": 3, + "column": 10, "line": 1, }, }, "range": Array [ - 3, - 7, + 10, + 13, ], - "type": "String", - "value": "'__'", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 14, "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, + 14, ], - "type": "Keyword", - "value": "null", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { @@ -39343,8 +39191,8 @@ Object { 14, 15, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { @@ -39362,130 +39210,112 @@ Object { 16, ], "type": "Punctuator", - "value": ")", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 24, "line": 1, }, "start": Object { - "column": 16, + "column": 17, "line": 1, }, }, "range": Array [ - 16, 17, + 24, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 25, + "line": 1, }, }, "range": Array [ - 19, - 20, + 25, + 28, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 29, + "line": 1, }, "start": Object { - "column": 1, - "line": 3, + "column": 28, + "line": 1, }, }, "range": Array [ - 20, - 21, + 28, + 29, ], "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": "'__'", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 30, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 29, + "line": 1, }, }, "range": Array [ - 26, - 27, + 29, + 30, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "J", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 31, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 30, + "line": 1, }, }, "range": Array [ - 27, - 28, + 30, + 31, ], "type": "Punctuator", - "value": ")", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 33, + "line": 1, }, "start": Object { - "column": 10, - "line": 3, + "column": 32, + "line": 1, }, }, "range": Array [ - 29, - 30, + 32, + 33, ], "type": "Punctuator", "value": "{", @@ -39493,377 +39323,560 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 1, "line": 3, }, "start": Object { - "column": 11, + "column": 0, "line": 3, }, }, "range": Array [ - 30, - 31, + 35, + 36, ], "type": "Punctuator", "value": "}", }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/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, + }, }, - "start": Object { - "column": 13, - "line": 3, + "range": Array [ + 18, + 21, + ], + "type": "TSInterfaceBody", + }, + "heritage": Array [], + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, + "name": "Test", + "range": Array [ + 10, + 14, + ], + "type": "Identifier", }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "}", - }, - Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 1, + "line": 2, }, "start": Object { - "column": 14, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 33, - 34, + 0, + 21, ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, + "type": "TSInterfaceDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 15, + 16, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 14, + 17, + ], + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", }, + ], + "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": 1, - "line": 5, + "column": 9, + "line": 1, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 37, - 38, + 0, + 9, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 14, + "line": 1, }, "start": Object { - "column": 1, - "line": 5, + "column": 10, + "line": 1, }, }, "range": Array [ - 38, - 39, + 10, + 14, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "Test", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 5, + "column": 15, + "line": 1, }, "start": Object { - "column": 3, - "line": 5, + "column": 14, + "line": 1, }, }, "range": Array [ - 40, - 41, + 14, + 15, ], "type": "Punctuator", - "value": "[", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 5, + "column": 16, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 15, + "line": 1, }, }, "range": Array [ - 41, - 45, + 15, + 16, ], - "type": "String", - "value": "'__'", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 17, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 16, + "line": 1, }, }, "range": Array [ - 45, - 46, + 16, + 17, ], "type": "Punctuator", - "value": "]", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 5, + "column": 19, + "line": 1, }, "start": Object { - "column": 9, - "line": 5, + "column": 18, + "line": 1, }, }, "range": Array [ - 46, - 47, + 18, + 19, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 5, + "column": 1, + "line": 2, }, "start": Object { - "column": 11, - "line": 5, + "column": 0, + "line": 2, }, }, "range": Array [ - 48, - 52, + 20, + 21, ], - "type": "Keyword", - "value": "null", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/interface-with-jsdoc.src 1`] = ` +Object { + "body": Array [ Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "name": "foo", + "range": Array [ + 76, + 79, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "optional": false, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 6, + }, + "start": Object { + "column": 8, + "line": 6, + }, + }, + "name": "bar", + "range": Array [ + 80, + 83, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 76, + 85, + ], + "static": false, + "type": "TSMethodSignature", + "typeAnnotation": null, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 7, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 87, + ], + "type": "TSInterfaceBody", + }, + "heritage": Array [], + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Test", + "range": Array [ + 10, + 14, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 17, - "line": 5, + "column": 1, + "line": 7, }, "start": Object { - "column": 16, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 53, - 54, + 0, + 87, ], - "type": "Punctuator", - "value": "}", + "type": "TSInterfaceDeclaration", + }, + ], + "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": 18, - "line": 5, + "column": 9, + "line": 1, }, "start": Object { - "column": 17, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 54, - 55, + 0, + 9, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 5, + "column": 14, + "line": 1, }, "start": Object { - "column": 18, - "line": 5, + "column": 10, + "line": 1, }, }, "range": Array [ - 55, - 56, + 10, + 14, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "Test", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 7, + "column": 16, + "line": 1, }, "start": Object { - "column": 0, - "line": 7, + "column": 15, + "line": 1, }, }, "range": Array [ - 58, - 63, + 15, + 16, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 7, - "line": 7, + "line": 6, }, "start": Object { - "column": 6, - "line": 7, + "column": 4, + "line": 6, }, }, "range": Array [ - 64, - 65, + 76, + 79, ], "type": "Identifier", - "value": "X", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 7, + "column": 8, + "line": 6, }, "start": Object { - "column": 8, - "line": 7, + "column": 7, + "line": 6, }, }, "range": Array [ - 66, - 67, + 79, + 80, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 7, + "column": 11, + "line": 6, }, "start": Object { - "column": 10, - "line": 7, + "column": 8, + "line": 6, }, }, "range": Array [ - 68, - 72, + 80, + 83, ], - "type": "String", - "value": "'__'", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 7, + "column": 12, + "line": 6, }, "start": Object { - "column": 15, - "line": 7, + "column": 11, + "line": 6, }, }, "range": Array [ - 73, - 74, + 83, + 84, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 7, + "column": 13, + "line": 6, }, "start": Object { - "column": 17, - "line": 7, + "column": 12, + "line": 6, }, }, "range": Array [ - 75, - 79, + 84, + 85, ], - "type": "Keyword", - "value": "null", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 1, "line": 7, }, "start": Object { - "column": 22, + "column": 0, "line": 7, }, }, "range": Array [ - 80, - 81, + 86, + 87, ], "type": "Punctuator", "value": "}", @@ -39873,195 +39886,308 @@ Object { } `; -exports[`typescript fixtures/basics/symbol-type-param.src 1`] = ` +exports[`typescript fixtures/basics/interface-with-optional-properties.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", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "test", - "range": Array [ - 9, - 13, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", }, - "start": Object { - "column": 14, - "line": 1, + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, }, + "optional": true, + "range": Array [ + 21, + 26, + ], + "type": "TSPropertySignature", }, - "name": "abc", - "range": Array [ - 14, - 38, - ], - "type": "Identifier", - "typeAnnotation": Object { + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 31, + 34, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 17, + "line": 3, }, "start": Object { - "column": 17, - "line": 1, + "column": 4, + "line": 3, }, }, + "optional": true, "range": Array [ - 17, - 38, + 31, + 44, ], - "type": "TSTypeAnnotation", + "type": "TSPropertySignature", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 16, + "line": 3, }, "start": Object { - "column": 19, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 19, - 38, + 35, + 43, ], - "type": "TSTypeReference", - "typeName": Object { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 16, + "line": 3, }, "start": Object { - "column": 19, - "line": 1, + "column": 10, + "line": 3, }, }, - "name": "Map", "range": Array [ - 19, - 22, + 37, + 43, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "name": "baz", + "range": Array [ + 49, + 52, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 34, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "optional": true, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "name": "foo", + "range": Array [ + 54, + 57, ], "type": "Identifier", }, - "typeParameters": Object { + Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 26, + "line": 4, }, "start": Object { - "column": 22, - "line": 1, + "column": 14, + "line": 4, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, + "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 [ - 23, - 29, - ], - "type": "TSSymbolKeyword", }, - Object { + "range": Array [ + 63, + 71, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 26, + "line": 4, }, "start": Object { - "column": 31, - "line": 1, + "column": 20, + "line": 4, }, }, "range": Array [ - 31, - 37, + 65, + 71, ], "type": "TSStringKeyword", }, - ], + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 28, + "line": 4, + }, + }, + "name": "baz", + "optional": true, "range": Array [ - 22, - 38, + 73, + 76, ], - "type": "TSTypeParameterInstantiation", + "type": "Identifier", }, - }, + ], + "range": Array [ + 49, + 79, + ], + "static": false, + "type": "TSMethodSignature", + "typeAnnotation": null, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 15, + "line": 1, }, }, - ], + "range": Array [ + 15, + 81, + ], + "type": "TSInterfaceBody", + }, + "heritage": Array [], + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "test", + "range": Array [ + 10, + 14, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, "range": Array [ 0, - 42, + 81, ], - "type": "FunctionDeclaration", + "type": "TSInterfaceDeclaration", }, ], "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 0, + "line": 6, }, "start": Object { "column": 0, @@ -40070,14 +40196,14 @@ Object { }, "range": Array [ 0, - 42, + 82, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 9, "line": 1, }, "start": Object { @@ -40087,25 +40213,25 @@ Object { }, "range": Array [ 0, - 8, + 9, ], "type": "Keyword", - "value": "function", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 1, }, "start": Object { - "column": 9, + "column": 10, "line": 1, }, }, "range": Array [ - 9, - 13, + 10, + 14, ], "type": "Identifier", "value": "test", @@ -40113,143 +40239,143 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 16, "line": 1, }, "start": Object { - "column": 13, + "column": 15, "line": 1, }, }, "range": Array [ - 13, - 14, + 15, + 16, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 14, - 17, + 21, + 24, ], "type": "Identifier", - "value": "abc", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 17, - 18, + 24, + 25, ], "type": "Punctuator", - "value": ":", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 19, - 22, + 25, + 26, ], - "type": "Identifier", - "value": "Map", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 22, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 22, - 23, + 31, + 34, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 23, - "line": 1, + "column": 7, + "line": 3, }, }, "range": Array [ - 23, - 29, + 34, + 35, ], - "type": "Identifier", - "value": "symbol", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 9, + "line": 3, }, "start": Object { - "column": 29, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 29, - 30, + 35, + 36, ], "type": "Punctuator", - "value": ",", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 16, + "line": 3, }, "start": Object { - "column": 31, - "line": 1, + "column": 10, + "line": 3, }, }, "range": Array [ - 31, 37, + 43, ], "type": "Identifier", "value": "string", @@ -40257,777 +40383,395 @@ Object { Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 17, + "line": 3, }, "start": Object { - "column": 37, - "line": 1, + "column": 16, + "line": 3, }, }, "range": Array [ - 37, - 38, + 43, + 44, ], "type": "Punctuator", - "value": ">", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 7, + "line": 4, }, "start": Object { - "column": 38, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 38, - 39, + 49, + 52, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 1, + "column": 8, + "line": 4, }, "start": Object { - "column": 40, - "line": 1, + "column": 7, + "line": 4, }, }, "range": Array [ - 40, - 41, + 52, + 53, ], "type": "Punctuator", - "value": "{", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 9, + "line": 4, }, "start": Object { - "column": 41, - "line": 1, + "column": 8, + "line": 4, }, }, "range": Array [ - 41, - 42, + 53, + 54, ], "type": "Punctuator", - "value": "}", + "value": "(", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/type-alias-declaration.src 1`] = ` -Object { - "body": Array [ Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "Result", - "range": Array [ - 5, - 11, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 12, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 9, + "line": 4, }, }, "range": Array [ - 0, - 37, + 54, + 57, ], - "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 { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "Success", - "range": Array [ - 17, - 24, - ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - }, - }, - ], - "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 { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "Failure", - "range": Array [ - 30, - 37, - ], - "type": "Identifier", - }, - }, - ], - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 12, - 13, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 11, - 14, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "foo", }, - }, - "range": Array [ - 0, - 37, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 13, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 12, + "line": 4, }, }, "range": Array [ - 0, - 4, + 57, + 58, ], - "type": "Identifier", - "value": "type", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 17, + "line": 4, }, "start": Object { - "column": 5, - "line": 1, + "column": 14, + "line": 4, }, }, "range": Array [ - 5, - 11, + 59, + 62, ], "type": "Identifier", - "value": "Result", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 18, + "line": 4, }, "start": Object { - "column": 11, - "line": 1, + "column": 17, + "line": 4, }, }, "range": Array [ - 11, - 12, + 62, + 63, ], "type": "Punctuator", - "value": "<", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 19, + "line": 4, }, "start": Object { - "column": 12, - "line": 1, + "column": 18, + "line": 4, }, }, "range": Array [ - 12, - 13, + 63, + 64, ], - "type": "Identifier", - "value": "T", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 26, + "line": 4, }, "start": Object { - "column": 13, - "line": 1, + "column": 20, + "line": 4, }, }, "range": Array [ - 13, - 14, + 65, + 71, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 27, + "line": 4, }, "start": Object { - "column": 15, - "line": 1, + "column": 26, + "line": 4, }, }, "range": Array [ - 15, - 16, + 71, + 72, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 31, + "line": 4, }, "start": Object { - "column": 17, - "line": 1, + "column": 28, + "line": 4, }, }, "range": Array [ - 17, - 24, + 73, + 76, ], "type": "Identifier", - "value": "Success", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 32, + "line": 4, }, "start": Object { - "column": 24, - "line": 1, + "column": 31, + "line": 4, }, }, "range": Array [ - 24, - 25, + 76, + 77, ], "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", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 33, + "line": 4, }, "start": Object { - "column": 26, - "line": 1, + "column": 32, + "line": 4, }, }, "range": Array [ - 26, - 27, + 77, + 78, ], "type": "Punctuator", - "value": ">", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 34, + "line": 4, }, "start": Object { - "column": 28, - "line": 1, + "column": 33, + "line": 4, }, }, "range": Array [ - 28, - 29, + 78, + 79, ], "type": "Punctuator", - "value": "|", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 30, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 30, - 37, + 80, + 81, ], - "type": "Identifier", - "value": "Failure", + "type": "Punctuator", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/type-alias-declaration-with-constrained-type-parameter.src 1`] = ` +exports[`typescript fixtures/basics/interface-without-type-annotation.src 1`] = ` Object { "body": Array [ Object { - "id": Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 21, + 25, + ], + "type": "TSPropertySignature", + }, + ], "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 5, + "column": 15, "line": 1, }, }, - "name": "Result", "range": Array [ - 5, - 11, + 15, + 27, ], - "type": "Identifier", + "type": "TSInterfaceBody", }, - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 48, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { + "heritage": Array [], + "id": Object { "loc": Object { "end": Object { - "column": 48, + "column": 14, "line": 1, }, "start": Object { - "column": 28, + "column": 10, "line": 1, }, }, + "name": "test", "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 { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "Success", - "range": Array [ - 28, - 35, - ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 36, - 37, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 35, - 38, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 48, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "name": "Failure", - "range": Array [ - 41, - 48, - ], - "type": "Identifier", - }, - }, + 10, + 14, ], + "type": "Identifier", }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, }, - "params": Array [ - Object { - "constraint": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "members": Array [], - "range": Array [ - 22, - 24, - ], - "type": "TSTypeLiteral", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 12, - 24, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 11, - 25, - ], - "type": "TSTypeParameterDeclaration", }, + "range": Array [ + 0, + 27, + ], + "type": "TSInterfaceDeclaration", }, ], "loc": Object { "end": Object { - "column": 48, - "line": 1, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -41036,14 +40780,14 @@ Object { }, "range": Array [ 0, - 48, + 28, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, + "column": 9, "line": 1, }, "start": Object { @@ -41053,356 +40797,354 @@ Object { }, "range": Array [ 0, - 4, + 9, ], - "type": "Identifier", - "value": "type", + "type": "Keyword", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 14, "line": 1, }, "start": Object { - "column": 5, + "column": 10, "line": 1, }, }, "range": Array [ - 5, - 11, + 10, + 14, ], "type": "Identifier", - "value": "Result", + "value": "test", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 16, "line": 1, }, "start": Object { - "column": 11, + "column": 15, "line": 1, }, }, "range": Array [ - 11, - 12, + 15, + 16, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 12, - 13, + 21, + 24, ], "type": "Identifier", - "value": "T", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 14, - 21, + 24, + 25, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 22, - 23, + 26, + 27, ], "type": "Punctuator", - "value": "{", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/keyof-operator.src 1`] = ` +Object { + "body": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 24, + "column": 19, "line": 1, }, "start": Object { - "column": 23, + "column": 0, "line": 1, }, }, "range": Array [ - 23, - 24, + 0, + 19, ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, }, - "start": Object { - "column": 24, - "line": 1, + "operator": "keyof", + "range": Array [ + 9, + 18, + ], + "type": "TSTypeOperator", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 18, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, }, }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ">", }, + ], + "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": 27, + "column": 4, "line": 1, }, "start": Object { - "column": 26, + "column": 0, "line": 1, }, }, "range": Array [ - 26, - 27, + 0, + 4, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 6, "line": 1, }, "start": Object { - "column": 28, + "column": 5, "line": 1, }, }, "range": Array [ - 28, - 35, + 5, + 6, ], "type": "Identifier", - "value": "Success", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 8, "line": 1, }, "start": Object { - "column": 35, + "column": 7, "line": 1, }, }, "range": Array [ - 35, - 36, + 7, + 8, ], "type": "Punctuator", - "value": "<", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 14, "line": 1, }, "start": Object { - "column": 36, + "column": 9, "line": 1, }, }, "range": Array [ - 36, - 37, + 9, + 14, ], "type": "Identifier", - "value": "T", + "value": "keyof", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 18, "line": 1, }, "start": Object { - "column": 37, + "column": 15, "line": 1, }, }, "range": Array [ - 37, - 38, + 15, + 18, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 40, + "column": 19, "line": 1, }, "start": Object { - "column": 39, + "column": 18, "line": 1, }, }, "range": Array [ - 39, - 40, + 18, + 19, ], "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", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/type-alias-object-without-annotation.src 1`] = ` +exports[`typescript fixtures/basics/nested-type-arguments.src 1`] = ` Object { "body": Array [ Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 5, - 8, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 30, - ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "members": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - }, + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 24, + "column": 44, "line": 1, }, "start": Object { - "column": 12, + "column": 4, "line": 1, }, }, + "name": "nestedArray", "range": Array [ - 12, - 24, + 4, + 44, ], - "type": "TSPropertySignature", + "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 23, + "column": 44, "line": 1, }, "start": Object { @@ -41412,13 +41154,13 @@ Object { }, "range": Array [ 15, - 23, + 44, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 23, + "column": 44, "line": 1, }, "start": Object { @@ -41428,61 +41170,214 @@ Object { }, "range": Array [ 17, - 23, + 44, ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "Array", + "range": Array [ + 17, + 22, + ], + "type": "Identifier", }, - "start": Object { - "column": 25, - "line": 1, + "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 { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "Array", + "range": Array [ + 23, + 28, + ], + "type": "Identifier", + }, + "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 { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "name": "Array", + "range": Array [ + 29, + 34, + ], + "type": "Identifier", + }, + "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", }, }, - "name": "baz", - "range": Array [ - 25, - 28, - ], - "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, }, - "range": Array [ - 25, - 28, - ], - "type": "TSPropertySignature", }, - ], - "range": Array [ - 11, - 29, - ], - "type": "TSTypeLiteral", + "range": Array [ + 4, + 44, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, }, + "range": Array [ + 0, + 44, + ], + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 44, + "line": 1, }, "start": Object { "column": 0, @@ -41491,14 +41386,14 @@ Object { }, "range": Array [ 0, - 31, + 44, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, + "column": 3, "line": 1, }, "start": Object { @@ -41508,491 +41403,508 @@ Object { }, "range": Array [ 0, - 4, + 3, ], - "type": "Identifier", - "value": "type", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 15, "line": 1, }, "start": Object { - "column": 5, + "column": 4, "line": 1, }, }, "range": Array [ - 5, - 8, + 4, + 15, ], "type": "Identifier", - "value": "foo", + "value": "nestedArray", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 16, "line": 1, }, "start": Object { - "column": 9, + "column": 15, "line": 1, }, }, "range": Array [ - 9, - 10, + 15, + 16, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 22, "line": 1, }, "start": Object { - "column": 11, + "column": 17, "line": 1, }, }, "range": Array [ - 11, - 12, + 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": "{", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 28, "line": 1, }, "start": Object { - "column": 12, + "column": 23, "line": 1, }, }, "range": Array [ - 12, - 15, + 23, + 28, ], "type": "Identifier", - "value": "bar", + "value": "Array", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 29, "line": 1, }, "start": Object { - "column": 15, + "column": 28, "line": 1, }, }, "range": Array [ - 15, - 16, + 28, + 29, ], "type": "Punctuator", - "value": ":", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 34, "line": 1, }, "start": Object { - "column": 17, + "column": 29, "line": 1, }, }, "range": Array [ - 17, - 23, + 29, + 34, ], "type": "Identifier", - "value": "string", + "value": "Array", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 35, "line": 1, }, "start": Object { - "column": 23, + "column": 34, "line": 1, }, }, "range": Array [ - 23, - 24, + 34, + 35, ], "type": "Punctuator", - "value": ",", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 41, "line": 1, }, "start": Object { - "column": 25, + "column": 35, "line": 1, }, }, "range": Array [ - 25, - 28, + 35, + 41, ], "type": "Identifier", - "value": "baz", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 42, "line": 1, }, "start": Object { - "column": 28, + "column": 41, "line": 1, }, }, "range": Array [ - 28, - 29, + 41, + 42, ], "type": "Punctuator", - "value": "}", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 43, "line": 1, }, "start": Object { - "column": 29, + "column": 42, "line": 1, }, }, "range": Array [ - 29, - 30, + 42, + 43, ], "type": "Punctuator", - "value": ";", + "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", } `; -exports[`typescript fixtures/basics/type-guard.src 1`] = ` +exports[`typescript fixtures/basics/never-type-param.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "left": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "name": "x", - "range": Array [ - 59, - 60, - ], - "type": "Identifier", + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 6, + 17, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, }, + }, + "range": Array [ + 7, + 17, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 9, + "line": 1, }, }, - "operator": "typeof", - "prefix": true, "range": Array [ - 52, - 60, + 9, + 17, ], - "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, + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, }, - "start": Object { - "column": 24, - "line": 2, + "name": "X", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "type": "TSNeverKeyword", + }, + ], + "range": Array [ + 10, + 17, + ], + "type": "TSTypeParameterInstantiation", }, - "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", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, }, - "start": Object { - "column": 9, - "line": 1, + "init": null, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "range": Array [ + 6, + 17, + ], + "type": "VariableDeclarator", }, - "name": "isString", - "range": Array [ - 9, - 17, - ], - "type": "Identifier", - }, + ], + "kind": "const", "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 18, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [ - Object { + "range": Array [ + 0, + 18, + ], + "type": "VariableDeclaration", + }, + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "computed": false, "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 0, + "line": 2, }, }, - "name": "x", - "range": Array [ - 18, - 24, - ], - "type": "Identifier", - "typeAnnotation": Object { + "object": Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 0, + "line": 2, }, }, + "name": "Observable", "range": Array [ 19, - 24, + 29, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, }, - "range": Array [ - 21, - 24, - ], - "type": "TSAnyKeyword", }, + "name": "empty", + "range": Array [ + 30, + 35, + ], + "type": "Identifier", }, + "range": Array [ + 19, + 35, + ], + "type": "MemberExpression", }, - ], - "range": Array [ - 0, - 75, - ], - "returnType": Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 25, - 38, + 19, + 44, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "type": "CallExpression", + "typeParameters": Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 27, - "line": 1, - }, - }, - "parameterName": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, + "column": 16, + "line": 2, }, - "name": "x", - "range": Array [ - 27, - 28, - ], - "type": "Identifier", }, - "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 { + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 32, - "line": 1, + "column": 17, + "line": 2, }, }, "range": Array [ - 32, - 38, + 36, + 41, ], - "type": "TSStringKeyword", + "type": "TSNeverKeyword", }, - }, + ], + "range": Array [ + 35, + 42, + ], + "type": "TSTypeParameterInstantiation", }, }, - "type": "FunctionDeclaration", + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 19, + 45, + ], + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 1, + "column": 0, "line": 3, }, "start": Object { @@ -42002,14 +41914,14 @@ Object { }, "range": Array [ 0, - 75, + 46, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { @@ -42019,285 +41931,267 @@ Object { }, "range": Array [ 0, - 8, + 5, ], "type": "Keyword", - "value": "function", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 7, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, "range": Array [ - 9, - 17, + 6, + 7, ], "type": "Identifier", - "value": "isString", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 8, "line": 1, }, "start": Object { - "column": 17, + "column": 7, "line": 1, }, }, "range": Array [ - 17, - 18, + 7, + 8, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 10, "line": 1, }, "start": Object { - "column": 18, + "column": 9, "line": 1, }, }, "range": Array [ - 18, - 19, + 9, + 10, ], "type": "Identifier", - "value": "x", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 11, "line": 1, }, "start": Object { - "column": 19, + "column": 10, "line": 1, }, }, "range": Array [ - 19, - 20, + 10, + 11, ], "type": "Punctuator", - "value": ":", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 16, "line": 1, }, "start": Object { - "column": 21, + "column": 11, "line": 1, }, }, "range": Array [ - 21, - 24, + 11, + 16, ], "type": "Identifier", - "value": "any", + "value": "never", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 17, "line": 1, }, "start": Object { - "column": 24, + "column": 16, "line": 1, }, }, "range": Array [ - 24, - 25, + 16, + 17, ], "type": "Punctuator", - "value": ")", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 18, "line": 1, }, "start": Object { - "column": 25, + "column": 17, "line": 1, }, }, "range": Array [ - 25, - 26, + 17, + 18, ], "type": "Punctuator", - "value": ":", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 27, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 27, - 28, + 19, + 29, ], "type": "Identifier", - "value": "x", + "value": "Observable", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 29, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ 29, - 31, + 30, ], - "type": "Identifier", - "value": "is", + "type": "Punctuator", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 32, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 32, - 38, + 30, + 35, ], "type": "Identifier", - "value": "string", + "value": "empty", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 39, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 39, - 40, + 35, + 36, ], "type": "Punctuator", - "value": "{", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 22, "line": 2, }, "start": Object { - "column": 4, + "column": 17, "line": 2, }, }, "range": Array [ - 45, - 51, + 36, + 41, ], - "type": "Keyword", - "value": "return", + "type": "Identifier", + "value": "never", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 23, "line": 2, }, "start": Object { - "column": 11, + "column": 22, "line": 2, }, }, "range": Array [ - 52, - 58, + 41, + 42, ], - "type": "Keyword", - "value": "typeof", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 24, "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, + 42, + 43, ], "type": "Punctuator", - "value": "===", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 25, "line": 2, }, "start": Object { @@ -42306,256 +42200,254 @@ Object { }, }, "range": Array [ - 65, - 73, + 43, + 44, ], - "type": "String", - "value": "'string'", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 26, + "line": 2, }, "start": Object { - "column": 0, - "line": 3, + "column": 25, + "line": 2, }, }, "range": Array [ - 74, - 75, + 44, + 45, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/type-parameters-comments.src 1`] = ` +exports[`typescript fixtures/basics/non-null-assertion-operator.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "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 { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "name": "e", + "range": Array [ + 56, + 57, + ], + "type": "Identifier", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "validateEntity", + "range": Array [ + 41, + 55, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 21, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 21, - 22, + 41, + 58, ], - "type": "TSTypeReference", - "typeName": Object { + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 41, + 59, + ], + "type": "ExpressionStatement", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "name": "s", + "range": Array [ + 68, + 69, + ], + "type": "Identifier", + }, + "init": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "object": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "name": "e", + "range": Array [ + 72, + 73, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 72, + 74, + ], + "type": "TSNonNullExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "name": "name", + "range": Array [ + 75, + 79, + ], + "type": "Identifier", + }, + "range": Array [ + 72, + 79, + ], + "type": "MemberExpression", + }, "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 19, + "line": 3, }, "start": Object { - "column": 21, - "line": 1, + "column": 8, + "line": 3, }, }, - "name": "A", "range": Array [ - 21, - 22, + 68, + 79, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - }, - ], - "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", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 53, - 56, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 44, - 87, - ], - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "params": Array [ - Object { + ], + "kind": "let", "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 20, + "line": 3, }, "start": Object { - "column": 24, - "line": 2, + "column": 4, + "line": 3, }, }, - "name": "A", "range": Array [ - 68, - 69, + 64, + 80, ], - "type": "TSTypeParameter", + "type": "VariableDeclaration", }, ], - "range": Array [ - 56, - 81, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "async": false, - "body": Object { - "body": Array [], "loc": Object { "end": Object { - "column": 49, - "line": 3, + "column": 1, + "line": 4, }, "start": Object { - "column": 46, - "line": 3, + "column": 35, + "line": 1, }, }, "range": Array [ - 134, - 137, + 35, + 82, ], "type": "BlockStatement", }, @@ -42564,114 +42456,114 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 12, - "line": 3, + "column": 22, + "line": 1, }, "start": Object { "column": 9, - "line": 3, + "line": 1, }, }, - "name": "baz", + "name": "processEntity", "range": Array [ - 97, - 100, + 9, + 22, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 49, - "line": 3, + "column": 1, + "line": 4, }, "start": Object { "column": 0, - "line": 3, + "line": 1, }, }, - "params": Array [], - "range": Array [ - 88, - 137, - ], - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, }, - }, - "params": Array [ - Object { - "default": Object { + "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": 41, - "line": 3, + "column": 33, + "line": 1, }, "start": Object { - "column": 38, - "line": 3, + "column": 27, + "line": 1, }, }, "range": Array [ - 126, - 129, + 27, + 33, ], "type": "TSTypeReference", "typeName": Object { "loc": Object { "end": Object { - "column": 41, - "line": 3, + "column": 33, + "line": 1, }, "start": Object { - "column": 38, - "line": 3, + "column": 27, + "line": 1, }, }, - "name": "Foo", + "name": "Entity", "range": Array [ - 126, - 129, + 27, + 33, ], "type": "Identifier", }, }, - "loc": Object { - "end": Object { - "column": 41, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "name": "A", - "range": Array [ - 112, - 129, - ], - "type": "TSTypeParameter", }, - ], - "range": Array [ - 100, - 131, - ], - "type": "TSTypeParameterDeclaration", - }, + }, + ], + "range": Array [ + 0, + 82, + ], + "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, + "column": 1, "line": 4, }, "start": Object { @@ -42681,14 +42573,14 @@ Object { }, "range": Array [ 0, - 138, + 82, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 8, "line": 1, }, "start": Object { @@ -42698,28 +42590,10 @@ Object { }, "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, + 8, ], - "type": "Punctuator", - "value": "<", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { @@ -42728,193 +42602,175 @@ Object { "line": 1, }, "start": Object { - "column": 21, + "column": 9, "line": 1, }, }, "range": Array [ - 21, + 9, 22, ], "type": "Identifier", - "value": "A", + "value": "processEntity", }, Object { "loc": Object { "end": Object { - "column": 40, + "column": 23, "line": 1, }, "start": Object { - "column": 39, + "column": 22, "line": 1, }, }, "range": Array [ - 39, - 40, + 22, + 23, ], "type": "Punctuator", - "value": ">", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 41, + "column": 24, "line": 1, }, "start": Object { - "column": 40, + "column": 23, "line": 1, }, }, "range": Array [ - 40, - 41, + 23, + 24, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "e", }, Object { "loc": Object { "end": Object { - "column": 42, + "column": 25, "line": 1, }, "start": Object { - "column": 41, + "column": 24, "line": 1, }, }, "range": Array [ - 41, - 42, + 24, + 25, ], "type": "Punctuator", - "value": ")", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 43, + "column": 26, "line": 1, }, "start": Object { - "column": 42, + "column": 25, "line": 1, }, }, "range": Array [ - 42, - 43, + 25, + 26, ], "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", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 33, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 27, + "line": 1, }, }, "range": Array [ - 53, - 56, + 27, + 33, ], "type": "Identifier", - "value": "bar", + "value": "Entity", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 34, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 33, + "line": 1, }, }, "range": Array [ - 56, - 57, + 33, + 34, ], "type": "Punctuator", - "value": "<", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 36, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 35, + "line": 1, }, }, "range": Array [ - 68, - 69, + 35, + 36, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 18, "line": 2, }, "start": Object { - "column": 36, + "column": 4, "line": 2, }, }, "range": Array [ - 80, - 81, + 41, + 55, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "validateEntity", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 19, "line": 2, }, "start": Object { - "column": 37, + "column": 18, "line": 2, }, }, "range": Array [ - 81, - 82, + 55, + 56, ], "type": "Punctuator", "value": "(", @@ -42922,143 +42778,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 39, + "column": 20, "line": 2, }, "start": Object { - "column": 38, + "column": 19, "line": 2, }, }, "range": Array [ - 82, - 83, + 56, + 57, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "e", }, Object { "loc": Object { "end": Object { - "column": 41, + "column": 21, "line": 2, }, "start": Object { - "column": 40, + "column": 20, "line": 2, }, }, "range": Array [ - 84, - 85, + 57, + 58, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 43, + "column": 22, "line": 2, }, "start": Object { - "column": 42, + "column": 21, "line": 2, }, }, "range": Array [ - 86, - 87, + 58, + 59, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 7, "line": 3, }, "start": Object { - "column": 0, + "column": 4, "line": 3, }, }, "range": Array [ - 88, - 96, + 64, + 67, ], "type": "Keyword", - "value": "function", + "value": "let", }, 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, + "column": 8, "line": 3, }, }, "range": Array [ - 112, - 113, + 68, + 69, ], "type": "Identifier", - "value": "A", + "value": "s", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 11, "line": 3, }, "start": Object { - "column": 36, + "column": 10, "line": 3, }, }, "range": Array [ - 124, - 125, + 70, + 71, ], "type": "Punctuator", "value": "=", @@ -43066,107 +42886,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 41, + "column": 13, "line": 3, }, "start": Object { - "column": 38, + "column": 12, "line": 3, }, }, "range": Array [ - 126, - 129, + 72, + 73, ], "type": "Identifier", - "value": "Foo", + "value": "e", }, Object { "loc": Object { "end": Object { - "column": 43, + "column": 14, "line": 3, }, "start": Object { - "column": 42, + "column": 13, "line": 3, }, }, "range": Array [ - 130, - 131, + 73, + 74, ], "type": "Punctuator", - "value": ">", + "value": "!", }, Object { "loc": Object { "end": Object { - "column": 44, + "column": 15, "line": 3, }, "start": Object { - "column": 43, + "column": 14, "line": 3, }, }, "range": Array [ - 131, - 132, + 74, + 75, ], "type": "Punctuator", - "value": "(", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 45, + "column": 19, "line": 3, }, "start": Object { - "column": 44, + "column": 15, "line": 3, }, }, "range": Array [ - 132, - 133, + 75, + 79, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "name", }, Object { "loc": Object { "end": Object { - "column": 47, + "column": 20, "line": 3, }, "start": Object { - "column": 46, + "column": 19, "line": 3, }, }, "range": Array [ - 134, - 135, + 79, + 80, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 49, - "line": 3, + "column": 1, + "line": 4, }, "start": Object { - "column": 48, - "line": 3, + "column": 0, + "line": 4, }, }, "range": Array [ - 136, - 137, + 81, + 82, ], "type": "Punctuator", "value": "}", @@ -43176,230 +42996,194 @@ Object { } `; -exports[`typescript fixtures/basics/type-reference-comments.src 1`] = ` +exports[`typescript fixtures/basics/null-and-undefined-type-annotations.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 11, + ], + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 5, + "line": 1, }, }, - "name": "mBuffers", "range": Array [ - 26, - 34, + 5, + 11, ], - "type": "Identifier", + "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", + }, + ], + "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 { + "id": Object { "loc": Object { "end": Object { - "column": 51, + "column": 16, "line": 2, }, "start": Object { - "column": 2, + "column": 4, "line": 2, }, }, + "name": "y", "range": Array [ - 26, - 75, + 17, + 29, ], - "static": false, - "type": "ClassProperty", + "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 50, + "column": 16, "line": 2, }, "start": Object { - "column": 10, + "column": 5, "line": 2, }, }, "range": Array [ - 34, - 74, + 18, + 29, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 50, + "column": 16, "line": 2, }, "start": Object { - "column": 12, + "column": 7, "line": 2, }, }, "range": Array [ - 36, - 74, + 20, + 29, ], - "type": "TSTypeReference", - "typeName": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "name": "interop", - "range": Array [ - 36, - 43, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 36, - 53, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "name": "Reference", - "range": Array [ - 44, - 53, - ], - "type": "Identifier", - }, - "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", - }, + "type": "TSUndefinedKeyword", }, }, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 77, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, }, - "start": Object { - "column": 6, - "line": 1, + "init": null, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, }, + "range": Array [ + 17, + 29, + ], + "type": "VariableDeclarator", }, - "name": "AudioBufferList", - "range": Array [ - 6, - 21, - ], - "type": "Identifier", - }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 17, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, "range": Array [ - 0, - 77, + 13, + 30, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 4, + "column": 17, + "line": 2, }, "start": Object { "column": 0, @@ -43408,14 +43192,14 @@ Object { }, "range": Array [ 0, - 78, + 30, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -43425,580 +43209,604 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 5, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 21, + 4, + 5, ], "type": "Identifier", - "value": "AudioBufferList", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 6, "line": 1, }, "start": Object { - "column": 22, + "column": 5, "line": 1, }, }, "range": Array [ - 22, - 23, + 5, + 6, ], "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", + "value": ":", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 2, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 34, - 35, + 7, + 11, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 36, - 43, + 11, + 12, ], - "type": "Identifier", - "value": "interop", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 3, "line": 2, }, "start": Object { - "column": 19, + "column": 0, "line": 2, }, }, "range": Array [ - 43, - 44, + 13, + 16, ], - "type": "Punctuator", - "value": ".", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 5, "line": 2, }, "start": Object { - "column": 20, + "column": 4, "line": 2, }, }, "range": Array [ - 44, - 53, + 17, + 18, ], "type": "Identifier", - "value": "Reference", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 6, "line": 2, }, "start": Object { - "column": 29, + "column": 5, "line": 2, }, }, "range": Array [ - 53, - 54, + 18, + 19, ], "type": "Punctuator", - "value": "<", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 33, + "column": 16, "line": 2, }, "start": Object { - "column": 30, + "column": 7, "line": 2, }, }, "range": Array [ - 54, - 57, + 20, + 29, ], "type": "Identifier", - "value": "any", + "value": "undefined", }, Object { "loc": Object { "end": Object { - "column": 50, + "column": 17, "line": 2, }, "start": Object { - "column": 49, + "column": 16, "line": 2, }, }, "range": Array [ - 73, - 74, + 29, + 30, ], "type": "Punctuator", - "value": ">", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/object-with-escaped-properties.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 2, - }, - "start": Object { - "column": 50, - "line": 2, + "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, + "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", }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": ";", - }, - Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { "column": 0, - "line": 3, + "line": 1, }, }, "range": Array [ - 76, - 77, + 0, + 17, ], - "type": "Punctuator", - "value": "}", + "type": "ExpressionStatement", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/typed-this.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ + "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": 17, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 1, - "line": 2, + "column": 3, + "line": 3, }, }, - "name": "addClickListener", "range": Array [ - 23, - 39, + 22, + 26, ], - "type": "Identifier", + "raw": "'__'", + "type": "Literal", + "value": "__", }, + "kind": "init", "loc": Object { "end": Object { - "column": 65, - "line": 2, + "column": 12, + "line": 3, }, "start": Object { - "column": 1, - "line": 2, + "column": 3, + "line": 3, }, }, - "optional": false, - "params": Array [ - Object { + "method": true, + "range": Array [ + 22, + 31, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 57, - "line": 2, + "column": 12, + "line": 3, }, "start": Object { - "column": 18, - "line": 2, + "column": 10, + "line": 3, }, }, - "name": "onclick", "range": Array [ - 40, - 79, + 29, + 31, ], - "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, - }, - }, - "parameters": Array [ - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "name": "this", - "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 { - "loc": Object { - "end": Object { - "column": 48, - "line": 2, - }, - "start": Object { - "column": 40, - "line": 2, - }, - }, - "name": "e", - "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 { - "loc": Object { - "end": Object { - "column": 48, - "line": 2, - }, - "start": Object { - "column": 43, - "line": 2, - }, - }, - "name": "Event", - "range": Array [ - 65, - 70, - ], - "type": "Identifier", - }, - }, - }, - }, - ], - "range": Array [ - 49, - 79, - ], - "type": "TSFunctionType", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 51, - "line": 2, - }, - }, - "range": Array [ - 73, - 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", - }, - }, - "typeParameters": null, - }, + "type": "BlockStatement", + }, + "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, + ], + "type": "FunctionExpression", + }, + }, + ], + "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 { + "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, "range": Array [ - 23, - 87, + 40, + 52, ], - "static": false, - "type": "TSMethodSignature", - "typeAnnotation": Object { + "shorthand": false, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 64, - "line": 2, + "column": 15, + "line": 5, }, "start": Object { - "column": 58, - "line": 2, + "column": 11, + "line": 5, }, }, "range": Array [ - 80, - 86, + 48, + 52, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 2, - }, - "start": Object { - "column": 60, - "line": 2, - }, + "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 { + "body": Object { + "body": Array [ + Object { + "computed": 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, + }, + }, + "range": Array [ + 68, + 79, + ], + "static": false, + "type": "ClassProperty", + "value": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 7, + }, + "start": Object { + "column": 17, + "line": 7, }, - "range": Array [ - 82, - 86, - ], - "type": "TSVoidKeyword", }, + "range": Array [ + 75, + 79, + ], + "raw": "null", + "type": "Literal", + "value": null, }, }, ], "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 23, + "line": 7, }, "start": Object { - "column": 20, - "line": 1, + "column": 8, + "line": 7, }, }, "range": Array [ - 20, - 89, + 66, + 81, ], - "type": "TSInterfaceBody", + "type": "ClassBody", }, - "heritage": Array [], "id": Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 7, + "line": 7, }, "start": Object { - "column": 10, - "line": 1, + "column": 6, + "line": 7, }, }, - "name": "UIElement", + "name": "X", "range": Array [ - 10, - 19, + 64, + 65, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 23, + "line": 7, }, "start": Object { "column": 0, - "line": 1, + "line": 7, }, }, "range": Array [ - 0, - 89, + 58, + 81, ], - "type": "TSInterfaceDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 8, }, "start": Object { "column": 0, @@ -44007,14 +43815,14 @@ Object { }, "range": Array [ 0, - 90, + 82, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 1, "line": 1, }, "start": Object { @@ -44024,277 +43832,295 @@ Object { }, "range": Array [ 0, - 9, + 1, ], - "type": "Keyword", - "value": "interface", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 2, "line": 1, }, "start": Object { - "column": 10, + "column": 1, "line": 1, }, }, "range": Array [ - 10, - 19, + 1, + 2, ], - "type": "Identifier", - "value": "UIElement", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 7, "line": 1, }, "start": Object { - "column": 20, + "column": 3, "line": 1, }, }, "range": Array [ - 20, - 21, + 3, + 7, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "'__'", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 1, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 23, - 39, + 7, + 8, ], - "type": "Identifier", - "value": "addClickListener", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 39, - 40, + 9, + 13, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 40, - 47, + 14, + 15, ], - "type": "Identifier", - "value": "onclick", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 47, - 48, + 15, + 16, ], "type": "Punctuator", - "value": ":", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 27, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 49, - 50, + 16, + 17, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { - "column": 28, - "line": 2, + "column": 0, + "line": 3, }, }, "range": Array [ - 50, - 54, + 19, + 20, ], - "type": "Keyword", - "value": "this", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 2, + "line": 3, }, "start": Object { - "column": 32, - "line": 2, + "column": 1, + "line": 3, }, }, "range": Array [ - 54, - 55, + 20, + 21, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 34, - "line": 2, + "column": 3, + "line": 3, }, }, "range": Array [ - 56, - 60, + 22, + 26, ], - "type": "Keyword", - "value": "void", + "type": "String", + "value": "'__'", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 2, + "column": 8, + "line": 3, }, "start": Object { - "column": 38, - "line": 2, + "column": 7, + "line": 3, }, }, "range": Array [ - 60, - 61, + 26, + 27, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 9, + "line": 3, }, "start": Object { - "column": 40, - "line": 2, + "column": 8, + "line": 3, }, }, "range": Array [ - 62, - 63, + 27, + 28, ], - "type": "Identifier", - "value": "e", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 2, + "column": 11, + "line": 3, }, "start": Object { - "column": 41, - "line": 2, + "column": 10, + "line": 3, }, }, "range": Array [ - 63, - 64, + 29, + 30, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 48, - "line": 2, + "column": 12, + "line": 3, }, "start": Object { - "column": 43, - "line": 2, + "column": 11, + "line": 3, }, }, "range": Array [ - 65, - 70, + 30, + 31, ], - "type": "Identifier", - "value": "Event", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 49, - "line": 2, + "column": 14, + "line": 3, }, "start": Object { - "column": 48, - "line": 2, + "column": 13, + "line": 3, }, }, "range": Array [ - 70, - 71, + 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": ")", @@ -44302,435 +44128,521 @@ Object { Object { "loc": Object { "end": Object { - "column": 52, - "line": 2, + "column": 16, + "line": 3, }, "start": Object { - "column": 50, - "line": 2, + "column": 15, + "line": 3, }, }, "range": Array [ - 72, - 74, + 34, + 35, ], "type": "Punctuator", - "value": "=>", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 57, - "line": 2, + "column": 1, + "line": 5, }, "start": Object { - "column": 53, - "line": 2, + "column": 0, + "line": 5, }, }, "range": Array [ - 75, - 79, + 37, + 38, ], - "type": "Keyword", - "value": "void", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 58, - "line": 2, + "column": 2, + "line": 5, }, "start": Object { - "column": 57, - "line": 2, + "column": 1, + "line": 5, }, }, "range": Array [ - 79, - 80, + 38, + 39, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 59, - "line": 2, + "column": 4, + "line": 5, }, "start": Object { - "column": 58, - "line": 2, + "column": 3, + "line": 5, }, }, "range": Array [ - 80, - 81, + 40, + 41, ], "type": "Punctuator", - "value": ":", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 64, - "line": 2, + "column": 8, + "line": 5, }, "start": Object { - "column": 60, - "line": 2, + "column": 4, + "line": 5, }, }, "range": Array [ - 82, - 86, + 41, + 45, ], - "type": "Keyword", - "value": "void", + "type": "String", + "value": "'__'", }, Object { "loc": Object { "end": Object { - "column": 65, - "line": 2, + "column": 9, + "line": 5, }, "start": Object { - "column": 64, - "line": 2, + "column": 8, + "line": 5, }, }, "range": Array [ - 86, - 87, + 45, + 46, ], "type": "Punctuator", - "value": ";", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 10, + "line": 5, }, "start": Object { - "column": 0, - "line": 3, + "column": 9, + "line": 5, }, }, "range": Array [ - 88, - 89, + 46, + 47, ], "type": "Punctuator", - "value": "}", + "value": ":", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/unique-symbol.src 1`] = ` -Object { - "body": Array [ Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 11, + "line": 5, }, - "name": "A", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", }, + "range": Array [ + 48, + 52, + ], + "type": "Keyword", + "value": "null", + }, + Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 17, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 16, + "line": 5, }, }, "range": Array [ - 0, - 23, + 53, + 54, ], - "type": "TSTypeAliasDeclaration", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 5, }, - "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", + "start": Object { + "column": 17, + "line": 5, }, }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": ")", }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 5, + }, + "start": Object { + "column": 18, + "line": 5, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": ";", }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 5, + "line": 7, }, "start": Object { "column": 0, - "line": 1, + "line": 7, }, }, "range": Array [ - 0, - 4, + 58, + 63, ], - "type": "Identifier", - "value": "type", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 7, + "line": 7, }, "start": Object { - "column": 5, - "line": 1, + "column": 6, + "line": 7, }, }, "range": Array [ - 5, - 6, + 64, + 65, ], "type": "Identifier", - "value": "A", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 9, + "line": 7, }, "start": Object { - "column": 7, - "line": 1, + "column": 8, + "line": 7, }, }, "range": Array [ - 7, - 8, + 66, + 67, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 14, + "line": 7, }, "start": Object { - "column": 9, - "line": 1, + "column": 10, + "line": 7, }, }, "range": Array [ - 9, - 15, + 68, + 72, ], - "type": "Identifier", - "value": "unique", + "type": "String", + "value": "'__'", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 16, + "line": 7, }, "start": Object { - "column": 16, - "line": 1, + "column": 15, + "line": 7, }, }, "range": Array [ - 16, - 22, + 73, + 74, ], - "type": "Identifier", - "value": "symbol", + "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": 1, + "line": 7, }, "start": Object { "column": 22, - "line": 1, + "line": 7, }, }, "range": Array [ - 22, - 23, + 80, + 81, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/unknown-type-annotation.src 1`] = ` +exports[`typescript fixtures/basics/symbol-type-param.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ + "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", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "test", + "range": Array [ + 9, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 16, + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "abc", + "range": Array [ + 14, + 38, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, "line": 1, }, "start": Object { - "column": 4, + "column": 17, "line": 1, }, }, - "name": "foo", "range": Array [ - 4, - 16, + 17, + 38, ], - "type": "Identifier", + "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 16, + "column": 38, "line": 1, }, "start": Object { - "column": 7, + "column": 19, "line": 1, }, }, "range": Array [ - 7, - 16, + 19, + 38, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 16, + "column": 22, "line": 1, }, "start": Object { - "column": 9, + "column": 19, "line": 1, }, }, + "name": "Map", "range": Array [ - 9, - 16, + 19, + 22, ], - "type": "TSUnknownKeyword", + "type": "Identifier", + }, + "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", }, }, }, - "init": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 16, - ], - "type": "VariableDeclarator", }, ], - "kind": "let", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, "range": Array [ 0, - 17, + 42, ], - "type": "VariableDeclaration", + "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 42, + "line": 1, }, "start": Object { "column": 0, @@ -44739,14 +44651,14 @@ Object { }, "range": Array [ 0, - 18, + 42, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 8, "line": 1, }, "start": Object { @@ -44756,896 +44668,947 @@ Object { }, "range": Array [ 0, - 3, + 8, ], "type": "Keyword", - "value": "let", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 13, "line": 1, }, "start": Object { - "column": 4, + "column": 9, "line": 1, }, }, "range": Array [ - 4, - 7, + 9, + 13, ], "type": "Identifier", - "value": "foo", + "value": "test", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 14, "line": 1, }, "start": Object { - "column": 7, + "column": 13, "line": 1, }, }, "range": Array [ - 7, - 8, + 13, + 14, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 17, "line": 1, }, "start": Object { - "column": 9, + "column": 14, "line": 1, }, }, "range": Array [ - 9, - 16, + 14, + 17, ], "type": "Identifier", - "value": "unknown", + "value": "abc", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 18, "line": 1, }, "start": Object { - "column": 16, + "column": 17, "line": 1, }, }, "range": Array [ - 16, 17, + 18, ], "type": "Punctuator", - "value": ";", + "value": ":", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/var-with-definite-assignment.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "definite": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "x", - "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", - }, - ], - "kind": "const", "loc": Object { "end": Object { - "column": 17, + "column": 22, "line": 1, }, "start": Object { - "column": 0, + "column": 19, "line": 1, }, }, "range": Array [ - 0, - 17, + 19, + 22, ], - "type": "VariableDeclaration", + "type": "Identifier", + "value": "Map", }, Object { - "declarations": Array [ - Object { - "definite": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "y", - "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", - }, - ], - "kind": "var", "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 18, - 33, + 22, + 23, ], - "type": "VariableDeclaration", + "type": "Punctuator", + "value": "<", }, Object { - "declarations": Array [ - Object { - "definite": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "z", - "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", - }, - ], - "kind": "let", "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 29, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 23, + "line": 1, }, }, "range": Array [ - 34, - 49, + 23, + 29, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "symbol", }, - }, - "range": Array [ - 0, - 50, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 30, "line": 1, }, "start": Object { - "column": 0, + "column": 29, "line": 1, }, }, "range": Array [ - 0, - 5, + 29, + 30, ], - "type": "Keyword", - "value": "const", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 37, "line": 1, }, "start": Object { - "column": 6, + "column": 31, "line": 1, }, }, "range": Array [ - 6, - 7, + 31, + 37, ], "type": "Identifier", - "value": "x", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 38, "line": 1, }, "start": Object { - "column": 7, + "column": 37, "line": 1, }, }, "range": Array [ - 7, - 8, + 37, + 38, ], "type": "Punctuator", - "value": "!", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 39, "line": 1, }, "start": Object { - "column": 8, + "column": 38, "line": 1, }, }, "range": Array [ - 8, - 9, + 38, + 39, ], "type": "Punctuator", - "value": ":", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 41, "line": 1, }, "start": Object { - "column": 10, + "column": 40, "line": 1, }, }, "range": Array [ - 10, - 16, + 40, + 41, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 42, "line": 1, }, "start": Object { - "column": 16, + "column": 41, "line": 1, }, }, "range": Array [ - 16, - 17, + 41, + 42, ], "type": "Punctuator", - "value": ";", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/type-alias-declaration.src 1`] = ` +Object { + "body": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Result", + "range": Array [ + 5, + 11, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 3, - "line": 2, + "column": 37, + "line": 1, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 18, - 21, + 0, + 37, ], - "type": "Keyword", - "value": "var", + "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 { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "Success", + "range": Array [ + 17, + 24, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + }, + ], + "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 { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "name": "Failure", + "range": Array [ + 30, + 37, + ], + "type": "Identifier", + }, + }, + ], + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 12, + 13, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 11, + 14, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "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": 5, - "line": 2, + "column": 4, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 22, - 23, + 0, + 4, ], "type": "Identifier", - "value": "y", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { "column": 5, - "line": 2, + "line": 1, }, }, "range": Array [ - 23, - 24, + 5, + 11, ], - "type": "Punctuator", - "value": "!", + "type": "Identifier", + "value": "Result", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 6, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 24, - 25, + 11, + 12, ], "type": "Punctuator", - "value": ":", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 26, - 32, + 12, + 13, ], "type": "Identifier", - "value": "number", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 32, - 33, + 13, + 14, ], "type": "Punctuator", - "value": ";", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 3, + "column": 16, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 15, + "line": 1, }, }, "range": Array [ - 34, - 37, + 15, + 16, ], - "type": "Keyword", - "value": "let", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 24, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 17, + "line": 1, }, }, "range": Array [ - 38, - 39, + 17, + 24, ], "type": "Identifier", - "value": "z", + "value": "Success", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { - "column": 5, - "line": 3, + "column": 24, + "line": 1, }, }, "range": Array [ - 39, - 40, + 24, + 25, ], "type": "Punctuator", - "value": "!", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 26, + "line": 1, }, "start": Object { - "column": 6, - "line": 3, + "column": 25, + "line": 1, }, }, "range": Array [ - 40, - 41, + 25, + 26, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 27, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 26, + "line": 1, }, }, "range": Array [ - 42, - 48, + 26, + 27, ], - "type": "Identifier", - "value": "object", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 29, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 28, + "line": 1, }, }, "range": Array [ - 48, - 49, + 28, + 29, ], "type": "Punctuator", - "value": ";", + "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", } `; -exports[`typescript fixtures/basics/var-with-dotted-type.src 1`] = ` +exports[`typescript fixtures/basics/type-alias-declaration-with-constrained-type-parameter.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Result", + "range": Array [ + 5, + 11, + ], + "type": "Identifier", + }, + "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": 14, + "column": 38, "line": 1, }, "start": Object { - "column": 4, + "column": 28, "line": 1, }, }, - "name": "foo", "range": Array [ - 4, - 14, + 28, + 38, ], - "type": "Identifier", - "typeAnnotation": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 14, + "column": 35, "line": 1, }, "start": Object { - "column": 7, + "column": 28, "line": 1, }, }, + "name": "Success", "range": Array [ - 7, - 14, + 28, + 35, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, }, - "range": Array [ - 9, - 14, - ], - "type": "TSTypeReference", - "typeName": Object { - "left": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "A", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 12, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "B", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - "type": "TSQualifiedName", - }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 14, + "column": 37, "line": 1, }, "start": Object { - "column": 9, + "column": 36, "line": 1, }, }, "range": Array [ - 9, - 14, + 36, + 37, ], - "right": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 14, + "column": 37, "line": 1, }, "start": Object { - "column": 13, + "column": 36, "line": 1, }, }, - "name": "C", + "name": "T", "range": Array [ - 13, - 14, + 36, + 37, ], "type": "Identifier", }, - "type": "TSQualifiedName", }, - }, + ], + "range": Array [ + 35, + 38, + ], + "type": "TSTypeParameterInstantiation", }, }, - "init": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, }, - "start": Object { - "column": 4, - "line": 1, + "range": Array [ + 41, + 48, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "name": "Failure", + "range": Array [ + 41, + 48, + ], + "type": "Identifier", }, }, - "range": Array [ - 4, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + ], + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, }, + "params": Array [ + Object { + "constraint": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "members": Array [], + "range": Array [ + 22, + 24, + ], + "type": "TSTypeLiteral", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 12, + 24, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 11, + 25, + ], + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 15, - ], - "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 48, + "line": 1, }, "start": Object { "column": 0, @@ -45654,14 +45617,14 @@ Object { }, "range": Array [ 0, - 16, + 48, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 4, "line": 1, }, "start": Object { @@ -45671,384 +45634,436 @@ Object { }, "range": Array [ 0, - 3, + 4, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 11, "line": 1, }, "start": Object { - "column": 4, + "column": 5, "line": 1, }, }, "range": Array [ - 4, - 7, + 5, + 11, ], "type": "Identifier", - "value": "foo", + "value": "Result", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 12, "line": 1, }, "start": Object { - "column": 7, + "column": 11, "line": 1, }, }, "range": Array [ - 7, - 8, + 11, + 12, ], "type": "Punctuator", - "value": ":", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 13, "line": 1, }, "start": Object { - "column": 9, + "column": 12, "line": 1, }, }, "range": Array [ - 9, - 10, + 12, + 13, ], "type": "Identifier", - "value": "A", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 21, "line": 1, }, "start": Object { - "column": 10, + "column": 14, "line": 1, }, }, "range": Array [ - 10, - 11, + 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": ".", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 24, "line": 1, }, "start": Object { - "column": 11, + "column": 23, "line": 1, }, }, "range": Array [ - 11, - 12, + 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": "B", + "value": "Success", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 36, "line": 1, }, "start": Object { - "column": 12, + "column": 35, "line": 1, }, }, "range": Array [ - 12, - 13, + 35, + 36, ], "type": "Punctuator", - "value": ".", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 37, "line": 1, }, "start": Object { - "column": 13, + "column": 36, "line": 1, }, }, "range": Array [ - 13, - 14, + 36, + 37, ], "type": "Identifier", - "value": "C", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 38, "line": 1, }, "start": Object { - "column": 14, + "column": 37, "line": 1, }, }, "range": Array [ - 14, - 15, + 37, + 38, ], "type": "Punctuator", - "value": ";", + "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", } `; -exports[`typescript fixtures/basics/var-with-type.src 1`] = ` +exports[`typescript fixtures/basics/type-alias-object-without-annotation.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "name", - "range": Array [ - 4, - 15, - ], - "type": "Identifier", - "typeAnnotation": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 30, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "members": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { "column": 15, "line": 1, }, "start": Object { - "column": 8, + "column": 12, "line": 1, }, }, + "name": "bar", "range": Array [ - 8, + 12, 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", - }, + "type": "Identifier", }, - }, - "init": Object { "loc": Object { "end": Object { - "column": 28, + "column": 24, "line": 1, }, "start": Object { - "column": 18, + "column": 12, "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", - }, - ], - "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 { - "id": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 34, - 45, + 12, + 24, ], - "type": "Identifier", + "type": "TSPropertySignature", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 37, - 45, + 15, + 23, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 39, - 45, + 17, + 23, ], "type": "TSStringKeyword", }, }, }, - "init": Object { + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 25, + 28, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 48, - 53, + 25, + 28, ], - "raw": "\\"Bar\\"", - "type": "Literal", - "value": "Bar", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "type": "TSPropertySignature", }, - "range": Array [ - 34, - 53, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, + ], + "range": Array [ + 11, + 29, + ], + "type": "TSTypeLiteral", }, - "range": Array [ - 30, - 54, - ], - "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 2, }, "start": Object { "column": 0, @@ -46057,14 +46072,14 @@ Object { }, "range": Array [ 0, - 55, + 31, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 4, "line": 1, }, "start": Object { @@ -46074,51 +46089,33 @@ Object { }, "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", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 8, "line": 1, }, "start": Object { - "column": 8, + "column": 5, "line": 1, }, }, "range": Array [ + 5, 8, - 9, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 10, "line": 1, }, "start": Object { @@ -46128,187 +46125,151 @@ Object { }, "range": Array [ 9, - 15, + 10, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 12, "line": 1, }, "start": Object { - "column": 16, + "column": 11, "line": 1, }, }, "range": Array [ - 16, - 17, + 11, + 12, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 15, "line": 1, }, "start": Object { - "column": 18, + "column": 12, "line": 1, }, }, "range": Array [ - 18, - 28, + 12, + 15, ], - "type": "String", - "value": "\\"Nicholas\\"", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 16, "line": 1, }, "start": Object { - "column": 28, + "column": 15, "line": 1, }, }, "range": Array [ - 28, - 29, + 15, + 16, ], "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", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 34, - 37, + 17, + 23, ], "type": "Identifier", - "value": "foo", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 37, - 38, + 23, + 24, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 39, - 45, + 25, + 28, ], "type": "Identifier", - "value": "string", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 46, - 47, + 28, + 29, ], "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\\"", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 29, + "line": 1, }, }, "range": Array [ - 53, - 54, + 29, + 30, ], "type": "Punctuator", "value": ";", @@ -46318,104 +46279,302 @@ Object { } `; -exports[`typescript fixtures/basics/variable-declaration-type-annotation-spacing.src 1`] = ` +exports[`typescript fixtures/basics/type-guard.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "left": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "name": "x", + "range": Array [ + 59, + 60, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "operator": "typeof", + "prefix": true, + "range": Array [ + 52, + 60, + ], + "type": "UnaryExpression", }, - }, - "name": "x", - "range": Array [ - 4, - 21, - ], - "type": "Identifier", - "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 32, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 11, + "line": 2, }, }, + "operator": "===", "range": Array [ - 8, - 21, + 52, + 73, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "right": Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 32, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 24, + "line": 2, }, }, "range": Array [ - 15, - 21, + 65, + 73, ], - "type": "TSStringKeyword", + "raw": "'string'", + "type": "Literal", + "value": "string", }, + "type": "BinaryExpression", }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, + "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 [ - 4, - 21, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "let", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + }, + "range": Array [ + 39, + 75, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "isString", + "range": Array [ + 9, + 17, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "x", + "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, - 22, + 75, ], - "type": "VariableDeclaration", + "returnType": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "parameterName": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + }, + "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", }, ], "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -46424,14 +46583,14 @@ Object { }, "range": Array [ 0, - 22, + 75, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 8, "line": 1, }, "start": Object { @@ -46441,249 +46600,205 @@ Object { }, "range": Array [ 0, - 3, + 8, ], "type": "Keyword", - "value": "let", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 17, "line": 1, }, "start": Object { - "column": 4, + "column": 9, "line": 1, }, }, "range": Array [ - 4, - 5, + 9, + 17, ], "type": "Identifier", - "value": "x", + "value": "isString", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 18, "line": 1, }, "start": Object { - "column": 8, + "column": 17, "line": 1, }, }, "range": Array [ - 8, - 9, + 17, + 18, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 19, "line": 1, }, "start": Object { - "column": 15, + "column": 18, "line": 1, }, }, "range": Array [ - 15, - 21, + 18, + 19, ], "type": "Identifier", - "value": "string", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 20, "line": 1, }, "start": Object { - "column": 21, + "column": 19, "line": 1, }, }, "range": Array [ - 21, - 22, + 19, + 20, ], "type": "Punctuator", - "value": ";", + "value": ":", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/declare/abstract-class.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 27, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, }, - "range": Array [ - 27, - 31, - ], - "type": "ClassBody", - }, - "declare": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, + "start": Object { + "column": 21, + "line": 1, }, - "name": "Foo", - "range": Array [ - 23, - 26, - ], - "type": "Identifier", }, + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + "value": "any", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { - "column": 0, + "column": 24, "line": 1, }, }, "range": Array [ - 0, - 31, + 24, + 25, ], - "superClass": null, - "type": "TSAbstractClassDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ")", }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 26, "line": 1, }, "start": Object { - "column": 0, + "column": 25, "line": 1, }, }, "range": Array [ - 0, - 7, + 25, + 26, ], - "type": "Identifier", - "value": "declare", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 28, "line": 1, }, "start": Object { - "column": 8, + "column": 27, "line": 1, }, }, "range": Array [ - 8, - 16, + 27, + 28, ], "type": "Identifier", - "value": "abstract", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 31, "line": 1, }, "start": Object { - "column": 17, + "column": 29, "line": 1, }, }, "range": Array [ - 17, - 22, + 29, + 31, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "is", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 38, "line": 1, }, "start": Object { - "column": 23, + "column": 32, "line": 1, }, }, "range": Array [ - 23, - 26, + 32, + 38, ], "type": "Identifier", - "value": "Foo", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 40, "line": 1, }, "start": Object { - "column": 27, + "column": 39, "line": 1, }, }, "range": Array [ - 27, - 28, + 39, + 40, ], "type": "Punctuator", "value": "{", @@ -46691,172 +46806,92 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 10, + "line": 2, }, "start": Object { - "column": 0, - "line": 3, + "column": 4, + "line": 2, }, }, "range": Array [ - 30, - 31, + 45, + 51, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "return", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/declare/class.src 1`] = ` -Object { - "body": Array [ Object { - "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, - "id": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 17, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 0, - 22, + 52, + 58, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Keyword", + "value": "typeof", }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 18, + "line": 2, }, }, "range": Array [ - 0, - 7, + 59, + 60, ], "type": "Identifier", - "value": "declare", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 20, + "line": 2, }, }, "range": Array [ - 8, - 13, + 61, + 64, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "===", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 32, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 24, + "line": 2, }, }, "range": Array [ - 14, - 17, + 65, + 73, ], - "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": "String", + "value": "'string'", }, Object { "loc": Object { @@ -46870,8 +46905,8 @@ Object { }, }, "range": Array [ - 21, - 22, + 74, + 75, ], "type": "Punctuator", "value": "}", @@ -46881,122 +46916,344 @@ Object { } `; -exports[`typescript fixtures/declare/enum.src 1`] = ` +exports[`typescript fixtures/basics/type-parameters-comments.src 1`] = ` Object { "body": Array [ Object { - "declare": true, - "id": Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 16, + "column": 42, "line": 1, }, "start": Object { - "column": 13, + "column": 0, "line": 1, }, }, - "name": "Foo", "range": Array [ - 13, - 16, + 0, + 42, ], - "type": "Identifier", + "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 { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 3, + 40, + ], + "type": "TSTypeParameterInstantiation", + }, }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 43, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, - "members": Array [ - Object { - "id": Object { + "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", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 53, + 56, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 43, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 44, + 87, + ], + "type": "FunctionDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 7, + "column": 25, "line": 2, }, "start": Object { - "column": 4, + "column": 24, "line": 2, }, }, - "name": "Bar", + "name": "A", "range": Array [ - 23, - 26, + 68, + 69, ], - "type": "Identifier", + "type": "TSTypeParameter", }, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, + ], + "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 [ - 23, - 26, - ], - "type": "TSEnumMember", }, - Object { - "id": Object { + "range": Array [ + 134, + 137, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "baz", + "range": Array [ + 97, + 100, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "params": Array [], + "range": Array [ + 88, + 137, + ], + "type": "FunctionDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "params": Array [ + Object { + "default": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 3, + }, + "start": Object { + "column": 38, + "line": 3, + }, + }, + "range": Array [ + 126, + 129, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 3, + }, + "start": Object { + "column": 38, + "line": 3, + }, + }, + "name": "Foo", + "range": Array [ + 126, + 129, + ], + "type": "Identifier", + }, + }, "loc": Object { "end": Object { - "column": 7, + "column": 41, "line": 3, }, "start": Object { - "column": 4, + "column": 24, "line": 3, }, }, - "name": "Baz", + "name": "A", "range": Array [ - 32, - 35, + 112, + 129, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, + "type": "TSTypeParameter", }, - "range": Array [ - 32, - 35, - ], - "type": "TSEnumMember", - }, - ], - "range": Array [ - 0, - 37, - ], - "type": "TSEnumDeclaration", + ], + "range": Array [ + 100, + 131, + ], + "type": "TSTypeParameterDeclaration", + }, }, ], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 4, }, "start": Object { "column": 0, @@ -47005,14 +47262,14 @@ Object { }, "range": Array [ 0, - 38, + 138, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 3, "line": 1, }, "start": Object { @@ -47022,304 +47279,223 @@ Object { }, "range": Array [ 0, - 7, + 3, ], "type": "Identifier", - "value": "declare", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 4, "line": 1, }, "start": Object { - "column": 8, + "column": 3, "line": 1, }, }, "range": Array [ - 8, - 12, + 3, + 4, ], - "type": "Keyword", - "value": "enum", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 22, "line": 1, }, "start": Object { - "column": 13, + "column": 21, "line": 1, }, }, "range": Array [ - 13, - 16, + 21, + 22, ], "type": "Identifier", - "value": "Foo", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 40, "line": 1, }, "start": Object { - "column": 17, + "column": 39, "line": 1, }, }, "range": Array [ - 17, - 18, + 39, + 40, ], "type": "Punctuator", - "value": "{", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 41, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 40, + "line": 1, }, }, "range": Array [ - 23, - 26, + 40, + 41, ], - "type": "Identifier", - "value": "Bar", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 42, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 41, + "line": 1, }, }, "range": Array [ - 26, - 27, + 41, + 42, ], "type": "Punctuator", - "value": ",", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 43, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 42, + "line": 1, }, }, "range": Array [ - 32, - 35, + 42, + 43, ], - "type": "Identifier", - "value": "Baz", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 8, + "line": 2, }, "start": Object { "column": 0, - "line": 4, + "line": 2, }, }, "range": Array [ - 36, - 37, + 44, + 52, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "function", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/declare/function.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "declare": true, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 9, + "line": 2, }, }, - "params": Array [], "range": Array [ - 0, - 28, + 53, + 56, ], - "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", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "bar", }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 12, + "line": 2, }, }, "range": Array [ - 0, - 7, + 56, + 57, ], - "type": "Identifier", - "value": "declare", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 24, + "line": 2, }, }, "range": Array [ - 8, - 16, + 68, + 69, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 37, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 36, + "line": 2, }, }, "range": Array [ - 17, - 20, + 80, + 81, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 38, + "line": 2, }, "start": Object { - "column": 20, - "line": 1, + "column": 37, + "line": 2, }, }, "range": Array [ - 20, - 21, + 81, + 82, ], "type": "Punctuator", "value": "(", @@ -47327,17 +47503,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 39, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 38, + "line": 2, }, }, "range": Array [ - 21, - 22, + 82, + 83, ], "type": "Punctuator", "value": ")", @@ -47345,356 +47521,215 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 41, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 40, + "line": 2, }, }, "range": Array [ - 22, - 23, + 84, + 85, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 43, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 42, + "line": 2, }, }, "range": Array [ - 24, - 28, + 86, + 87, ], - "type": "Keyword", - "value": "void", + "type": "Punctuator", + "value": "}", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/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, - "heritage": Array [], - "id": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 1, + "column": 8, "line": 3, }, "start": Object { "column": 0, - "line": 1, + "line": 3, }, }, "range": Array [ - 0, - 26, + 88, + 96, ], - "type": "TSInterfaceDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Keyword", + "value": "function", }, - }, - "range": Array [ - 0, - 27, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 12, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 9, + "line": 3, }, }, "range": Array [ - 0, - 7, + 97, + 100, ], "type": "Identifier", - "value": "declare", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 13, + "line": 3, }, "start": Object { - "column": 8, - "line": 1, + "column": 12, + "line": 3, }, }, "range": Array [ - 8, - 17, + 100, + 101, ], - "type": "Keyword", - "value": "interface", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 25, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 24, + "line": 3, }, }, "range": Array [ - 18, - 21, + 112, + 113, ], "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": "{", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 37, "line": 3, }, "start": Object { - "column": 0, + "column": 36, "line": 3, }, }, "range": Array [ - 25, - 26, + 124, + 125, ], "type": "Punctuator", - "value": "}", + "value": "=", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/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, - "id": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 1, + "column": 41, "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 38, + "line": 3, }, }, "range": Array [ - 0, - 23, + 126, + 129, ], - "type": "TSModuleDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "Foo", }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 43, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 42, + "line": 3, }, }, "range": Array [ - 0, - 7, + 130, + 131, ], - "type": "Identifier", - "value": "declare", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 44, + "line": 3, }, "start": Object { - "column": 8, - "line": 1, + "column": 43, + "line": 3, }, }, "range": Array [ - 8, - 14, + 131, + 132, ], - "type": "Identifier", - "value": "module", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 45, + "line": 3, }, "start": Object { - "column": 15, - "line": 1, + "column": 44, + "line": 3, }, }, "range": Array [ - 15, - 18, + 132, + 133, ], - "type": "Identifier", - "value": "Foo", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 47, + "line": 3, }, "start": Object { - "column": 19, - "line": 1, + "column": 46, + "line": 3, }, }, "range": Array [ - 19, - 20, + 134, + 135, ], "type": "Punctuator", "value": "{", @@ -47702,17 +47737,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, + "column": 49, "line": 3, }, "start": Object { - "column": 0, + "column": 48, "line": 3, }, }, "range": Array [ - 22, - 23, + 136, + 137, ], "type": "Punctuator", "value": "}", @@ -47722,84 +47757,246 @@ Object { } `; -exports[`typescript fixtures/declare/namespace.src 1`] = ` +exports[`typescript fixtures/basics/type-reference-comments.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, - "id": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 26, - ], - "type": "TSModuleDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "mBuffers", + "range": Array [ + 26, + 34, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 51, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 26, + 75, + ], + "static": false, + "type": "ClassProperty", + "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 { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "name": "interop", + "range": Array [ + 36, + 43, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 36, + 53, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "name": "Reference", + "range": Array [ + 44, + 53, + ], + "type": "Identifier", + }, + "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", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "AudioBufferList", + "range": Array [ + 6, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 77, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, }, "range": Array [ 0, - 27, + 78, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -47809,64 +48006,208 @@ Object { }, "range": Array [ 0, - 7, + 5, ], - "type": "Identifier", - "value": "declare", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 21, "line": 1, }, "start": Object { - "column": 8, + "column": 6, "line": 1, }, }, "range": Array [ - 8, - 17, + 6, + 21, ], "type": "Identifier", - "value": "namespace", + "value": "AudioBufferList", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 23, "line": 1, }, "start": Object { - "column": 18, + "column": 22, "line": 1, }, }, "range": Array [ - 18, - 21, + 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": "Foo", + "value": "mBuffers", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 22, - 23, + 34, + 35, ], "type": "Punctuator", - "value": "{", + "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 { @@ -47880,8 +48221,8 @@ Object { }, }, "range": Array [ - 25, - 26, + 76, + 77, ], "type": "Punctuator", "value": "}", @@ -47891,32 +48232,31 @@ Object { } `; -exports[`typescript fixtures/declare/type-alias.src 1`] = ` +exports[`typescript fixtures/basics/typed-keyword-bigint.src 1`] = ` Object { "body": Array [ Object { - "declare": true, "id": Object { "loc": Object { "end": Object { - "column": 16, + "column": 8, "line": 1, }, "start": Object { - "column": 13, + "column": 5, "line": 1, }, }, "name": "Foo", "range": Array [ - 13, - 16, + 5, + 8, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 25, + "column": 17, "line": 1, }, "start": Object { @@ -47926,25 +48266,25 @@ Object { }, "range": Array [ 0, - 25, + 17, ], "type": "TSTypeAliasDeclaration", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 25, + "column": 17, "line": 1, }, "start": Object { - "column": 19, + "column": 11, "line": 1, }, }, "range": Array [ - 19, - 25, + 11, + 17, ], - "type": "TSStringKeyword", + "type": "TSBigIntKeyword", }, }, ], @@ -47960,14 +48300,14 @@ Object { }, "range": Array [ 0, - 26, + 18, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 4, "line": 1, }, "start": Object { @@ -47977,25 +48317,7 @@ Object { }, "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, + 4, ], "type": "Identifier", "value": "type", @@ -48003,17 +48325,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, + "column": 8, "line": 1, }, "start": Object { - "column": 13, + "column": 5, "line": 1, }, }, "range": Array [ - 13, - 16, + 5, + 8, ], "type": "Identifier", "value": "Foo", @@ -48021,17 +48343,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 10, "line": 1, }, "start": Object { - "column": 17, + "column": 9, "line": 1, }, }, "range": Array [ - 17, - 18, + 9, + 10, ], "type": "Punctuator", "value": "=", @@ -48039,107 +48361,51 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, + "column": 17, "line": 1, }, "start": Object { - "column": 19, + "column": 11, "line": 1, }, }, "range": Array [ - 19, - 25, + 11, + 17, ], "type": "Identifier", - "value": "string", + "value": "bigint", }, ], "type": "Program", } `; -exports[`typescript fixtures/declare/variable.src 1`] = ` +exports[`typescript fixtures/basics/typed-keyword-boolean.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "foo", - "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", - }, - }, + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, }, - "init": null, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, + "start": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 12, - 20, - ], - "type": "VariableDeclarator", }, - ], - "declare": true, - "kind": "var", + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 21, + "column": 18, "line": 1, }, "start": Object { @@ -48149,9 +48415,26 @@ Object { }, "range": Array [ 0, - 21, + 18, ], - "type": "VariableDeclaration", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 18, + ], + "type": "TSBooleanKeyword", + }, }, ], "loc": Object { @@ -48166,14 +48449,14 @@ Object { }, "range": Array [ 0, - 22, + 19, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 4, "line": 1, }, "start": Object { @@ -48183,375 +48466,96 @@ Object { }, "range": Array [ 0, - 7, + 4, ], "type": "Identifier", - "value": "declare", + "value": "type", }, 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, + "column": 5, "line": 1, }, }, "range": Array [ - 12, - 15, + 5, + 8, ], "type": "Identifier", - "value": "foo", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 10, "line": 1, }, "start": Object { - "column": 15, + "column": 9, "line": 1, }, }, "range": Array [ - 15, - 16, + 9, + 10, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 18, "line": 1, }, "start": Object { - "column": 17, + "column": 11, "line": 1, }, }, "range": Array [ - 17, - 20, + 11, + 18, ], "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": ";", + "value": "boolean", }, ], "type": "Program", } `; -exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src 1`] = ` +exports[`typescript fixtures/basics/typed-keyword-false.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "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 { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "configurable", - "range": Array [ - 19, - 31, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 19, - 38, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 18, - 38, - ], - "type": "Decorator", - }, - ], - "key": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "x", - "range": Array [ - 47, - 48, - ], - "type": "Identifier", - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 18, - 70, - ], - "static": false, - "type": "MethodDefinition", - "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", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "name": "_x", - "range": Array [ - 65, - 67, - ], - "type": "Identifier", - }, - "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", - }, - "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, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 72, - ], - "type": "ClassBody", - }, "id": Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 6, + "column": 5, "line": 1, }, }, - "name": "Point", + "name": "Foo", "range": Array [ - 6, - 11, + 5, + 8, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 16, + "line": 1, }, "start": Object { "column": 0, @@ -48560,16 +48564,51 @@ Object { }, "range": Array [ 0, - 72, + 16, ], - "superClass": null, - "type": "ClassDeclaration", + "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", + }, }, ], "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -48578,14 +48617,14 @@ Object { }, "range": Array [ 0, - 72, + 17, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 4, "line": 1, }, "start": Object { @@ -48595,685 +48634,692 @@ Object { }, "range": Array [ 0, - 5, + 4, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 6, + "column": 5, "line": 1, }, }, "range": Array [ - 6, - 11, + 5, + 8, ], "type": "Identifier", - "value": "Point", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 10, "line": 1, }, "start": Object { - "column": 12, + "column": 9, "line": 1, }, }, "range": Array [ - 12, - 13, + 9, + 10, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 18, - 19, + 11, + 16, ], - "type": "Punctuator", - "value": "@", + "type": "Boolean", + "value": "false", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-never.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, }, "range": Array [ - 19, - 31, + 0, + 16, ], - "type": "Identifier", - "value": "configurable", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "type": "TSNeverKeyword", + }, + }, + ], + "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": 18, - "line": 2, + "column": 4, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 31, - 32, + 0, + 4, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 32, - 37, + 5, + 8, ], - "type": "Boolean", - "value": "false", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 37, - 38, + 9, + 10, ], "type": "Punctuator", - "value": ")", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 16, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 11, + "line": 1, }, }, "range": Array [ - 43, - 46, + 11, + 16, ], "type": "Identifier", - "value": "get", + "value": "never", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-null.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 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", + }, + }, + ], + "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": 9, - "line": 3, + "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": 3, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, }, }, "range": Array [ - 47, - 48, + 5, + 8, ], "type": "Identifier", - "value": "x", + "value": "Foo", }, Object { "loc": Object { "end": Object { "column": 10, - "line": 3, + "line": 1, }, "start": Object { "column": 9, - "line": 3, + "line": 1, }, }, "range": Array [ - 48, - 49, + 9, + 10, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 10, - "line": 3, + "column": 11, + "line": 1, }, }, "range": Array [ - 49, - 50, + 11, + 15, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "null", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-number.src 1`] = ` +Object { + "body": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 12, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 51, - 52, + 0, + 17, ], - "type": "Punctuator", - "value": "{", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSNumberKeyword", + }, + }, + ], + "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": 20, - "line": 3, + "column": 4, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 53, - 59, + 0, + 4, ], - "type": "Keyword", - "value": "return", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 3, + "column": 8, + "line": 1, }, "start": Object { - "column": 21, - "line": 3, + "column": 5, + "line": 1, }, }, "range": Array [ - 60, - 64, + 5, + 8, ], - "type": "Keyword", - "value": "this", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 3, + "column": 10, + "line": 1, }, "start": Object { - "column": 25, - "line": 3, + "column": 9, + "line": 1, }, }, "range": Array [ - 64, - 65, + 9, + 10, ], "type": "Punctuator", - "value": ".", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 26, - "line": 3, + "column": 11, + "line": 1, }, }, "range": Array [ - 65, - 67, + 11, + 17, ], "type": "Identifier", - "value": "_x", + "value": "number", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-object.src 1`] = ` +Object { + "body": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 29, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 28, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 67, - 68, + 0, + 17, ], - "type": "Punctuator", - "value": ";", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSObjectKeyword", + }, + }, + ], + "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": 31, - "line": 3, + "column": 4, + "line": 1, }, "start": Object { - "column": 30, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 69, - 70, + 0, + 4, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 8, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 5, + "line": 1, }, }, "range": Array [ - 71, - 72, + 5, + 8, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "Foo", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-factory-static-member.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "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 { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "baz", - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "method": 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 { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 19, - 37, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 18, - 37, - ], - "type": "Decorator", - }, - ], - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "name": "bar", - "range": Array [ - 53, - 56, - ], - "type": "Identifier", - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 42, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 18, - 80, - ], - "static": true, - "type": "MethodDefinition", - "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", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 35, - "line": 3, - }, - }, - "name": "_bar", - "range": Array [ - 73, - 77, - ], - "type": "Identifier", - }, - "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", - }, - "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, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 1, - }, + "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 [ - 12, - 82, - ], - "type": "ClassBody", }, + "range": Array [ + 11, + 17, + ], + "type": "Identifier", + "value": "object", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-string.src 1`] = ` +Object { + "body": Array [ + Object { "id": Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 6, + "column": 5, "line": 1, }, }, - "name": "Other", + "name": "Foo", "range": Array [ - 6, - 11, + 5, + 8, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 17, + "line": 1, }, "start": Object { "column": 0, @@ -49282,16 +49328,32 @@ Object { }, "range": Array [ 0, - 82, + 17, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": 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": 1, - "line": 4, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -49300,14 +49362,14 @@ Object { }, "range": Array [ 0, - 82, + 18, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 4, "line": 1, }, "start": Object { @@ -49317,449 +49379,835 @@ Object { }, "range": Array [ 0, - 5, + 4, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 6, + "column": 5, "line": 1, }, }, "range": Array [ - 6, - 11, + 5, + 8, ], "type": "Identifier", - "value": "Other", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 10, "line": 1, }, "start": Object { - "column": 12, + "column": 9, "line": 1, }, }, "range": Array [ - 12, - 13, + 9, + 10, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 18, - 19, + 11, + 17, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "string", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-symbol.src 1`] = ` +Object { + "body": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 19, - 22, + 0, + 17, ], - "type": "Identifier", - "value": "foo", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSSymbolKeyword", + }, + }, + ], + "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": 9, - "line": 2, + "column": 4, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 22, - 23, + 0, + 4, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 23, - 24, + 5, + 8, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 25, - 28, + 9, + 10, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 28, - 29, + 11, + 17, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "symbol", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-true.src 1`] = ` +Object { + "body": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 30, - 34, + 0, + 15, ], - "type": "Boolean", - "value": "true", + "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", + }, + }, + ], + "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": 22, - "line": 2, + "column": 4, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 35, - 36, + 0, + 4, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 36, - 37, + 5, + 8, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { "column": 10, - "line": 3, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 9, + "line": 1, }, }, "range": Array [ - 42, - 48, + 9, + 10, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { "column": 11, - "line": 3, + "line": 1, }, }, "range": Array [ - 49, - 52, + 11, + 15, ], - "type": "Identifier", - "value": "get", + "type": "Boolean", + "value": "true", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-undefined.src 1`] = ` +Object { + "body": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 18, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { - "column": 15, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 53, - 56, + 0, + 20, ], - "type": "Identifier", - "value": "bar", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 20, + ], + "type": "TSUndefinedKeyword", + }, + }, + ], + "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": 19, - "line": 3, + "column": 4, + "line": 1, }, "start": Object { - "column": 18, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 56, - 57, + 0, + 4, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 3, + "column": 8, + "line": 1, }, "start": Object { - "column": 19, - "line": 3, + "column": 5, + "line": 1, }, }, "range": Array [ - 57, - 58, + 5, + 8, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 3, + "column": 10, + "line": 1, }, "start": Object { - "column": 21, - "line": 3, + "column": 9, + "line": 1, }, }, "range": Array [ - 59, - 60, + 9, + 10, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { - "column": 23, - "line": 3, + "column": 11, + "line": 1, }, }, "range": Array [ - 61, - 67, + 11, + 20, ], - "type": "Keyword", - "value": "return", + "type": "Identifier", + "value": "undefined", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-unknown.src 1`] = ` +Object { + "body": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 34, - "line": 3, + "column": 18, + "line": 1, }, "start": Object { - "column": 30, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 68, - 72, + 0, + 18, ], - "type": "Keyword", - "value": "this", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 18, + ], + "type": "TSUnknownKeyword", + }, + }, + ], + "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": 35, - "line": 3, + "column": 4, + "line": 1, }, "start": Object { - "column": 34, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 72, - 73, + 0, + 4, ], - "type": "Punctuator", - "value": ".", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 3, + "column": 8, + "line": 1, }, "start": Object { - "column": 35, - "line": 3, + "column": 5, + "line": 1, }, }, "range": Array [ - 73, - 77, + 5, + 8, ], "type": "Identifier", - "value": "_bar", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 3, + "column": 10, + "line": 1, }, "start": Object { - "column": 39, - "line": 3, + "column": 9, + "line": 1, }, }, "range": Array [ - 77, - 78, + 9, + 10, ], "type": "Punctuator", - "value": ";", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 3, + "column": 18, + "line": 1, }, "start": Object { - "column": 41, - "line": 3, + "column": 11, + "line": 1, }, }, "range": Array [ - 79, - 80, + 11, + 18, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "unknown", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-void.src 1`] = ` +Object { + "body": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 15, + "line": 1, }, "start": Object { "column": 0, - "line": 4, + "line": 1, }, }, "range": Array [ - 81, - 82, + 0, + 15, ], - "type": "Punctuator", - "value": "}", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 15, + ], + "type": "TSVoidKeyword", + }, }, ], - "type": "Program", + "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", } `; -exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-instance-member.src 1`] = ` +exports[`typescript fixtures/basics/typed-this.src 1`] = ` Object { "body": Array [ Object { @@ -49767,229 +50215,329 @@ Object { "body": Array [ Object { "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "hidden", - "range": Array [ - 15, - 21, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 21, - ], - "type": "Decorator", - }, - ], "key": Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 17, + "line": 2, }, "start": Object { - "column": 8, - "line": 3, + "column": 1, + "line": 2, }, }, - "name": "z", + "name": "addClickListener", "range": Array [ - 30, - 31, + 23, + 39, ], "type": "Identifier", }, - "kind": "get", "loc": Object { "end": Object { - "column": 31, - "line": 3, + "column": 65, + "line": 2, }, "start": Object { - "column": 4, + "column": 1, "line": 2, }, }, - "range": Array [ - 14, - 53, - ], - "static": false, - "type": "MethodDefinition", - "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, - }, + "optional": false, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "name": "onclick", + "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, }, - "object": Object { + "start": Object { + "column": 27, + "line": 2, + }, + }, + "parameters": Array [ + Object { "loc": Object { "end": Object { - "column": 25, - "line": 3, + "column": 38, + "line": 2, }, "start": Object { - "column": 21, - "line": 3, + "column": 28, + "line": 2, }, }, + "name": "this", "range": Array [ - 43, - 47, + 50, + 60, ], - "type": "ThisExpression", + "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", + }, + }, }, - "property": Object { + Object { "loc": Object { "end": Object { - "column": 28, - "line": 3, + "column": 48, + "line": 2, }, "start": Object { - "column": 26, - "line": 3, + "column": 40, + "line": 2, }, }, - "name": "_z", + "name": "e", "range": Array [ - 48, - 50, + 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 { + "loc": Object { + "end": Object { + "column": 48, + "line": 2, + }, + "start": Object { + "column": 43, + "line": 2, + }, + }, + "name": "Event", + "range": Array [ + 65, + 70, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "range": Array [ + 49, + 79, + ], + "type": "TSFunctionType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 2, + }, + "start": Object { + "column": 51, + "line": 2, + }, }, "range": Array [ - 43, - 50, + 73, + 79, ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 2, + }, + "start": Object { + "column": 53, + "line": 2, + }, + }, + "range": Array [ + 75, + 79, + ], + "type": "TSVoidKeyword", }, }, - "range": Array [ - 36, - 51, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, + "typeParameters": null, }, }, - "range": Array [ - 34, - 53, - ], - "type": "BlockStatement", }, - "expression": false, - "generator": false, - "id": null, + ], + "range": Array [ + 23, + 87, + ], + "static": false, + "type": "TSMethodSignature", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 31, - "line": 3, + "column": 64, + "line": 2, }, "start": Object { - "column": 9, - "line": 3, + "column": 58, + "line": 2, }, }, - "params": Array [], "range": Array [ - 31, - 53, + 80, + 86, ], - "type": "FunctionExpression", + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 64, + "line": 2, + }, + "start": Object { + "column": 60, + "line": 2, + }, + }, + "range": Array [ + 82, + 86, + ], + "type": "TSVoidKeyword", + }, }, }, ], "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { - "column": 8, + "column": 20, "line": 1, }, }, "range": Array [ - 8, - 55, + 20, + 89, ], - "type": "ClassBody", + "type": "TSInterfaceBody", }, + "heritage": Array [], "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 19, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, - "name": "P", + "name": "UIElement", "range": Array [ - 6, - 7, + 10, + 19, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { "column": 0, @@ -49998,15 +50546,14 @@ Object { }, "range": Array [ 0, - 55, + 89, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSInterfaceDeclaration", }, ], "loc": Object { "end": Object { - "column": 1, + "column": 0, "line": 4, }, "start": Object { @@ -50016,14 +50563,14 @@ Object { }, "range": Array [ 0, - 55, + 90, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -50033,43 +50580,43 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "class", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 19, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 7, + 10, + 19, ], "type": "Identifier", - "value": "P", + "value": "UIElement", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 21, "line": 1, }, "start": Object { - "column": 8, + "column": 20, "line": 1, }, }, "range": Array [ - 8, - 9, + 20, + 21, ], "type": "Punctuator", "value": "{", @@ -50077,107 +50624,233 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 17, "line": 2, }, "start": Object { - "column": 4, + "column": 1, "line": 2, }, }, "range": Array [ - 14, - 15, - ], + 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": "@", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 25, "line": 2, }, "start": Object { - "column": 5, + "column": 18, "line": 2, }, }, "range": Array [ - 15, - 21, + 40, + 47, ], "type": "Identifier", - "value": "hidden", + "value": "onclick", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 26, + "line": 2, }, "start": Object { - "column": 4, - "line": 3, + "column": 25, + "line": 2, }, }, "range": Array [ - 26, - 29, + 47, + 48, ], - "type": "Identifier", - "value": "get", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 28, + "line": 2, }, "start": Object { - "column": 8, - "line": 3, + "column": 27, + "line": 2, }, }, "range": Array [ - 30, - 31, + 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": "z", + "value": "e", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 3, + "column": 42, + "line": 2, }, "start": Object { - "column": 9, - "line": 3, + "column": 41, + "line": 2, }, }, "range": Array [ - 31, - 32, + 63, + 64, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 48, + "line": 2, }, "start": Object { - "column": 10, - "line": 3, + "column": 43, + "line": 2, }, }, "range": Array [ - 32, - 33, + 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": ")", @@ -50185,107 +50858,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 52, + "line": 2, }, "start": Object { - "column": 12, - "line": 3, + "column": 50, + "line": 2, }, }, "range": Array [ - 34, - 35, + 72, + 74, ], "type": "Punctuator", - "value": "{", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 3, + "column": 57, + "line": 2, }, "start": Object { - "column": 14, - "line": 3, + "column": 53, + "line": 2, }, }, "range": Array [ - 36, - 42, + 75, + 79, ], "type": "Keyword", - "value": "return", + "value": "void", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 3, + "column": 58, + "line": 2, }, "start": Object { - "column": 21, - "line": 3, + "column": 57, + "line": 2, }, }, "range": Array [ - 43, - 47, + 79, + 80, ], - "type": "Keyword", - "value": "this", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 3, + "column": 59, + "line": 2, }, "start": Object { - "column": 25, - "line": 3, + "column": 58, + "line": 2, }, }, "range": Array [ - 47, - 48, + 80, + 81, ], "type": "Punctuator", - "value": ".", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 3, + "column": 64, + "line": 2, }, "start": Object { - "column": 26, - "line": 3, + "column": 60, + "line": 2, }, }, "range": Array [ - 48, - 50, + 82, + 86, ], - "type": "Identifier", - "value": "_z", + "type": "Keyword", + "value": "void", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 3, + "column": 65, + "line": 2, }, "start": Object { - "column": 28, - "line": 3, + "column": 64, + "line": 2, }, }, "range": Array [ - 50, - 51, + 86, + 87, ], "type": "Punctuator", "value": ";", @@ -50293,330 +50966,310 @@ Object { Object { "loc": Object { "end": Object { - "column": 31, + "column": 1, "line": 3, }, "start": Object { - "column": 30, + "column": 0, "line": 3, }, }, "range": Array [ - 52, - 53, + 88, + 89, ], "type": "Punctuator", "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/unique-symbol.src 1`] = ` +Object { + "body": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 23, + "line": 1, }, "start": Object { "column": 0, - "line": 4, + "line": 1, }, }, "range": Array [ - 54, - 55, + 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", + }, + }, + }, + ], + "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": "}", + "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", } `; -exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-static-member.src 1`] = ` +exports[`typescript fixtures/basics/unknown-type-annotation.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "adminonly", - "range": Array [ - 18, - 27, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 27, - ], - "type": "Decorator", + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 4, + 16, ], - "key": Object { + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { "column": 16, - "line": 3, + "line": 1, }, "start": Object { - "column": 15, - "line": 3, + "column": 7, + "line": 1, }, }, - "name": "y", "range": Array [ - 43, - 44, + 7, + 16, ], - "type": "Identifier", - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 76, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "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", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "name": "_y", - "range": Array [ - 63, - 65, - ], - "type": "Identifier", - }, - "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 { - "loc": Object { - "end": Object { - "column": 19, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "name": "a", - "range": Array [ - 68, - 69, - ], - "type": "Identifier", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 58, - 70, - ], - "type": "ExpressionStatement", - }, - ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 16, + "line": 1, }, "start": Object { - "column": 20, - "line": 3, + "column": 9, + "line": 1, }, }, "range": Array [ - 48, - 76, + 9, + 16, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 3, - }, + "type": "TSUnknownKeyword", }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 3, - }, - }, - "name": "a", - "range": Array [ - 45, - 46, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 44, - 76, - ], - "type": "FunctionExpression", }, }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 78, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + "init": null, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 16, + ], + "type": "VariableDeclarator", }, - "name": "User", - "range": Array [ - 6, - 10, - ], - "type": "Identifier", - }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 17, + "line": 1, }, "start": Object { "column": 0, @@ -50625,16 +51278,15 @@ Object { }, "range": Array [ 0, - 78, + 17, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -50643,14 +51295,14 @@ Object { }, "range": Array [ 0, - 78, + 18, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -50660,313 +51312,485 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 7, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 10, + 4, + 7, ], "type": "Identifier", - "value": "User", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 8, "line": 1, }, "start": Object { - "column": 11, + "column": 7, "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, + 7, + 8, ], "type": "Punctuator", - "value": "@", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 18, - 27, + 9, + 16, ], "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", + "value": "unknown", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 11, - "line": 3, + "column": 16, + "line": 1, }, }, "range": Array [ - 39, - 42, + 16, + 17, ], - "type": "Identifier", - "value": "set", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/var-with-definite-assignment.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, + "declarations": Array [ + Object { + "definite": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "x", + "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", }, - }, - "range": Array [ - 43, - 44, ], - "type": "Identifier", - "value": "y", - }, - Object { + "kind": "const", "loc": Object { "end": Object { "column": 17, - "line": 3, + "line": 1, }, "start": Object { - "column": 16, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 44, - 45, + 0, + 17, ], - "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", + "type": "VariableDeclaration", }, Object { + "declarations": Array [ + Object { + "definite": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "y", + "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", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 19, - "line": 3, + "column": 15, + "line": 2, }, "start": Object { - "column": 18, - "line": 3, + "column": 0, + "line": 2, }, }, "range": Array [ - 46, - 47, + 18, + 33, ], - "type": "Punctuator", - "value": ")", + "type": "VariableDeclaration", }, Object { + "declarations": Array [ + Object { + "definite": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "z", + "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", + }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 21, + "column": 15, "line": 3, }, "start": Object { - "column": 20, + "column": 0, "line": 3, }, }, "range": Array [ - 48, + 34, 49, ], - "type": "Punctuator", - "value": "{", + "type": "VariableDeclaration", + }, + ], + "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": 12, - "line": 4, + "column": 5, + "line": 1, }, "start": Object { - "column": 8, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 58, - 62, + 0, + 5, ], "type": "Keyword", - "value": "this", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 7, + "line": 1, }, "start": Object { - "column": 12, - "line": 4, + "column": 6, + "line": 1, }, }, "range": Array [ - 62, - 63, + 6, + 7, ], - "type": "Punctuator", - "value": ".", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 4, + "column": 8, + "line": 1, }, "start": Object { - "column": 13, - "line": 4, + "column": 7, + "line": 1, }, }, "range": Array [ - 63, - 65, + 7, + 8, ], - "type": "Identifier", - "value": "_y", + "type": "Punctuator", + "value": "!", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 4, + "column": 9, + "line": 1, }, "start": Object { - "column": 16, - "line": 4, + "column": 8, + "line": 1, }, }, "range": Array [ - 66, - 67, + 8, + 9, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 4, + "column": 16, + "line": 1, }, "start": Object { - "column": 18, - "line": 4, + "column": 10, + "line": 1, }, }, "range": Array [ - 68, - 69, + 10, + 16, ], "type": "Identifier", - "value": "a", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 4, + "column": 17, + "line": 1, }, "start": Object { - "column": 19, - "line": 4, + "column": 16, + "line": 1, }, }, "range": Array [ - 69, - 70, + 16, + 17, ], "type": "Punctuator", "value": ";", @@ -50974,445 +51798,393 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 3, + "line": 2, }, "start": Object { - "column": 4, - "line": 5, + "column": 0, + "line": 2, }, }, "range": Array [ - 75, - 76, + 18, + 21, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 5, + "line": 2, }, "start": Object { - "column": 0, - "line": 6, + "column": 4, + "line": 2, }, }, "range": Array [ - 77, - 78, + 22, + 23, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "y", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/class-decorators/class-decorator.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "ClassBody", - }, - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "sealed", - "range": Array [ - 1, - 7, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Decorator", - }, - ], - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "name": "Qux", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 12, + "column": 6, "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 5, + "line": 2, }, }, "range": Array [ - 0, - 20, + 23, + 24, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "!", }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 6, + "line": 2, }, }, "range": Array [ - 0, - 1, + 24, + 25, ], "type": "Punctuator", - "value": "@", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 1, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 1, - 7, + 26, + 32, ], "type": "Identifier", - "value": "sealed", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 15, "line": 2, }, "start": Object { - "column": 0, + "column": 14, "line": 2, }, }, "range": Array [ - 8, - 13, + 32, + 33, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 3, + "line": 3, }, "start": Object { - "column": 6, - "line": 2, + "column": 0, + "line": 3, }, }, "range": Array [ - 14, - 17, + 34, + 37, ], - "type": "Identifier", - "value": "Qux", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 5, + "line": 3, }, "start": Object { - "column": 10, - "line": 2, + "column": 4, + "line": 3, }, }, "range": Array [ - 18, - 19, + 38, + 39, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 6, + "line": 3, }, "start": Object { - "column": 11, - "line": 2, + "column": 5, + "line": 3, }, }, "range": Array [ - 19, - 20, + 39, + 40, ], "type": "Punctuator", - "value": "}", + "value": "!", }, - ], - "type": "Program", -} -`; + 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", +} +`; -exports[`typescript fixtures/decorators/class-decorators/class-decorator-factory.src 1`] = ` +exports[`typescript fixtures/basics/var-with-dotted-type.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 56, - 58, - ], - "type": "ClassBody", - }, - "decorators": Array [ + "declarations": Array [ Object { - "expression": Object { - "arguments": Array [ - Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "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": 1, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 11, + "column": 9, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { + "range": Array [ + 9, + 14, + ], + "type": "TSTypeReference", + "typeName": Object { + "left": Object { + "left": Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 1, }, }, - "name": "selector", + "name": "A", "range": Array [ - 17, - 25, + 9, + 10, ], "type": "Identifier", }, - "kind": "init", "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 1, }, }, - "method": false, "range": Array [ - 17, - 32, + 9, + 12, ], - "shorthand": false, - "type": "Property", - "value": Object { + "right": Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 11, + "line": 1, }, }, + "name": "B", "range": Array [ - 27, - 32, + 11, + 12, ], - "raw": "'foo'", - "type": "Literal", - "value": "foo", + "type": "Identifier", }, + "type": "TSQualifiedName", }, - ], - "range": Array [ - 11, - 35, - ], - "type": "ObjectExpression", - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 14, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "C", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "type": "TSQualifiedName", }, }, - "name": "Component", - "range": Array [ - 1, - 10, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 1, - }, }, - "range": Array [ - 1, - 36, - ], - "type": "CallExpression", }, + "init": null, "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 0, + "column": 4, "line": 1, }, }, "range": Array [ - 0, - 36, + 4, + 14, ], - "type": "Decorator", + "type": "VariableDeclarator", }, ], - "id": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "name": "FooComponent", - "range": Array [ - 43, - 55, - ], - "type": "Identifier", - }, + "kind": "var", "loc": Object { "end": Object { - "column": 21, - "line": 4, + "column": 15, + "line": 1, }, "start": Object { "column": 0, @@ -51421,16 +52193,15 @@ Object { }, "range": Array [ 0, - 58, + 15, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 21, - "line": 4, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -51439,14 +52210,14 @@ Object { }, "range": Array [ 0, - 58, + 16, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -51456,466 +52227,384 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Punctuator", - "value": "@", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 7, "line": 1, }, "start": Object { - "column": 1, + "column": 4, "line": 1, }, }, "range": Array [ - 1, - 10, + 4, + 7, ], "type": "Identifier", - "value": "Component", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ - 10, - 11, + 7, + 8, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 10, "line": 1, }, "start": Object { - "column": 11, + "column": 9, "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, + 9, + 10, ], "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'", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 32, - 33, + 10, + 11, ], "type": "Punctuator", - "value": ",", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 12, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 11, + "line": 1, }, }, "range": Array [ - 34, - 35, + 11, + 12, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "B", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 13, + "line": 1, }, "start": Object { - "column": 1, - "line": 3, + "column": 12, + "line": 1, }, }, "range": Array [ - 35, - 36, + 12, + 13, ], "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", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 4, + "column": 14, + "line": 1, }, "start": Object { - "column": 6, - "line": 4, + "column": 13, + "line": 1, }, }, "range": Array [ - 43, - 55, + 13, + 14, ], "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": "{", + "value": "C", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 4, + "column": 15, + "line": 1, }, "start": Object { - "column": 20, - "line": 4, + "column": 14, + "line": 1, }, }, "range": Array [ - 57, - 58, + 14, + 15, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/decorators/method-decorators/method-decorator-factory-instance-member.src 1`] = ` +exports[`typescript fixtures/basics/var-with-type.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "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 { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "onlyRead", - "range": Array [ - 15, - 23, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 30, - ], - "type": "CallExpression", + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "name", + "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": 20, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 14, - 30, + 9, + 15, ], - "type": "Decorator", + "type": "TSStringKeyword", }, - ], - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, + }, + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, }, - "name": "instanceMethod", - "range": Array [ - 35, - 49, - ], - "type": "Identifier", }, - "kind": "method", + "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", + }, + ], + "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 { + "id": Object { "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 15, + "line": 2, }, "start": Object { "column": 4, "line": 2, }, }, + "name": "foo", "range": Array [ - 14, - 54, + 34, + 45, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "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": 23, - "line": 3, + "column": 15, + "line": 2, }, "start": Object { - "column": 21, - "line": 3, + "column": 9, + "line": 2, }, }, "range": Array [ - 52, - 54, + 39, + 45, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, + "type": "TSStringKeyword", }, - "params": Array [], - "range": Array [ - 49, - 54, - ], - "type": "FunctionExpression", }, }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 56, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, + "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", }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, }, + "range": Array [ + 34, + 53, + ], + "type": "VariableDeclarator", }, - "name": "B", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 24, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, "range": Array [ - 0, - 56, + 30, + 54, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 3, }, "start": Object { "column": 0, @@ -51924,14 +52613,14 @@ Object { }, "range": Array [ 0, - 57, + 55, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -51941,28 +52630,28 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 8, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 7, + 4, + 8, ], "type": "Identifier", - "value": "B", + "value": "name", }, Object { "loc": Object { @@ -51980,409 +52669,292 @@ Object { 9, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 14, + 9, 15, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 15, - 23, + 16, + 17, ], - "type": "Identifier", - "value": "onlyRead", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 13, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 23, - 24, + 18, + 28, ], - "type": "Punctuator", - "value": "(", + "type": "String", + "value": "\\"Nicholas\\"", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 24, + 28, 29, ], - "type": "Boolean", - "value": "false", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 3, "line": 2, }, "start": Object { - "column": 19, + "column": 0, "line": 2, }, }, "range": Array [ - 29, 30, + 33, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 3, + "column": 7, + "line": 2, }, "start": Object { "column": 4, - "line": 3, + "line": 2, }, }, "range": Array [ - 35, - 49, + 34, + 37, ], "type": "Identifier", - "value": "instanceMethod", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 3, + "column": 8, + "line": 2, }, "start": Object { - "column": 18, - "line": 3, + "column": 7, + "line": 2, }, }, "range": Array [ - 49, - 50, + 37, + 38, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 3, + "column": 15, + "line": 2, }, "start": Object { - "column": 19, - "line": 3, + "column": 9, + "line": 2, }, }, "range": Array [ - 50, - 51, + 39, + 45, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 3, + "column": 17, + "line": 2, }, "start": Object { - "column": 21, - "line": 3, + "column": 16, + "line": 2, }, }, "range": Array [ - 52, - 53, + 46, + 47, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { "column": 23, - "line": 3, + "line": 2, }, "start": Object { - "column": 22, - "line": 3, + "column": 18, + "line": 2, }, }, "range": Array [ + 48, 53, - 54, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"Bar\\"", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 24, + "line": 2, }, "start": Object { - "column": 0, - "line": 4, + "column": 23, + "line": 2, }, }, "range": Array [ - 55, - 56, + 53, + 54, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/decorators/method-decorators/method-decorator-factory-static-member.src 1`] = ` +exports[`typescript fixtures/basics/variable-declaration-type-annotation-spacing.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "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 { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "Foo", - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 25, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Decorator", + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, }, + }, + "name": "x", + "range": Array [ + 4, + 21, ], - "key": Object { + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 21, + "line": 1, }, "start": Object { - "column": 11, - "line": 3, + "column": 8, + "line": 1, }, }, - "name": "staticMethod", "range": Array [ - 37, - 49, + 8, + 21, ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 54, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 28, - "line": 3, + "column": 21, + "line": 1, }, "start": Object { - "column": 26, - "line": 3, + "column": 15, + "line": 1, }, }, "range": Array [ - 52, - 54, + 15, + 21, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, + "type": "TSStringKeyword", }, - "params": Array [], - "range": Array [ - 49, - 54, - ], - "type": "FunctionExpression", }, }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 56, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + "init": null, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 21, + ], + "type": "VariableDeclarator", }, - "name": "C", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 22, + "line": 1, }, "start": Object { "column": 0, @@ -52391,16 +52963,15 @@ Object { }, "range": Array [ 0, - 56, + 22, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 22, + "line": 1, }, "start": Object { "column": 0, @@ -52409,14 +52980,14 @@ Object { }, "range": Array [ 0, - 57, + 22, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -52426,28 +52997,28 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 7, + 4, + 5, ], "type": "Identifier", - "value": "C", + "value": "x", }, Object { "loc": Object { @@ -52465,184 +53036,210 @@ Object { 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": "@", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ 15, - 18, + 21, ], "type": "Identifier", - "value": "Foo", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 18, - 19, + 21, + 22, ], "type": "Punctuator", - "value": "(", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/declare/abstract-class.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 1, + }, }, - "start": Object { - "column": 9, - "line": 2, + "range": Array [ + 27, + 31, + ], + "type": "ClassBody", + }, + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, }, + "name": "Foo", + "range": Array [ + 23, + 26, + ], + "type": "Identifier", }, - "range": Array [ - 19, - 24, - ], - "type": "Boolean", - "value": "false", - }, - Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { - "column": 14, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 24, - 25, + 0, + 31, ], - "type": "Punctuator", - "value": ")", + "superClass": null, + "type": "TSAbstractClassDeclaration", + }, + ], + "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": 10, - "line": 3, + "column": 7, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 30, - 36, + 0, + 7, ], - "type": "Keyword", - "value": "static", + "type": "Identifier", + "value": "declare", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 16, + "line": 1, }, "start": Object { - "column": 11, - "line": 3, + "column": 8, + "line": 1, }, }, "range": Array [ - 37, - 49, + 8, + 16, ], "type": "Identifier", - "value": "staticMethod", + "value": "abstract", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 3, + "column": 22, + "line": 1, }, "start": Object { - "column": 23, - "line": 3, + "column": 17, + "line": 1, }, }, "range": Array [ - 49, - 50, + 17, + 22, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 3, + "column": 26, + "line": 1, }, "start": Object { - "column": 24, - "line": 3, + "column": 23, + "line": 1, }, }, "range": Array [ - 50, - 51, + 23, + 26, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { - "column": 26, - "line": 3, + "column": 27, + "line": 1, }, }, "range": Array [ - 52, - 53, + 27, + 28, ], "type": "Punctuator", "value": "{", @@ -52650,197 +53247,216 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 1, "line": 3, }, "start": Object { - "column": 27, + "column": 0, "line": 3, }, }, "range": Array [ - 53, - 54, + 30, + 31, ], "type": "Punctuator", "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/declare/class.src 1`] = ` +Object { + "body": Array [ Object { + "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, + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { "column": 0, - "line": 4, + "line": 1, }, }, "range": Array [ - 55, - 56, + 0, + 22, ], - "type": "Punctuator", - "value": "}", + "superClass": null, + "type": "ClassDeclaration", }, ], - "type": "Program", -} + "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", +} `; -exports[`typescript fixtures/decorators/method-decorators/method-decorator-instance-member.src 1`] = ` +exports[`typescript fixtures/declare/enum.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "onlyRead", - "range": Array [ - 15, - 23, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 23, - ], - "type": "Decorator", - }, - ], - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "instanceMethod", - "range": Array [ - 28, - 42, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 47, - ], - "static": false, - "type": "MethodDefinition", - "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", - }, - "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, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 49, - ], - "type": "ClassBody", - }, + "declare": true, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 16, "line": 1, }, "start": Object { - "column": 6, + "column": 13, "line": 1, }, }, - "name": "A", + "name": "Foo", "range": Array [ - 6, - 7, + 13, + 16, ], "type": "Identifier", }, @@ -52854,12 +53470,83 @@ Object { "line": 1, }, }, + "members": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "Bar", + "range": Array [ + 23, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 23, + 26, + ], + "type": "TSEnumMember", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "Baz", + "range": Array [ + 32, + 35, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 32, + 35, + ], + "type": "TSEnumMember", + }, + ], "range": Array [ 0, - 49, + 37, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSEnumDeclaration", }, ], "loc": Object { @@ -52874,14 +53561,14 @@ Object { }, "range": Array [ 0, - 50, + 38, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { @@ -52891,33 +53578,15 @@ Object { }, "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", + "value": "declare", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 12, "line": 1, }, "start": Object { @@ -52927,136 +53596,100 @@ Object { }, "range": Array [ 8, - 9, + 12, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "enum", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 16, + "line": 1, }, "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, + "line": 1, }, }, "range": Array [ - 15, - 23, + 13, + 16, ], "type": "Identifier", - "value": "onlyRead", + "value": "Foo", }, 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, + "line": 1, }, "start": Object { - "column": 18, - "line": 3, + "column": 17, + "line": 1, }, }, "range": Array [ - 42, - 43, + 17, + 18, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 3, + "column": 7, + "line": 2, }, "start": Object { - "column": 19, - "line": 3, + "column": 4, + "line": 2, }, }, "range": Array [ - 43, - 44, + 23, + 26, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 3, + "column": 8, + "line": 2, }, "start": Object { - "column": 21, - "line": 3, + "column": 7, + "line": 2, }, }, "range": Array [ - 45, - 46, + 26, + 27, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 7, "line": 3, }, "start": Object { - "column": 22, + "column": 4, "line": 3, }, }, "range": Array [ - 46, - 47, + 32, + 35, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "Baz", }, Object { "loc": Object { @@ -53070,8 +53703,8 @@ Object { }, }, "range": Array [ - 48, - 49, + 36, + 37, ], "type": "Punctuator", "value": "}", @@ -53081,184 +53714,88 @@ Object { } `; -exports[`typescript fixtures/decorators/method-decorators/method-decorator-static-member.src 1`] = ` +exports[`typescript fixtures/declare/function.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "Foo", - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 18, - ], - "type": "Decorator", - }, - ], - "key": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "name": "staticMethod", - "range": Array [ - 30, - 42, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 47, - ], - "static": true, - "type": "MethodDefinition", - "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", - }, - "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, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 49, - ], - "type": "ClassBody", - }, + "async": false, + "declare": true, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 20, "line": 1, }, "start": Object { - "column": 6, + "column": 17, "line": 1, }, }, - "name": "D", + "name": "foo", "range": Array [ - 6, - 7, + 17, + 20, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 28, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, + "params": Array [], "range": Array [ 0, - 49, + 28, ], - "superClass": null, - "type": "ClassDeclaration", + "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", }, ], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 2, }, "start": Object { "column": 0, @@ -53267,14 +53804,14 @@ Object { }, "range": Array [ 0, - 50, + 29, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { @@ -53284,205 +53821,285 @@ Object { }, "range": Array [ 0, - 5, + 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": "class", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 20, "line": 1, }, "start": Object { - "column": 6, + "column": 17, "line": 1, }, }, "range": Array [ - 6, - 7, + 17, + 20, ], "type": "Identifier", - "value": "D", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 21, "line": 1, }, "start": Object { - "column": 8, + "column": 20, "line": 1, }, }, "range": Array [ - 8, - 9, + 20, + 21, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 14, - 15, + 21, + 22, ], "type": "Punctuator", - "value": "@", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 15, - 18, + 22, + 23, ], - "type": "Identifier", - "value": "Foo", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 24, + "line": 1, }, }, "range": Array [ - 23, - 29, + 24, + 28, ], "type": "Keyword", - "value": "static", + "value": "void", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/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, + "heritage": Array [], + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 23, + "column": 1, "line": 3, }, "start": Object { - "column": 11, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 30, - 42, + 0, + 26, ], - "type": "Identifier", - "value": "staticMethod", + "type": "TSInterfaceDeclaration", }, + ], + "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": 24, - "line": 3, + "column": 7, + "line": 1, }, "start": Object { - "column": 23, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 42, - 43, + 0, + 7, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "declare", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 24, - "line": 3, + "column": 8, + "line": 1, }, }, "range": Array [ - 43, - 44, + 8, + 17, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 3, + "column": 21, + "line": 1, }, "start": Object { - "column": 26, - "line": 3, + "column": 18, + "line": 1, }, }, "range": Array [ - 45, - 46, + 18, + 21, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 3, + "column": 23, + "line": 1, }, "start": Object { - "column": 27, - "line": 3, + "column": 22, + "line": 1, }, }, "range": Array [ - 46, - 47, + 22, + 23, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { "column": 0, - "line": 4, + "line": 3, }, }, "range": Array [ - 48, - 49, + 25, + 26, ], "type": "Punctuator", "value": "}", @@ -53492,417 +54109,51 @@ Object { } `; -exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-constructor.src 1`] = ` +exports[`typescript fixtures/declare/module.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "constructor", - "range": Array [ - 20, - 31, - ], - "type": "Identifier", - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 20, - 113, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "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", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "name": "title", - "range": Array [ - 86, - 91, - ], - "type": "Identifier", - }, - "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 { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "name": "config", - "range": Array [ - 94, - 100, - ], - "type": "Identifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 3, - }, - }, - "name": "title", - "range": Array [ - 101, - 106, - ], - "type": "Identifier", - }, - "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", - }, - "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 { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "APP_CONFIG", - "range": Array [ - 40, - 50, - ], - "type": "Identifier", - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "Inject", - "range": Array [ - 33, - 39, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 33, - 51, - ], - "type": "CallExpression", - }, - "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", - "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 { - "loc": Object { - "end": Object { - "column": 53, - "line": 2, - }, - "start": Object { - "column": 44, - "line": 2, - }, - }, - "name": "AppConfig", - "range": Array [ - 60, - 69, - ], - "type": "Identifier", - }, - }, - }, - }, - ], - "range": Array [ - 31, - 113, - ], - "type": "FunctionExpression", - }, - }, - ], + "body": Array [], "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 3, }, "start": Object { - "column": 14, + "column": 19, "line": 1, }, }, "range": Array [ - 14, - 115, + 19, + 23, ], - "type": "ClassBody", + "type": "TSModuleBlock", }, + "declare": true, "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 18, "line": 1, }, "start": Object { - "column": 6, + "column": 15, "line": 1, }, }, - "name": "Service", + "name": "Foo", "range": Array [ - 6, - 13, + 15, + 18, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 3, }, "start": Object { "column": 0, @@ -53911,16 +54162,15 @@ Object { }, "range": Array [ 0, - 115, + 23, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSModuleDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 4, }, "start": Object { "column": 0, @@ -53929,14 +54179,14 @@ Object { }, "range": Array [ 0, - 116, + 24, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { @@ -53946,449 +54196,650 @@ Object { }, "range": Array [ 0, - 5, + 7, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "declare", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 8, "line": 1, }, }, "range": Array [ - 6, - 13, + 8, + 14, ], "type": "Identifier", - "value": "Service", + "value": "module", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 18, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, 15, + 18, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ + 19, 20, - 31, ], - "type": "Identifier", - "value": "constructor", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { - "column": 15, - "line": 2, + "column": 0, + "line": 3, }, }, "range": Array [ - 31, - 32, + 22, + 23, ], "type": "Punctuator", - "value": "(", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/declare/namespace.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 1, + }, }, - "start": Object { - "column": 16, - "line": 2, + "range": Array [ + 22, + 26, + ], + "type": "TSModuleBlock", + }, + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, }, + "name": "Foo", + "range": Array [ + 18, + 21, + ], + "type": "Identifier", }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "@", - }, - Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { - "column": 17, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 33, - 39, + 0, + 26, ], - "type": "Identifier", - "value": "Inject", + "type": "TSModuleDeclaration", + }, + ], + "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": 24, - "line": 2, + "column": 7, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 39, - 40, + 0, + 7, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "declare", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 40, - 50, + 8, + 17, ], "type": "Identifier", - "value": "APP_CONFIG", + "value": "namespace", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 34, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 50, - 51, + 18, + 21, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 36, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 52, - 58, + 22, + 23, ], - "type": "Identifier", - "value": "config", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 43, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { - "column": 42, - "line": 2, + "column": 0, + "line": 3, }, }, "range": Array [ - 58, - 59, + 25, + 26, ], "type": "Punctuator", - "value": ":", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/declare/type-alias.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "loc": Object { "end": Object { - "column": 53, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 44, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 60, - 69, + 0, + 25, ], - "type": "Identifier", - "value": "AppConfig", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "TSStringKeyword", + }, + }, + ], + "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": 54, - "line": 2, + "column": 7, + "line": 1, }, "start": Object { - "column": 53, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 69, - 70, + 0, + 7, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "declare", }, Object { "loc": Object { "end": Object { - "column": 56, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 55, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 71, - 72, + 8, + 12, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 3, + "column": 16, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 13, + "line": 1, }, }, "range": Array [ - 81, - 85, + 13, + 16, ], - "type": "Keyword", - "value": "this", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 18, + "line": 1, }, "start": Object { - "column": 12, - "line": 3, + "column": 17, + "line": 1, }, }, "range": Array [ - 85, - 86, + 17, + 18, ], "type": "Punctuator", - "value": ".", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { - "column": 13, - "line": 3, + "column": 19, + "line": 1, }, }, "range": Array [ - 86, - 91, + 19, + 25, ], "type": "Identifier", - "value": "title", + "value": "string", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/declare/variable.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "foo", + "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": 20, - "line": 3, + "column": 21, + "line": 1, }, "start": Object { - "column": 19, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 92, - 93, + 0, + 21, ], - "type": "Punctuator", - "value": "=", + "type": "VariableDeclaration", + }, + ], + "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": 27, - "line": 3, + "column": 7, + "line": 1, }, "start": Object { - "column": 21, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 94, - 100, + 0, + 7, ], "type": "Identifier", - "value": "config", + "value": "declare", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 3, + "column": 11, + "line": 1, }, "start": Object { - "column": 27, - "line": 3, + "column": 8, + "line": 1, }, }, "range": Array [ - 100, - 101, + 8, + 11, ], - "type": "Punctuator", - "value": ".", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 28, - "line": 3, + "column": 12, + "line": 1, }, }, "range": Array [ - 101, - 106, + 12, + 15, ], "type": "Identifier", - "value": "title", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 3, + "column": 16, + "line": 1, }, "start": Object { - "column": 33, - "line": 3, + "column": 15, + "line": 1, }, }, "range": Array [ - 106, - 107, + 15, + 16, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 20, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 17, + "line": 1, }, }, "range": Array [ - 112, - 113, + 17, + 20, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "any", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 21, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 20, + "line": 1, }, }, "range": Array [ - 114, - 115, + 20, + 21, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src 1`] = ` +exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src 1`] = ` Object { "body": Array [ Object { @@ -54396,29 +54847,104 @@ Object { "body": Array [ Object { "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 { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "configurable", + "range": Array [ + 19, + 31, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 19, + 38, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 18, + 38, + ], + "type": "Decorator", + }, + ], "key": Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 9, + "line": 3, }, "start": Object { - "column": 4, - "line": 2, + "column": 8, + "line": 3, }, }, - "name": "bar", + "name": "x", "range": Array [ - 16, - 19, + 47, + 48, ], "type": "Identifier", }, - "kind": "method", + "kind": "get", "loc": Object { "end": Object { - "column": 38, - "line": 2, + "column": 31, + "line": 3, }, "start": Object { "column": 4, @@ -54426,176 +54952,119 @@ Object { }, }, "range": Array [ - 16, - 50, + 18, + 70, ], "static": false, "type": "MethodDefinition", "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", - }, - "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 { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "special", - "range": Array [ - 21, - 28, - ], - "type": "Identifier", + "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": 22, - "line": 2, + "column": 25, + "line": 3, }, "start": Object { - "column": 9, - "line": 2, + "column": 21, + "line": 3, }, }, "range": Array [ - 21, - 34, + 60, + 64, ], - "type": "CallExpression", + "type": "ThisExpression", }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, + "property": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, }, + "name": "_x", + "range": Array [ + 65, + 67, + ], + "type": "Identifier", }, "range": Array [ - 20, - 34, + 60, + 67, ], - "type": "Decorator", - }, - ], - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, + "type": "MemberExpression", }, - }, - "name": "baz", - "range": Array [ - 35, - 46, - ], - "type": "Identifier", - "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 29, + "line": 3, }, "start": Object { - "column": 26, - "line": 2, + "column": 14, + "line": 3, }, }, "range": Array [ - 38, - 46, + 53, + 68, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "TSNumberKeyword", - }, + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, }, }, - ], + "range": Array [ + 51, + 70, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "params": Array [], "range": Array [ - 19, - 50, + 48, + 70, ], "type": "FunctionExpression", }, @@ -54604,23 +55073,23 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 4, }, "start": Object { - "column": 10, + "column": 12, "line": 1, }, }, "range": Array [ - 10, - 52, + 12, + 72, ], "type": "ClassBody", }, "id": Object { "loc": Object { "end": Object { - "column": 9, + "column": 11, "line": 1, }, "start": Object { @@ -54628,17 +55097,17 @@ Object { "line": 1, }, }, - "name": "Foo", + "name": "Point", "range": Array [ 6, - 9, + 11, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 4, }, "start": Object { "column": 0, @@ -54647,7 +55116,7 @@ Object { }, "range": Array [ 0, - 52, + 72, ], "superClass": null, "type": "ClassDeclaration", @@ -54655,7 +55124,7 @@ Object { ], "loc": Object { "end": Object { - "column": 0, + "column": 1, "line": 4, }, "start": Object { @@ -54665,7 +55134,7 @@ Object { }, "range": Array [ 0, - 53, + 72, ], "sourceType": "script", "tokens": Array [ @@ -54690,7 +55159,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 11, "line": 1, }, "start": Object { @@ -54700,25 +55169,25 @@ Object { }, "range": Array [ 6, - 9, + 11, ], "type": "Identifier", - "value": "Foo", + "value": "Point", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 13, "line": 1, }, "start": Object { - "column": 10, + "column": 12, "line": 1, }, }, "range": Array [ - 10, - 11, + 12, + 13, ], "type": "Punctuator", "value": "{", @@ -54726,7 +55195,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 2, }, "start": Object { @@ -54735,224 +55204,278 @@ Object { }, }, "range": Array [ - 16, + 18, 19, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "@", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 17, "line": 2, }, "start": Object { - "column": 7, + "column": 5, "line": 2, }, }, "range": Array [ 19, - 20, + 31, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "configurable", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 18, "line": 2, }, "start": Object { - "column": 8, + "column": 17, "line": 2, }, }, "range": Array [ - 20, - 21, + 31, + 32, ], "type": "Punctuator", - "value": "@", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 23, "line": 2, }, "start": Object { - "column": 9, + "column": 18, "line": 2, }, }, "range": Array [ - 21, - 28, + 32, + 37, ], - "type": "Identifier", - "value": "special", + "type": "Boolean", + "value": "false", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 24, "line": 2, }, "start": Object { - "column": 16, + "column": 23, "line": 2, }, }, "range": Array [ - 28, - 29, + 37, + 38, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 17, - "line": 2, + "column": 4, + "line": 3, }, }, "range": Array [ - 29, - 33, + 43, + 46, ], - "type": "Boolean", - "value": "true", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 9, + "line": 3, }, "start": Object { - "column": 21, - "line": 2, + "column": 8, + "line": 3, }, }, "range": Array [ - 33, - 34, + 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": ")", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 11, + "line": 3, }, "start": Object { - "column": 23, - "line": 2, + "column": 10, + "line": 3, }, }, "range": Array [ - 35, - 38, + 49, + 50, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 2, + "column": 13, + "line": 3, }, "start": Object { - "column": 26, - "line": 2, + "column": 12, + "line": 3, }, }, "range": Array [ - 38, - 39, + 51, + 52, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 20, + "line": 3, }, "start": Object { - "column": 28, - "line": 2, + "column": 14, + "line": 3, }, }, "range": Array [ - 40, - 46, + 53, + 59, ], - "type": "Identifier", - "value": "number", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 2, + "column": 25, + "line": 3, }, "start": Object { - "column": 34, - "line": 2, + "column": 21, + "line": 3, }, }, "range": Array [ - 46, - 47, + 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": ")", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 2, + "column": 28, + "line": 3, }, "start": Object { - "column": 36, - "line": 2, + "column": 26, + "line": 3, }, }, "range": Array [ - 48, - 49, + 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": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 2, + "column": 31, + "line": 3, }, "start": Object { - "column": 37, - "line": 2, + "column": 30, + "line": 3, }, }, "range": Array [ - 49, - 50, + 69, + 70, ], "type": "Punctuator", "value": "}", @@ -54961,16 +55484,16 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 4, }, "start": Object { "column": 0, - "line": 3, + "line": 4, }, }, "range": Array [ - 51, - 52, + 71, + 72, ], "type": "Punctuator", "value": "}", @@ -54980,7 +55503,7 @@ Object { } `; -exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src 1`] = ` +exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-factory-static-member.src 1`] = ` Object { "body": Array [ Object { @@ -54988,206 +55511,282 @@ Object { "body": Array [ Object { "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 22, - 63, - ], - "static": true, - "type": "MethodDefinition", - "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", - }, - "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 [ + "decorators": Array [ + Object { + "expression": Object { + "arguments": 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 { "loc": Object { "end": Object { - "column": 28, + "column": 14, "line": 2, }, "start": Object { - "column": 24, + "column": 11, "line": 2, }, }, + "name": "baz", "range": Array [ - 42, - 46, + 25, + 28, ], - "raw": "true", - "type": "Literal", - "value": true, + "type": "Identifier", }, - ], - "callee": Object { + "kind": "init", "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 2, }, "start": Object { - "column": 16, + "column": 11, "line": 2, }, }, - "name": "special", + "method": false, "range": Array [ + 25, 34, - 41, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, + "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 [ - 34, - 47, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, + ], "range": Array [ - 33, - 47, + 23, + 36, ], - "type": "Decorator", - }, - ], - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, + "type": "ObjectExpression", }, - }, - "name": "baz", - "range": Array [ - 48, - 59, ], - "type": "Identifier", - "typeAnnotation": Object { + "callee": Object { "loc": Object { "end": Object { - "column": 41, + "column": 8, "line": 2, }, "start": Object { - "column": 33, + "column": 5, "line": 2, }, }, + "name": "foo", "range": Array [ - 51, - 59, + 19, + 22, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 19, + 37, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 18, + 37, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 53, + 56, + ], + "type": "Identifier", + }, + "kind": "get", + "loc": Object { + "end": Object { + "column": 42, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 18, + 80, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "computed": false, "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 39, + "line": 3, }, "start": Object { - "column": 35, - "line": 2, + "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", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 3, + }, + "start": Object { + "column": 35, + "line": 3, + }, }, + "name": "_bar", + "range": Array [ + 73, + 77, + ], + "type": "Identifier", }, "range": Array [ - 53, - 59, + 68, + 77, ], - "type": "TSNumberKeyword", + "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", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 42, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "params": Array [], "range": Array [ - 32, - 63, + 56, + 80, ], "type": "FunctionExpression", }, @@ -55196,23 +55795,23 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 4, }, "start": Object { - "column": 16, + "column": 12, "line": 1, }, }, "range": Array [ - 16, - 65, + 12, + 82, ], "type": "ClassBody", }, "id": Object { "loc": Object { "end": Object { - "column": 15, + "column": 11, "line": 1, }, "start": Object { @@ -55220,17 +55819,17 @@ Object { "line": 1, }, }, - "name": "StaticFoo", + "name": "Other", "range": Array [ 6, - 15, + 11, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 4, }, "start": Object { "column": 0, @@ -55239,7 +55838,7 @@ Object { }, "range": Array [ 0, - 65, + 82, ], "superClass": null, "type": "ClassDeclaration", @@ -55247,7 +55846,7 @@ Object { ], "loc": Object { "end": Object { - "column": 0, + "column": 1, "line": 4, }, "start": Object { @@ -55257,7 +55856,7 @@ Object { }, "range": Array [ 0, - 66, + 82, ], "sourceType": "script", "tokens": Array [ @@ -55282,7 +55881,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 11, "line": 1, }, "start": Object { @@ -55292,25 +55891,25 @@ Object { }, "range": Array [ 6, - 15, + 11, ], "type": "Identifier", - "value": "StaticFoo", + "value": "Other", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 13, "line": 1, }, "start": Object { - "column": 16, + "column": 12, "line": 1, }, }, "range": Array [ - 16, - 17, + 12, + 13, ], "type": "Punctuator", "value": "{", @@ -55318,7 +55917,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 5, "line": 2, }, "start": Object { @@ -55327,44 +55926,44 @@ Object { }, }, "range": Array [ - 22, - 28, + 18, + 19, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": "@", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 2, }, "start": Object { - "column": 11, + "column": 5, "line": 2, }, }, "range": Array [ - 29, - 32, + 19, + 22, ], "type": "Identifier", - "value": "bar", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 9, "line": 2, }, "start": Object { - "column": 14, + "column": 8, "line": 2, }, }, "range": Array [ - 32, - 33, + 22, + 23, ], "type": "Punctuator", "value": "(", @@ -55372,71 +55971,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, + "column": 10, "line": 2, }, "start": Object { - "column": 15, + "column": 9, "line": 2, }, }, "range": Array [ - 33, - 34, + 23, + 24, ], "type": "Punctuator", - "value": "@", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 14, "line": 2, }, "start": Object { - "column": 16, + "column": 11, "line": 2, }, }, "range": Array [ - 34, - 41, + 25, + 28, ], "type": "Identifier", - "value": "special", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 15, "line": 2, }, "start": Object { - "column": 23, + "column": 14, "line": 2, }, }, "range": Array [ - 41, - 42, + 28, + 29, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 20, "line": 2, }, "start": Object { - "column": 24, + "column": 16, "line": 2, }, }, "range": Array [ - 42, - 46, + 30, + 34, ], "type": "Boolean", "value": "true", @@ -55444,183 +56043,346 @@ Object { Object { "loc": Object { "end": Object { - "column": 29, + "column": 22, "line": 2, }, "start": Object { - "column": 28, + "column": 21, "line": 2, }, }, "range": Array [ - 46, - 47, + 35, + 36, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 33, + "column": 23, "line": 2, }, "start": Object { - "column": 30, + "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, - 51, ], - "type": "Identifier", - "value": "baz", + "type": "Keyword", + "value": "static", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 14, + "line": 3, }, "start": Object { - "column": 33, - "line": 2, + "column": 11, + "line": 3, }, }, "range": Array [ - 51, + 49, 52, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 18, + "line": 3, }, "start": Object { - "column": 35, - "line": 2, + "column": 15, + "line": 3, }, }, "range": Array [ 53, - 59, + 56, ], "type": "Identifier", - "value": "number", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 2, + "column": 19, + "line": 3, }, "start": Object { - "column": 41, - "line": 2, + "column": 18, + "line": 3, }, }, "range": Array [ - 59, - 60, + 56, + 57, ], "type": "Punctuator", - "value": ")", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 44, - "line": 2, + "column": 20, + "line": 3, }, "start": Object { - "column": 43, - "line": 2, + "column": 19, + "line": 3, }, }, "range": Array [ - 61, - 62, + 57, + 58, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 45, - "line": 2, + "column": 22, + "line": 3, }, "start": Object { - "column": 44, - "line": 2, + "column": 21, + "line": 3, }, }, "range": Array [ - 62, - 63, + 59, + 60, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 29, "line": 3, }, "start": Object { - "column": 0, + "column": 23, "line": 3, }, }, "range": Array [ - 64, - 65, + 61, + 67, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "return", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-instance-member.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": 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", +} +`; + +exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-instance-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "hidden", + "range": Array [ + 15, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 21, + ], + "type": "Decorator", + }, + ], + "key": Object { "loc": Object { "end": Object { "column": 9, - "line": 2, + "line": 3, }, "start": Object { - "column": 4, - "line": 2, + "column": 8, + "line": 3, }, }, - "name": "greet", + "name": "z", "range": Array [ - 20, - 25, + 30, + 31, ], "type": "Identifier", }, - "kind": "method", + "kind": "get", "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 31, + "line": 3, }, "start": Object { "column": 4, @@ -55628,8 +56390,8 @@ Object { }, }, "range": Array [ - 20, - 95, + 14, + 53, ], "static": false, "type": "MethodDefinition", @@ -55639,127 +56401,88 @@ 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 ", + "computed": false, + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, }, + }, + "object": Object { "loc": Object { "end": Object { - "column": 30, + "column": 25, "line": 3, }, "start": Object { - "column": 15, + "column": 21, "line": 3, }, }, - "operator": "+", "range": Array [ - 67, - 82, + 43, + 47, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "name": "name", - "range": Array [ - 78, - 82, - ], - "type": "Identifier", - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, + "type": "ThisExpression", }, - "operator": "+", - "range": Array [ - 67, - 88, - ], - "right": Object { + "property": Object { "loc": Object { "end": Object { - "column": 36, + "column": 28, "line": 3, }, "start": Object { - "column": 33, + "column": 26, "line": 3, }, }, + "name": "_z", "range": Array [ - 85, - 88, + 48, + 50, ], - "raw": "\\"!\\"", - "type": "Literal", - "value": "!", + "type": "Identifier", }, - "type": "BinaryExpression", + "range": Array [ + 43, + 50, + ], + "type": "MemberExpression", }, "loc": Object { "end": Object { - "column": 37, + "column": 29, "line": 3, }, "start": Object { - "column": 8, + "column": 14, "line": 3, }, }, "range": Array [ - 60, - 89, + 36, + 51, ], "type": "ReturnStatement", }, ], "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 31, + "line": 3, }, "start": Object { - "column": 34, - "line": 2, + "column": 12, + "line": 3, }, }, "range": Array [ - 50, - 95, + 34, + 53, ], "type": "BlockStatement", }, @@ -55768,108 +56491,18 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 31, + "line": 3, }, "start": Object { "column": 9, - "line": 2, + "line": 3, }, }, - "params": Array [ - Object { - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "required", - "range": Array [ - 27, - 35, - ], - "type": "Identifier", - }, - "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", - "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", - }, - }, - }, - ], + "params": Array [], "range": Array [ - 25, - 95, + 31, + 53, ], "type": "FunctionExpression", }, @@ -55878,23 +56511,23 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 4, }, "start": Object { - "column": 14, + "column": 8, "line": 1, }, }, "range": Array [ - 14, - 97, + 8, + 55, ], "type": "ClassBody", }, "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 7, "line": 1, }, "start": Object { @@ -55902,17 +56535,17 @@ Object { "line": 1, }, }, - "name": "Greeter", + "name": "P", "range": Array [ 6, - 13, + 7, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 4, }, "start": Object { "column": 0, @@ -55921,7 +56554,7 @@ Object { }, "range": Array [ 0, - 97, + 55, ], "superClass": null, "type": "ClassDeclaration", @@ -55929,8 +56562,8 @@ Object { ], "loc": Object { "end": Object { - "column": 0, - "line": 6, + "column": 1, + "line": 4, }, "start": Object { "column": 0, @@ -55939,7 +56572,7 @@ Object { }, "range": Array [ 0, - 98, + 55, ], "sourceType": "script", "tokens": Array [ @@ -55964,7 +56597,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 7, "line": 1, }, "start": Object { @@ -55974,25 +56607,25 @@ Object { }, "range": Array [ 6, - 13, + 7, ], "type": "Identifier", - "value": "Greeter", + "value": "P", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 9, "line": 1, }, "start": Object { - "column": 14, + "column": 8, "line": 1, }, }, "range": Array [ - 14, - 15, + 8, + 9, ], "type": "Punctuator", "value": "{", @@ -56000,7 +56633,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 2, }, "start": Object { @@ -56009,134 +56642,98 @@ Object { }, }, "range": Array [ - 20, - 25, + 14, + 15, ], - "type": "Identifier", - "value": "greet", + "type": "Punctuator", + "value": "@", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 2, }, "start": Object { - "column": 9, + "column": 5, "line": 2, }, }, "range": Array [ - 25, - 26, + 15, + 21, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "hidden", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 10, - "line": 2, + "column": 4, + "line": 3, }, }, "range": Array [ 26, - 27, + 29, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 9, + "line": 3, }, "start": Object { - "column": 11, - "line": 2, + "column": 8, + "line": 3, }, }, "range": Array [ - 27, - 35, + 30, + 31, ], "type": "Identifier", - "value": "required", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 10, + "line": 3, }, "start": Object { - "column": 20, - "line": 2, + "column": 9, + "line": 3, }, }, "range": Array [ - 36, - 40, + 31, + 32, ], - "type": "Identifier", - "value": "name", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 11, + "line": 3, }, "start": Object { - "column": 24, - "line": 2, + "column": 10, + "line": 3, }, }, "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, + 32, + 33, ], "type": "Punctuator", "value": ")", @@ -56144,17 +56741,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 35, - "line": 2, + "column": 13, + "line": 3, }, "start": Object { - "column": 34, - "line": 2, + "column": 12, + "line": 3, }, }, "range": Array [ - 50, - 51, + 34, + 35, ], "type": "Punctuator", "value": "{", @@ -56162,17 +56759,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 20, "line": 3, }, "start": Object { - "column": 8, + "column": 14, "line": 3, }, }, "range": Array [ - 60, - 66, + 36, + 42, ], "type": "Keyword", "value": "return", @@ -56180,43 +56777,43 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, + "column": 25, "line": 3, }, "start": Object { - "column": 15, + "column": 21, "line": 3, }, }, "range": Array [ - 67, - 75, + 43, + 47, ], - "type": "String", - "value": "\\"Hello \\"", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 26, "line": 3, }, "start": Object { - "column": 24, + "column": 25, "line": 3, }, }, "range": Array [ - 76, - 77, + 47, + 48, ], "type": "Punctuator", - "value": "+", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 28, "line": 3, }, "start": Object { @@ -56225,80 +56822,44 @@ Object { }, }, "range": Array [ - 78, - 82, + 48, + 50, ], "type": "Identifier", - "value": "name", + "value": "_z", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 29, "line": 3, }, "start": Object { - "column": 31, + "column": 28, "line": 3, }, }, "range": Array [ - 83, - 84, + 50, + 51, ], "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": "\\"!\\"", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 31, "line": 3, }, "start": Object { - "column": 36, + "column": 30, "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, + 52, + 53, ], "type": "Punctuator", "value": "}", @@ -56307,16 +56868,16 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 4, }, "start": Object { "column": 0, - "line": 5, + "line": 4, }, }, "range": Array [ - 96, - 97, + 54, + 55, ], "type": "Punctuator", "value": "}", @@ -56326,7 +56887,7 @@ Object { } `; -exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-static-member.src 1`] = ` +exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-static-member.src 1`] = ` Object { "body": Array [ Object { @@ -56334,29 +56895,66 @@ Object { "body": Array [ Object { "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "adminonly", + "range": Array [ + 18, + 27, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 27, + ], + "type": "Decorator", + }, + ], "key": Object { "loc": Object { "end": Object { "column": 16, - "line": 2, + "line": 3, }, "start": Object { - "column": 11, - "line": 2, + "column": 15, + "line": 3, }, }, - "name": "greet", + "name": "y", "range": Array [ - 33, - 38, + 43, + 44, ], "type": "Identifier", }, - "kind": "method", + "kind": "set", "loc": Object { "end": Object { "column": 5, - "line": 4, + "line": 5, }, "start": Object { "column": 4, @@ -56364,8 +56962,8 @@ Object { }, }, "range": Array [ - 26, - 108, + 17, + 76, ], "static": true, "type": "MethodDefinition", @@ -56374,128 +56972,125 @@ Object { "body": Object { "body": Array [ Object { - "argument": Object { + "expression": Object { "left": 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": 23, - "line": 3, + "column": 12, + "line": 4, }, "start": Object { - "column": 15, - "line": 3, + "column": 8, + "line": 4, }, }, "range": Array [ - 80, - 88, + 58, + 62, ], - "raw": "\\"Hello \\"", - "type": "Literal", - "value": "Hello ", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, + "type": "ThisExpression", }, - "operator": "+", - "range": Array [ - 80, - 95, - ], - "right": Object { + "property": Object { "loc": Object { "end": Object { - "column": 30, - "line": 3, + "column": 15, + "line": 4, }, "start": Object { - "column": 26, - "line": 3, + "column": 13, + "line": 4, }, }, - "name": "name", + "name": "_y", "range": Array [ - 91, - 95, + 63, + 65, ], "type": "Identifier", }, - "type": "BinaryExpression", + "range": Array [ + 58, + 65, + ], + "type": "MemberExpression", }, "loc": Object { "end": Object { - "column": 36, - "line": 3, + "column": 19, + "line": 4, }, "start": Object { - "column": 15, - "line": 3, + "column": 8, + "line": 4, }, }, - "operator": "+", + "operator": "=", "range": Array [ - 80, - 101, + 58, + 69, ], "right": Object { "loc": Object { "end": Object { - "column": 36, - "line": 3, + "column": 19, + "line": 4, }, "start": Object { - "column": 33, - "line": 3, + "column": 18, + "line": 4, }, }, + "name": "a", "range": Array [ - 98, - 101, + 68, + 69, ], - "raw": "\\"!\\"", - "type": "Literal", - "value": "!", + "type": "Identifier", }, - "type": "BinaryExpression", + "type": "AssignmentExpression", }, "loc": Object { "end": Object { - "column": 37, - "line": 3, + "column": 20, + "line": 4, }, "start": Object { "column": 8, - "line": 3, + "line": 4, }, }, "range": Array [ - 73, - 102, + 58, + 70, ], - "type": "ReturnStatement", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { "column": 5, - "line": 4, + "line": 5, }, "start": Object { - "column": 41, - "line": 2, + "column": 20, + "line": 3, }, }, "range": Array [ - 63, - 108, + 48, + 76, ], "type": "BlockStatement", }, @@ -56505,107 +57100,36 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 4, + "line": 5, }, "start": Object { "column": 16, - "line": 2, + "line": 3, }, }, "params": Array [ Object { - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "name": "required", - "range": Array [ - 40, - 48, - ], - "type": "Identifier", - }, - "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, + "column": 18, + "line": 3, }, "start": Object { - "column": 27, - "line": 2, + "column": 17, + "line": 3, }, }, - "name": "name", + "name": "a", "range": Array [ - 49, - 61, + 45, + 46, ], "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, + 44, + 76, ], "type": "FunctionExpression", }, @@ -56614,23 +57138,23 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 6, }, "start": Object { - "column": 20, + "column": 11, "line": 1, }, }, "range": Array [ - 20, - 110, + 11, + 78, ], "type": "ClassBody", }, "id": Object { "loc": Object { "end": Object { - "column": 19, + "column": 10, "line": 1, }, "start": Object { @@ -56638,17 +57162,17 @@ Object { "line": 1, }, }, - "name": "StaticGreeter", + "name": "User", "range": Array [ 6, - 19, + 10, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 6, }, "start": Object { "column": 0, @@ -56657,7 +57181,7 @@ Object { }, "range": Array [ 0, - 110, + 78, ], "superClass": null, "type": "ClassDeclaration", @@ -56665,7 +57189,7 @@ Object { ], "loc": Object { "end": Object { - "column": 0, + "column": 1, "line": 6, }, "start": Object { @@ -56675,7 +57199,7 @@ Object { }, "range": Array [ 0, - 111, + 78, ], "sourceType": "script", "tokens": Array [ @@ -56700,7 +57224,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 10, "line": 1, }, "start": Object { @@ -56710,25 +57234,25 @@ Object { }, "range": Array [ 6, - 19, + 10, ], "type": "Identifier", - "value": "StaticGreeter", + "value": "User", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 12, "line": 1, }, "start": Object { - "column": 20, + "column": 11, "line": 1, }, }, "range": Array [ - 20, - 21, + 11, + 12, ], "type": "Punctuator", "value": "{", @@ -56736,7 +57260,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 5, "line": 2, }, "start": Object { @@ -56745,152 +57269,134 @@ Object { }, }, "range": Array [ - 26, - 32, + 17, + 18, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": "@", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 14, "line": 2, }, "start": Object { - "column": 11, + "column": 5, "line": 2, }, }, "range": Array [ - 33, - 38, + 18, + 27, ], "type": "Identifier", - "value": "greet", + "value": "adminonly", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 10, + "line": 3, }, "start": Object { - "column": 16, - "line": 2, + "column": 4, + "line": 3, }, }, "range": Array [ + 32, 38, - 39, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "static", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 14, + "line": 3, }, "start": Object { - "column": 17, - "line": 2, + "column": 11, + "line": 3, }, }, "range": Array [ 39, - 40, + 42, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 16, + "line": 3, }, "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, + "column": 15, + "line": 3, }, }, "range": Array [ - 49, - 53, + 43, + 44, ], "type": "Identifier", - "value": "name", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 2, + "column": 17, + "line": 3, }, "start": Object { - "column": 31, - "line": 2, + "column": 16, + "line": 3, }, }, "range": Array [ - 53, - 54, + 44, + 45, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 2, + "column": 18, + "line": 3, }, "start": Object { - "column": 33, - "line": 2, + "column": 17, + "line": 3, }, }, "range": Array [ - 55, - 61, + 45, + 46, ], "type": "Identifier", - "value": "string", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 2, + "column": 19, + "line": 3, }, "start": Object { - "column": 39, - "line": 2, + "column": 18, + "line": 3, }, }, "range": Array [ - 61, - 62, + 46, + 47, ], "type": "Punctuator", "value": ")", @@ -56898,17 +57404,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 42, - "line": 2, + "column": 21, + "line": 3, }, "start": Object { - "column": 41, - "line": 2, + "column": 20, + "line": 3, }, }, "range": Array [ - 63, - 64, + 48, + 49, ], "type": "Punctuator", "value": "{", @@ -56916,125 +57422,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 12, + "line": 4, }, "start": Object { "column": 8, - "line": 3, + "line": 4, }, }, "range": Array [ - 73, - 79, + 58, + 62, ], "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 \\"", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 3, + "column": 13, + "line": 4, }, "start": Object { - "column": 24, - "line": 3, + "column": 12, + "line": 4, }, }, "range": Array [ - 89, - 90, + 62, + 63, ], "type": "Punctuator", - "value": "+", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 3, + "column": 15, + "line": 4, }, "start": Object { - "column": 26, - "line": 3, + "column": 13, + "line": 4, }, }, "range": Array [ - 91, - 95, + 63, + 65, ], "type": "Identifier", - "value": "name", + "value": "_y", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 3, + "column": 17, + "line": 4, }, "start": Object { - "column": 31, - "line": 3, + "column": 16, + "line": 4, }, }, "range": Array [ - 96, - 97, + 66, + 67, ], "type": "Punctuator", - "value": "+", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 36, - "line": 3, + "column": 19, + "line": 4, }, "start": Object { - "column": 33, - "line": 3, + "column": 18, + "line": 4, }, }, "range": Array [ - 98, - 101, + 68, + 69, ], - "type": "String", - "value": "\\"!\\"", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 3, + "column": 20, + "line": 4, }, "start": Object { - "column": 36, - "line": 3, + "column": 19, + "line": 4, }, }, "range": Array [ - 101, - 102, + 69, + 70, ], "type": "Punctuator", "value": ";", @@ -57043,16 +57531,16 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 4, + "line": 5, }, "start": Object { "column": 4, - "line": 4, + "line": 5, }, }, "range": Array [ - 107, - 108, + 75, + 76, ], "type": "Punctuator", "value": "}", @@ -57061,16 +57549,16 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 6, }, "start": Object { "column": 0, - "line": 5, + "line": 6, }, }, "range": Array [ - 109, - 110, + 77, + 78, ], "type": "Punctuator", "value": "}", @@ -57080,272 +57568,87 @@ Object { } `; -exports[`typescript fixtures/decorators/property-decorators/property-decorator-factory-instance-member.src 1`] = ` +exports[`typescript fixtures/decorators/class-decorators/class-decorator.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [ - Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "name": "Input", - "range": Array [ - 27, - 32, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 27, - 34, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 26, - 34, - ], - "type": "Decorator", - }, - ], - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "data", - "range": Array [ - 35, - 39, - ], - "type": "Identifier", - }, + "body": Array [], + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 18, + 20, + ], + "type": "ClassBody", + }, + "decorators": Array [ + Object { + "expression": Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 7, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 1, + "line": 1, }, }, + "name": "sealed", "range": Array [ - 26, - 40, + 1, + 7, ], - "static": false, - "type": "ClassProperty", - "value": null, + "type": "Identifier", }, - Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "name": "Output", - "range": Array [ - 46, - 52, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 46, - 54, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 45, - 54, - ], - "type": "Decorator", - }, - ], - "key": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "name": "click", - "range": Array [ - 59, - 64, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 3, - }, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, }, - "range": Array [ - 45, - 86, - ], - "static": false, - "type": "ClassProperty", - "value": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "name": "EventEmitter", - "range": Array [ - 71, - 83, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 30, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "range": Array [ - 67, - 85, - ], - "type": "NewExpression", + "start": Object { + "column": 0, + "line": 1, }, }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 1, - }, + "range": Array [ + 0, + 7, + ], + "type": "Decorator", }, - "range": Array [ - 20, - 88, - ], - "type": "ClassBody", - }, + ], "id": Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { "column": 6, - "line": 1, + "line": 2, }, }, - "name": "SomeComponent", + "name": "Qux", "range": Array [ - 6, - 19, + 14, + 17, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 12, + "line": 2, }, "start": Object { "column": 0, @@ -57354,7 +57657,7 @@ Object { }, "range": Array [ 0, - 88, + 20, ], "superClass": null, "type": "ClassDeclaration", @@ -57362,8 +57665,8 @@ Object { ], "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 12, + "line": 2, }, "start": Object { "column": 0, @@ -57372,14 +57675,14 @@ Object { }, "range": Array [ 0, - 88, + 20, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -57389,82 +57692,64 @@ Object { }, "range": Array [ 0, - 5, + 1, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "@", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 7, "line": 1, }, "start": Object { - "column": 6, + "column": 1, "line": 1, }, }, "range": Array [ - 6, - 19, + 1, + 7, ], "type": "Identifier", - "value": "SomeComponent", + "value": "sealed", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 5, + "line": 2, }, "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, + "column": 0, "line": 2, }, }, "range": Array [ - 26, - 27, + 8, + 13, ], - "type": "Punctuator", - "value": "@", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 9, "line": 2, }, "start": Object { - "column": 5, + "column": 6, "line": 2, }, }, "range": Array [ - 27, - 32, + 14, + 17, ], "type": "Identifier", - "value": "Input", + "value": "Qux", }, Object { "loc": Object { @@ -57478,11 +57763,11 @@ Object { }, }, "range": Array [ - 32, - 33, + 18, + 19, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { @@ -57496,260 +57781,472 @@ Object { }, }, "range": Array [ - 33, - 34, + 19, + 20, ], "type": "Punctuator", - "value": ")", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/class-decorators/class-decorator-factory.src 1`] = ` +Object { + "body": Array [ Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 21, + "line": 4, + }, + "start": Object { + "column": 19, + "line": 4, + }, + }, + "range": Array [ + 56, + 58, + ], + "type": "ClassBody", + }, + "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 { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "selector", + "range": Array [ + 17, + 25, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "method": 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 { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "name": "Component", + "range": Array [ + 1, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 36, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 36, + ], + "type": "Decorator", + }, + ], + "id": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "name": "FooComponent", + "range": Array [ + 43, + 55, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 21, + "line": 4, }, "start": Object { - "column": 13, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 35, - 39, + 0, + 58, ], - "type": "Identifier", - "value": "data", + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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": 18, - "line": 2, + "column": 1, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 39, - 40, + 0, + 1, ], "type": "Punctuator", - "value": ";", + "value": "@", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 10, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 1, + "line": 1, }, }, "range": Array [ - 45, - 46, + 1, + 10, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "Component", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 3, + "line": 1, }, "start": Object { - "column": 5, - "line": 3, + "column": 10, + "line": 1, }, }, "range": Array [ - 46, - 52, + 10, + 11, ], - "type": "Identifier", - "value": "Output", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 12, - "line": 3, + "line": 1, }, "start": Object { "column": 11, - "line": 3, + "line": 1, }, }, "range": Array [ - 52, - 53, + 11, + 12, ], "type": "Punctuator", - "value": "(", + "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": 3, + "line": 2, }, "start": Object { "column": 12, - "line": 3, + "line": 2, }, }, "range": Array [ - 53, - 54, + 25, + 26, ], "type": "Punctuator", - "value": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 4, + "column": 19, + "line": 2, }, "start": Object { - "column": 4, - "line": 4, + "column": 14, + "line": 2, }, }, "range": Array [ - 59, - 64, + 27, + 32, ], - "type": "Identifier", - "value": "click", + "type": "String", + "value": "'foo'", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 4, + "column": 20, + "line": 2, }, "start": Object { - "column": 10, - "line": 4, + "column": 19, + "line": 2, }, }, "range": Array [ - 65, - 66, + 32, + 33, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 4, + "column": 1, + "line": 3, }, "start": Object { - "column": 12, - "line": 4, + "column": 0, + "line": 3, }, }, "range": Array [ - 67, - 70, + 34, + 35, ], - "type": "Keyword", - "value": "new", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 4, + "column": 2, + "line": 3, }, "start": Object { - "column": 16, - "line": 4, + "column": 1, + "line": 3, }, }, "range": Array [ - 71, - 83, + 35, + 36, ], - "type": "Identifier", - "value": "EventEmitter", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 5, "line": 4, }, "start": Object { - "column": 28, + "column": 0, "line": 4, }, }, "range": Array [ - 83, - 84, + 37, + 42, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 18, "line": 4, }, "start": Object { - "column": 29, + "column": 6, "line": 4, }, }, "range": Array [ - 84, - 85, + 43, + 55, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "FooComponent", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 20, "line": 4, }, "start": Object { - "column": 30, + "column": 19, "line": 4, }, }, "range": Array [ - 85, - 86, + 56, + 57, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 21, + "line": 4, }, "start": Object { - "column": 0, - "line": 5, + "column": 20, + "line": 4, }, }, "range": Array [ - 87, - 88, + 57, + 58, ], "type": "Punctuator", "value": "}", @@ -57759,7 +58256,7 @@ Object { } `; -exports[`typescript fixtures/decorators/property-decorators/property-decorator-factory-static-member.src 1`] = ` +exports[`typescript fixtures/decorators/method-decorators/method-decorator-factory-instance-member.src 1`] = ` Object { "body": Array [ Object { @@ -57774,27 +58271,27 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 19, "line": 2, }, "start": Object { - "column": 18, + "column": 14, "line": 2, }, }, "range": Array [ - 28, - 32, + 24, + 29, ], - "raw": "true", + "raw": "false", "type": "Literal", - "value": true, + "value": false, }, ], "callee": Object { "loc": Object { "end": Object { - "column": 17, + "column": 13, "line": 2, }, "start": Object { @@ -57802,16 +58299,16 @@ Object { "line": 2, }, }, - "name": "configurable", + "name": "onlyRead", "range": Array [ 15, - 27, + 23, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 2, }, "start": Object { @@ -57821,13 +58318,13 @@ Object { }, "range": Array [ 15, - 33, + 30, ], "type": "CallExpression", }, "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 2, }, "start": Object { @@ -57837,7 +58334,7 @@ Object { }, "range": Array [ 14, - 33, + 30, ], "type": "Decorator", }, @@ -57845,25 +58342,26 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 36, - "line": 2, + "column": 18, + "line": 3, }, "start": Object { - "column": 31, - "line": 2, + "column": 4, + "line": 3, }, }, - "name": "prop1", + "name": "instanceMethod", "range": Array [ - 41, - 46, + 35, + 49, ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { - "column": 37, - "line": 2, + "column": 23, + "line": 3, }, "start": Object { "column": 4, @@ -57872,130 +58370,56 @@ Object { }, "range": Array [ 14, - 47, + 54, ], - "static": true, - "type": "ClassProperty", - "value": null, - }, - Object { - "computed": 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 { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "name": "configurable", - "range": Array [ - 54, - 66, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 4, - }, - }, - "range": Array [ - 54, - 73, - ], - "type": "CallExpression", - }, + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 24, - "line": 4, + "column": 23, + "line": 3, }, "start": Object { - "column": 4, - "line": 4, + "column": 21, + "line": 3, }, }, "range": Array [ - 53, - 73, + 52, + 54, ], - "type": "Decorator", + "type": "BlockStatement", }, - ], - "key": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 16, - "line": 5, + "column": 23, + "line": 3, }, "start": Object { - "column": 11, - "line": 5, + "column": 18, + "line": 3, }, }, - "name": "prop2", + "params": Array [], "range": Array [ - 85, - 90, + 49, + 54, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 4, - }, + "type": "FunctionExpression", }, - "range": Array [ - 53, - 91, - ], - "static": true, - "type": "ClassProperty", - "value": null, }, ], "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 4, }, "start": Object { "column": 8, @@ -58004,7 +58428,7 @@ Object { }, "range": Array [ 8, - 93, + 56, ], "type": "ClassBody", }, @@ -58019,7 +58443,7 @@ Object { "line": 1, }, }, - "name": "A", + "name": "B", "range": Array [ 6, 7, @@ -58029,7 +58453,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 4, }, "start": Object { "column": 0, @@ -58038,7 +58462,7 @@ Object { }, "range": Array [ 0, - 93, + 56, ], "superClass": null, "type": "ClassDeclaration", @@ -58046,8 +58470,8 @@ Object { ], "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -58056,7 +58480,7 @@ Object { }, "range": Array [ 0, - 93, + 57, ], "sourceType": "script", "tokens": Array [ @@ -58094,7 +58518,7 @@ Object { 7, ], "type": "Identifier", - "value": "A", + "value": "B", }, Object { "loc": Object { @@ -58135,7 +58559,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, + "column": 13, "line": 2, }, "start": Object { @@ -58145,25 +58569,25 @@ Object { }, "range": Array [ 15, - 27, + 23, ], "type": "Identifier", - "value": "configurable", + "value": "onlyRead", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 14, "line": 2, }, "start": Object { - "column": 17, + "column": 13, "line": 2, }, }, "range": Array [ - 27, - 28, + 23, + 24, ], "type": "Punctuator", "value": "(", @@ -58171,35 +58595,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 19, "line": 2, }, "start": Object { - "column": 18, + "column": 14, "line": 2, }, }, "range": Array [ - 28, - 32, + 24, + 29, ], "type": "Boolean", - "value": "true", + "value": "false", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 2, }, "start": Object { - "column": 22, + "column": 19, "line": 2, }, }, "range": Array [ - 32, - 33, + 29, + 30, ], "type": "Punctuator", "value": ")", @@ -58207,107 +58631,35 @@ Object { 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, + "column": 18, + "line": 3, }, "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, + "line": 3, }, }, "range": Array [ - 54, - 66, + 35, + 49, ], "type": "Identifier", - "value": "configurable", + "value": "instanceMethod", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 4, + "column": 19, + "line": 3, }, "start": Object { - "column": 17, - "line": 4, + "column": 18, + "line": 3, }, }, "range": Array [ - 66, - 67, + 49, + 50, ], "type": "Punctuator", "value": "(", @@ -58315,35 +58667,17 @@ Object { 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, + "column": 20, + "line": 3, }, "start": Object { - "column": 23, - "line": 4, + "column": 19, + "line": 3, }, }, "range": Array [ - 72, - 73, + 50, + 51, ], "type": "Punctuator", "value": ")", @@ -58351,71 +58685,53 @@ Object { 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, + "column": 22, + "line": 3, }, "start": Object { - "column": 11, - "line": 5, + "column": 21, + "line": 3, }, }, "range": Array [ - 85, - 90, + 52, + 53, ], - "type": "Identifier", - "value": "prop2", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 5, + "column": 23, + "line": 3, }, "start": Object { - "column": 16, - "line": 5, + "column": 22, + "line": 3, }, }, "range": Array [ - 90, - 91, + 53, + 54, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 4, }, "start": Object { "column": 0, - "line": 6, + "line": 4, }, }, "range": Array [ - 92, - 93, + 55, + 56, ], "type": "Punctuator", "value": "}", @@ -58425,7 +58741,7 @@ Object { } `; -exports[`typescript fixtures/decorators/property-decorators/property-decorator-instance-member.src 1`] = ` +exports[`typescript fixtures/decorators/method-decorators/method-decorator-factory-static-member.src 1`] = ` Object { "body": Array [ Object { @@ -58436,9 +58752,48 @@ Object { "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 { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "Foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 8, + "column": 15, "line": 2, }, "start": Object { @@ -58446,16 +58801,15 @@ Object { "line": 2, }, }, - "name": "foo", "range": Array [ 15, - 18, + 25, ], - "type": "Identifier", + "type": "CallExpression", }, "loc": Object { "end": Object { - "column": 8, + "column": 15, "line": 2, }, "start": Object { @@ -58465,7 +58819,7 @@ Object { }, "range": Array [ 14, - 18, + 25, ], "type": "Decorator", }, @@ -58473,25 +58827,26 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 23, + "line": 3, }, "start": Object { - "column": 9, - "line": 2, + "column": 11, + "line": 3, }, }, - "name": "x", + "name": "staticMethod", "range": Array [ - 19, - 20, + 37, + 49, ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 28, + "line": 3, }, "start": Object { "column": 4, @@ -58500,92 +58855,56 @@ Object { }, "range": Array [ 14, - 21, + 54, ], - "static": false, - "type": "ClassProperty", - "value": null, - }, - Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "name": "bar", - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - }, + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 8, + "column": 28, "line": 3, }, "start": Object { - "column": 4, + "column": 26, "line": 3, }, }, "range": Array [ - 26, - 30, + 52, + 54, ], - "type": "Decorator", + "type": "BlockStatement", }, - ], - "key": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 28, + "line": 3, }, "start": Object { - "column": 4, - "line": 4, + "column": 23, + "line": 3, }, }, - "name": "y", + "params": Array [], "range": Array [ - 35, - 36, + 49, + 54, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 3, - }, + "type": "FunctionExpression", }, - "range": Array [ - 26, - 37, - ], - "static": false, - "type": "ClassProperty", - "value": null, }, ], "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 4, }, "start": Object { "column": 8, @@ -58594,7 +58913,7 @@ Object { }, "range": Array [ 8, - 39, + 56, ], "type": "ClassBody", }, @@ -58609,7 +58928,7 @@ Object { "line": 1, }, }, - "name": "B", + "name": "C", "range": Array [ 6, 7, @@ -58619,7 +58938,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 4, }, "start": Object { "column": 0, @@ -58628,7 +58947,7 @@ Object { }, "range": Array [ 0, - 39, + 56, ], "superClass": null, "type": "ClassDeclaration", @@ -58636,7 +58955,7 @@ Object { ], "loc": Object { "end": Object { - "column": 1, + "column": 0, "line": 5, }, "start": Object { @@ -58646,7 +58965,7 @@ Object { }, "range": Array [ 0, - 39, + 57, ], "sourceType": "script", "tokens": Array [ @@ -58684,7 +59003,7 @@ Object { 7, ], "type": "Identifier", - "value": "B", + "value": "C", }, Object { "loc": Object { @@ -58738,12 +59057,30 @@ Object { 18, ], "type": "Identifier", - "value": "foo", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 10, + "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 { @@ -58753,33 +59090,33 @@ Object { }, "range": Array [ 19, - 20, + 24, ], - "type": "Identifier", - "value": "x", + "type": "Boolean", + "value": "false", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 15, "line": 2, }, "start": Object { - "column": 10, + "column": 14, "line": 2, }, }, "range": Array [ - 20, - 21, + 24, + 25, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 10, "line": 3, }, "start": Object { @@ -58788,80 +59125,116 @@ Object { }, }, "range": Array [ - 26, - 27, + 30, + 36, ], - "type": "Punctuator", - "value": "@", + "type": "Keyword", + "value": "static", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 23, "line": 3, }, "start": Object { - "column": 5, + "column": 11, "line": 3, }, }, "range": Array [ - 27, - 30, + 37, + 49, ], "type": "Identifier", - "value": "bar", + "value": "staticMethod", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 24, + "line": 3, }, "start": Object { - "column": 4, - "line": 4, + "column": 23, + "line": 3, }, }, "range": Array [ - 35, - 36, + 49, + 50, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 4, + "column": 25, + "line": 3, }, "start": Object { - "column": 5, - "line": 4, + "column": 24, + "line": 3, }, }, "range": Array [ - 36, - 37, + 50, + 51, ], "type": "Punctuator", - "value": ";", + "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": 5, + "line": 4, }, "start": Object { "column": 0, - "line": 5, + "line": 4, }, }, "range": Array [ - 38, - 39, + 55, + 56, ], "type": "Punctuator", "value": "}", @@ -58871,7 +59244,7 @@ Object { } `; -exports[`typescript fixtures/decorators/property-decorators/property-decorator-static-member.src 1`] = ` +exports[`typescript fixtures/decorators/method-decorators/method-decorator-instance-member.src 1`] = ` Object { "body": Array [ Object { @@ -58884,7 +59257,7 @@ Object { "expression": Object { "loc": Object { "end": Object { - "column": 8, + "column": 13, "line": 2, }, "start": Object { @@ -58892,16 +59265,16 @@ Object { "line": 2, }, }, - "name": "baz", + "name": "onlyRead", "range": Array [ 15, - 18, + 23, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 8, + "column": 13, "line": 2, }, "start": Object { @@ -58911,7 +59284,7 @@ Object { }, "range": Array [ 14, - 18, + 23, ], "type": "Decorator", }, @@ -58919,25 +59292,26 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 18, + "line": 3, }, "start": Object { - "column": 16, - "line": 2, + "column": 4, + "line": 3, }, }, - "name": "a", + "name": "instanceMethod", "range": Array [ - 26, - 27, + 28, + 42, ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 23, + "line": 3, }, "start": Object { "column": 4, @@ -58946,92 +59320,56 @@ Object { }, "range": Array [ 14, - 28, + 47, ], - "static": true, - "type": "ClassProperty", - "value": null, - }, - Object { - "computed": false, - "decorators": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "name": "qux", - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - }, + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 8, + "column": 23, "line": 3, }, "start": Object { - "column": 4, + "column": 21, "line": 3, }, }, "range": Array [ - 33, - 37, + 45, + 47, ], - "type": "Decorator", + "type": "BlockStatement", }, - ], - "key": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 12, - "line": 4, + "column": 23, + "line": 3, }, "start": Object { - "column": 11, - "line": 4, + "column": 18, + "line": 3, }, }, - "name": "b", + "params": Array [], "range": Array [ - 49, - 50, + 42, + 47, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 3, - }, + "type": "FunctionExpression", }, - "range": Array [ - 33, - 51, - ], - "static": true, - "type": "ClassProperty", - "value": null, }, ], "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 4, }, "start": Object { "column": 8, @@ -59040,7 +59378,7 @@ Object { }, "range": Array [ 8, - 53, + 49, ], "type": "ClassBody", }, @@ -59055,7 +59393,7 @@ Object { "line": 1, }, }, - "name": "C", + "name": "A", "range": Array [ 6, 7, @@ -59065,7 +59403,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 4, }, "start": Object { "column": 0, @@ -59074,7 +59412,7 @@ Object { }, "range": Array [ 0, - 53, + 49, ], "superClass": null, "type": "ClassDeclaration", @@ -59083,7 +59421,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 5, }, "start": Object { "column": 0, @@ -59092,7 +59430,7 @@ Object { }, "range": Array [ 0, - 54, + 50, ], "sourceType": "script", "tokens": Array [ @@ -59130,7 +59468,7 @@ Object { 7, ], "type": "Identifier", - "value": "C", + "value": "A", }, Object { "loc": Object { @@ -59171,7 +59509,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 13, "line": 2, }, "start": Object { @@ -59181,169 +59519,115 @@ Object { }, "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, + 23, ], "type": "Identifier", - "value": "a", + "value": "onlyRead", }, Object { "loc": Object { "end": Object { "column": 18, - "line": 2, + "line": 3, }, "start": Object { - "column": 17, - "line": 2, + "column": 4, + "line": 3, }, }, "range": Array [ - 27, 28, + 42, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "instanceMethod", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 19, "line": 3, }, "start": Object { - "column": 4, + "column": 18, "line": 3, }, }, "range": Array [ - 33, - 34, + 42, + 43, ], "type": "Punctuator", - "value": "@", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 20, "line": 3, }, "start": Object { - "column": 5, + "column": 19, "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, + 43, + 44, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 4, + "column": 22, + "line": 3, }, "start": Object { - "column": 11, - "line": 4, + "column": 21, + "line": 3, }, }, "range": Array [ - 49, - 50, + 45, + 46, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 23, + "line": 3, }, "start": Object { - "column": 12, - "line": 4, + "column": 22, + "line": 3, }, }, "range": Array [ - 50, - 51, + 46, + 47, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 4, }, "start": Object { "column": 0, - "line": 5, + "line": 4, }, }, "range": Array [ - 52, - 53, + 48, + 49, ], "type": "Punctuator", "value": "}", @@ -59353,32 +59637,148 @@ Object { } `; -exports[`typescript fixtures/errorRecovery/class-empty-extends.src 1`] = ` +exports[`typescript fixtures/decorators/method-decorators/method-decorator-static-member.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [], + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "Foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 18, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "name": "staticMethod", + "range": Array [ + 30, + 42, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 47, + ], + "static": true, + "type": "MethodDefinition", + "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", + }, + "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, + ], + "type": "FunctionExpression", + }, + }, + ], "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 4, }, "start": Object { - "column": 18, + "column": 8, "line": 1, }, }, "range": Array [ - 18, - 22, + 8, + 49, ], "type": "ClassBody", }, "id": Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { @@ -59386,17 +59786,17 @@ Object { "line": 1, }, }, - "name": "Foo", + "name": "D", "range": Array [ 6, - 9, + 7, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 4, }, "start": Object { "column": 0, @@ -59405,7 +59805,7 @@ Object { }, "range": Array [ 0, - 22, + 49, ], "superClass": null, "type": "ClassDeclaration", @@ -59414,7 +59814,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 5, }, "start": Object { "column": 0, @@ -59423,7 +59823,7 @@ Object { }, "range": Array [ 0, - 23, + 50, ], "sourceType": "script", "tokens": Array [ @@ -59448,7 +59848,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { @@ -59458,43 +59858,25 @@ Object { }, "range": Array [ 6, - 9, + 7, ], "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", + "value": "D", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 9, "line": 1, }, "start": Object { - "column": 18, + "column": 8, "line": 1, }, }, "range": Array [ - 18, - 19, + 8, + 9, ], "type": "Punctuator", "value": "{", @@ -59502,169 +59884,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 5, + "line": 2, }, "start": Object { - "column": 0, - "line": 3, + "column": 4, + "line": 2, }, }, "range": Array [ - 21, - 22, + 14, + 15, ], "type": "Punctuator", - "value": "}", + "value": "@", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/errorRecovery/class-empty-extends-implements.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 37, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - }, - "implements": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "Bar", - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "ClassImplements", - }, - ], "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 8, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "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, + "line": 2, }, }, "range": Array [ - 6, - 9, + 15, + 18, ], "type": "Identifier", "value": "Foo", @@ -59672,312 +59920,125 @@ Object { 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, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 18, - 28, + 23, + 29, ], "type": "Keyword", - "value": "implements", + "value": "static", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 23, + "line": 3, }, "start": Object { - "column": 29, - "line": 1, + "column": 11, + "line": 3, }, }, "range": Array [ - 29, - 32, + 30, + 42, ], "type": "Identifier", - "value": "Bar", + "value": "staticMethod", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 24, + "line": 3, }, "start": Object { - "column": 33, - "line": 1, + "column": 23, + "line": 3, }, }, "range": Array [ - 33, - 34, + 42, + 43, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 25, "line": 3, }, "start": Object { - "column": 0, + "column": 24, "line": 3, }, }, "range": Array [ - 36, - 37, + 43, + 44, ], "type": "Punctuator", - "value": "}", + "value": ")", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/errorRecovery/class-extends-empty-implements.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 37, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - }, - "implements": Array [], "loc": Object { "end": Object { - "column": 1, + "column": 27, "line": 3, }, "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 37, - ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "Bar", - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - }, - "type": "ClassDeclaration", - }, - ], - "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, + "column": 26, + "line": 3, }, }, "range": Array [ - 22, - 32, + 45, + 46, ], - "type": "Keyword", - "value": "implements", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 28, + "line": 3, }, "start": Object { - "column": 33, - "line": 1, + "column": 27, + "line": 3, }, }, "range": Array [ - 33, - 34, + 46, + 47, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 4, }, "start": Object { "column": 0, - "line": 3, + "line": 4, }, }, "range": Array [ - 36, - 37, + 48, + 49, ], "type": "Punctuator", "value": "}", @@ -59987,87 +60048,435 @@ Object { } `; -exports[`typescript fixtures/errorRecovery/decorator-on-enum-declaration.src 1`] = ` +exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-constructor.src 1`] = ` Object { "body": Array [ Object { - "decorators": Array [ - Object { - "expression": Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "constructor", + "range": Array [ + 20, + 31, + ], + "type": "Identifier", + }, + "kind": "constructor", "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 1, - "line": 1, + "column": 4, + "line": 2, }, }, - "name": "dec", "range": Array [ - 1, - 4, + 20, + 113, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "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", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 3, + }, + }, + "name": "title", + "range": Array [ + 86, + 91, + ], + "type": "Identifier", + }, + "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 { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "name": "config", + "range": Array [ + 94, + 100, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 3, + }, + }, + "name": "title", + "range": Array [ + 101, + 106, + ], + "type": "Identifier", + }, + "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", + }, + "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 { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "name": "APP_CONFIG", + "range": Array [ + 40, + 50, + ], + "type": "Identifier", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "name": "Inject", + "range": Array [ + 33, + 39, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 33, + 51, + ], + "type": "CallExpression", + }, + "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", + "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 { + "loc": Object { + "end": Object { + "column": 53, + "line": 2, + }, + "start": Object { + "column": 44, + "line": 2, + }, + }, + "name": "AppConfig", + "range": Array [ + 60, + 69, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "range": Array [ + 31, + 113, + ], + "type": "FunctionExpression", }, }, - "range": Array [ - 0, - 4, - ], - "type": "Decorator", + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 1, + }, }, - ], + "range": Array [ + 14, + 115, + ], + "type": "ClassBody", + }, "id": Object { "loc": Object { "end": Object { - "column": 11, + "column": 13, "line": 1, }, "start": Object { - "column": 10, + "column": 6, "line": 1, }, }, - "name": "E", + "name": "Service", "range": Array [ - 10, - 11, + 6, + 13, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { "column": 0, "line": 1, }, }, - "members": Array [], "range": Array [ 0, - 14, + 115, ], - "type": "TSEnumDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 0, + "line": 6, }, "start": Object { "column": 0, @@ -60076,14 +60485,14 @@ Object { }, "range": Array [ 0, - 14, + 116, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 5, "line": 1, }, "start": Object { @@ -60093,357 +60502,259 @@ Object { }, "range": Array [ 0, - 1, + 5, ], - "type": "Punctuator", - "value": "@", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 13, "line": 1, }, "start": Object { - "column": 1, + "column": 6, "line": 1, }, }, "range": Array [ - 1, - 4, + 6, + 13, ], "type": "Identifier", - "value": "dec", + "value": "Service", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 15, "line": 1, }, "start": Object { - "column": 5, + "column": 14, "line": 1, }, }, "range": Array [ - 5, - 9, + 14, + 15, ], - "type": "Keyword", - "value": "enum", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 10, - 11, + 20, + 31, ], "type": "Identifier", - "value": "E", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 12, - 13, + 31, + 32, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 13, - 14, + 32, + 33, ], "type": "Punctuator", - "value": "}", + "value": "@", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/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, - }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, }, - "range": Array [ - 20, - 22, - ], - "type": "TSInterfaceBody", }, - "decorators": Array [ - Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "deco", - "range": Array [ - 1, - 5, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 7, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 7, - ], - "type": "Decorator", - }, + "range": Array [ + 33, + 39, ], - "heritage": Array [], - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "M", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - }, + "type": "Identifier", + "value": "Inject", + }, + Object { "loc": Object { "end": Object { - "column": 14, + "column": 24, "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ - 0, - 22, + 39, + 40, ], - "type": "TSInterfaceDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "(", }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 1, + "column": 34, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 24, + "line": 2, }, }, "range": Array [ - 0, - 1, + 40, + 50, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "APP_CONFIG", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 35, + "line": 2, }, "start": Object { - "column": 1, - "line": 1, + "column": 34, + "line": 2, }, }, "range": Array [ - 1, - 5, + 50, + 51, ], - "type": "Identifier", - "value": "deco", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 42, + "line": 2, }, "start": Object { - "column": 5, - "line": 1, + "column": 36, + "line": 2, }, }, "range": Array [ - 5, - 6, + 52, + 58, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "config", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 43, + "line": 2, }, "start": Object { - "column": 6, - "line": 1, + "column": 42, + "line": 2, }, }, "range": Array [ - 6, - 7, + 58, + 59, ], "type": "Punctuator", - "value": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 53, "line": 2, }, "start": Object { - "column": 0, + "column": 44, "line": 2, }, }, "range": Array [ - 8, - 17, + 60, + 69, ], - "type": "Keyword", - "value": "interface", + "type": "Identifier", + "value": "AppConfig", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 54, "line": 2, }, "start": Object { - "column": 10, + "column": 53, "line": 2, }, }, "range": Array [ - 18, - 19, + 69, + 70, ], - "type": "Identifier", - "value": "M", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 56, "line": 2, }, "start": Object { - "column": 12, + "column": 55, "line": 2, }, }, "range": Array [ - 20, - 21, + 71, + 72, ], "type": "Punctuator", "value": "{", @@ -60451,450 +60762,439 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 12, + "line": 3, }, "start": Object { - "column": 13, - "line": 2, + "column": 8, + "line": 3, }, }, "range": Array [ - 21, - 22, + 81, + 85, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "this", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/errorRecovery/empty-type-arguments.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "foo", - "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 { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - }, - "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", + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, }, + }, + "range": Array [ + 85, + 86, ], - "kind": "const", + "type": "Punctuator", + "value": ".", + }, + Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 18, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 13, + "line": 3, }, }, "range": Array [ - 0, - 16, + 86, + 91, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "title", }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 20, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 19, + "line": 3, }, }, "range": Array [ - 0, - 5, + 92, + 93, ], - "type": "Keyword", - "value": "const", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 27, + "line": 3, }, "start": Object { - "column": 6, - "line": 1, + "column": 21, + "line": 3, }, }, "range": Array [ - 6, - 9, + 94, + 100, ], "type": "Identifier", - "value": "foo", + "value": "config", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 28, + "line": 3, }, "start": Object { - "column": 9, - "line": 1, + "column": 27, + "line": 3, }, }, "range": Array [ - 9, - 10, + 100, + 101, ], "type": "Punctuator", - "value": ":", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 33, + "line": 3, }, "start": Object { - "column": 11, - "line": 1, + "column": 28, + "line": 3, }, }, "range": Array [ - 11, - 14, + 101, + 106, ], "type": "Identifier", - "value": "Foo", + "value": "title", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 34, + "line": 3, }, "start": Object { - "column": 14, - "line": 1, + "column": 33, + "line": 3, }, }, "range": Array [ - 14, - 15, + 106, + 107, ], "type": "Punctuator", - "value": "<", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 15, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 15, - 16, + 112, + 113, ], "type": "Punctuator", - "value": ">", + "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", } `; -exports[`typescript fixtures/errorRecovery/enum-with-keywords.src 1`] = ` +exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 69, - "line": 1, - }, - "start": Object { - "column": 68, - "line": 1, + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 16, + 19, + ], + "type": "Identifier", }, - }, - "name": "X", - "range": Array [ - 68, - 69, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 72, - "line": 1, - }, - "start": Object { - "column": 63, - "line": 1, - }, - }, - "members": Array [], - "modifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "TSPrivateKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 21, - ], - "type": "TSPublicKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 31, - ], - "type": "TSProtectedKeyword", - }, - Object { + "kind": "method", "loc": Object { "end": Object { "column": 38, - "line": 1, + "line": 2, }, "start": Object { - "column": 32, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 32, - 38, + 16, + 50, ], - "type": "TSStaticKeyword", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 1, + "static": false, + "type": "MethodDefinition", + "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", }, - "start": Object { - "column": 39, - "line": 1, + "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 { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "special", + "range": Array [ + 21, + 28, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 21, + 34, + ], + "type": "CallExpression", + }, + "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", + "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, + ], + "type": "FunctionExpression", }, - "range": Array [ - 39, - 47, - ], - "type": "TSReadonlyKeyword", }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 48, - "line": 1, - }, - }, - "range": Array [ - 48, - 56, - ], - "type": "TSAbstractKeyword", + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, }, - Object { - "loc": Object { - "end": Object { - "column": 62, - "line": 1, - }, - "start": Object { - "column": 57, - "line": 1, - }, - }, - "range": Array [ - 57, - 62, - ], - "type": "TSAsyncKeyword", + "start": Object { + "column": 10, + "line": 1, }, + }, + "range": Array [ + 10, + 52, ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", "range": Array [ - 63, - 72, + 6, + 9, ], - "type": "TSEnumDeclaration", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 72, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -60903,17 +61203,16 @@ Object { }, "range": Array [ 0, - 72, + 52, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 72, - "line": 1, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -60922,14 +61221,14 @@ Object { }, "range": Array [ 0, - 72, + 53, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 5, "line": 1, }, "start": Object { @@ -60939,205 +61238,295 @@ Object { }, "range": Array [ 0, - 6, + 5, ], "type": "Keyword", - "value": "export", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 9, "line": 1, }, "start": Object { - "column": 7, + "column": 6, "line": 1, }, }, "range": Array [ - 7, - 14, + 6, + 9, ], - "type": "Keyword", - "value": "private", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 10, "line": 1, }, }, "range": Array [ - 15, - 21, + 10, + 11, ], - "type": "Keyword", - "value": "public", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 22, - 31, + 16, + 19, ], - "type": "Keyword", - "value": "protected", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 32, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 32, - 38, + 19, + 20, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 39, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 39, - 47, + 20, + 21, ], - "type": "Identifier", - "value": "readonly", + "type": "Punctuator", + "value": "@", }, Object { "loc": Object { "end": Object { - "column": 56, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 48, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ - 48, - 56, + 21, + 28, ], "type": "Identifier", - "value": "abstract", + "value": "special", }, Object { "loc": Object { "end": Object { - "column": 62, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 57, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 57, - 62, + 28, + 29, ], - "type": "Identifier", - "value": "async", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 67, - "line": 1, + "column": 21, + "line": 2, }, "start": Object { - "column": 63, - "line": 1, + "column": 17, + "line": 2, }, }, "range": Array [ - 63, - 67, + 29, + 33, ], - "type": "Keyword", - "value": "enum", + "type": "Boolean", + "value": "true", }, Object { "loc": Object { "end": Object { - "column": 69, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 68, - "line": 1, + "column": 21, + "line": 2, }, }, "range": Array [ - 68, - 69, + 33, + 34, ], - "type": "Identifier", - "value": "X", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 71, - "line": 1, + "column": 26, + "line": 2, }, "start": Object { - "column": 70, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ - 70, - 71, + 35, + 38, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 72, - "line": 1, + "column": 27, + "line": 2, }, "start": Object { - "column": 71, - "line": 1, + "column": 26, + "line": 2, }, }, "range": Array [ - 71, - 72, + 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": "}", @@ -61147,44 +61536,250 @@ Object { } `; -exports[`typescript fixtures/errorRecovery/interface-empty-extends.src 1`] = ` +exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [], + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 29, + 32, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 45, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 63, + ], + "static": true, + "type": "MethodDefinition", + "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", + }, + "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 { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "special", + "range": Array [ + 34, + 41, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 34, + 47, + ], + "type": "CallExpression", + }, + "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", + "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, + ], + "type": "FunctionExpression", + }, + }, + ], "loc": Object { "end": Object { "column": 1, "line": 3, }, "start": Object { - "column": 22, + "column": 16, "line": 1, }, }, "range": Array [ - 22, - 26, + 16, + 65, ], - "type": "TSInterfaceBody", + "type": "ClassBody", }, - "heritage": Array [], "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 1, }, "start": Object { - "column": 10, + "column": 6, "line": 1, }, }, - "name": "Foo", + "name": "StaticFoo", "range": Array [ - 10, - 13, + 6, + 15, ], "type": "Identifier", }, @@ -61200,9 +61795,10 @@ Object { }, "range": Array [ 0, - 26, + 65, ], - "type": "TSInterfaceDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { @@ -61217,14 +61813,14 @@ Object { }, "range": Array [ 0, - 27, + 66, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 1, }, "start": Object { @@ -61234,119 +61830,334 @@ Object { }, "range": Array [ 0, - 9, + 5, ], "type": "Keyword", - "value": "interface", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 1, }, "start": Object { - "column": 10, + "column": 6, "line": 1, }, }, "range": Array [ - 10, - 13, + 6, + 15, ], "type": "Identifier", - "value": "Foo", + "value": "StaticFoo", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 17, "line": 1, }, "start": Object { - "column": 14, + "column": 16, "line": 1, }, }, "range": Array [ - 14, - 21, + 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": "extends", + "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": 1, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 22, - 23, + 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": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 28, + "line": 2, }, "start": Object { - "column": 0, - "line": 3, + "column": 24, + "line": 2, }, }, "range": Array [ - 25, - 26, + 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": "}", + "value": ")", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/errorRecovery/interface-property-modifiers.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "initializer": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 34, - 37, - ], - "raw": "'a'", - "type": "Literal", - "value": "a", - }, + "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", +} +`; + +exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-instance-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 2, }, "start": Object { @@ -61354,17 +62165,18 @@ Object { "line": 2, }, }, - "name": "bar", + "name": "greet", "range": Array [ 20, - 23, + 25, ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 5, + "line": 4, }, "start": Object { "column": 4, @@ -61373,1917 +62185,16952 @@ Object { }, "range": Array [ 20, - 38, + 95, ], - "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 { + "static": false, + "type": "MethodDefinition", + "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 { + "loc": Object { + "end": Object { + "column": 30, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "name": "name", + "range": Array [ + 78, + 82, + ], + "type": "Identifier", + }, + "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": 15, - "line": 2, + "column": 5, + "line": 4, }, "start": Object { - "column": 9, + "column": 34, "line": 2, }, }, "range": Array [ - 25, - 31, + 50, + 95, ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "accessibility": "public", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "name": "a", - "range": Array [ - 50, - 51, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, + "type": "BlockStatement", }, - }, - "range": Array [ - 43, - 60, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 20, - "line": 3, + "column": 5, + "line": 4, }, "start": Object { - "column": 12, - "line": 3, + "column": 9, + "line": 2, }, }, - "range": Array [ - 51, - 59, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, + "params": Array [ + Object { + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "required", + "range": Array [ + 27, + 35, + ], + "type": "Identifier", + }, + "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, + }, }, - "start": Object { - "column": 14, - "line": 3, + "name": "name", + "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 [ - 53, - 59, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "accessibility": "private", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 12, - "line": 4, - }, - }, - "name": "b", + ], "range": Array [ - 73, - 74, + 25, + 95, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 65, - 83, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 74, - 82, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 76, - 82, - ], - "type": "TSStringKeyword", - }, + "type": "FunctionExpression", }, }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 97, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Greeter", + "range": Array [ + 6, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 97, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-static-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ Object { - "accessibility": "protected", "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 15, - "line": 5, + "column": 16, + "line": 2, }, "start": Object { - "column": 14, - "line": 5, + "column": 11, + "line": 2, }, }, - "name": "c", + "name": "greet", "range": Array [ - 98, - 99, + 33, + 38, ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { - "column": 24, - "line": 5, + "column": 5, + "line": 4, }, "start": Object { "column": 4, - "line": 5, + "line": 2, }, }, "range": Array [ - 88, + 26, 108, ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, - }, - }, - "range": Array [ - 99, - 107, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 101, - 107, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 6, - }, - }, - "name": "d", - "range": Array [ - 120, - 121, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 113, - 130, - ], "static": true, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 121, - 129, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 6, - }, - "start": Object { - "column": 14, - "line": 6, - }, - }, - "range": Array [ - 123, - 129, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "computed": false, - "export": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "name": "e", - "range": Array [ - 142, - 143, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 135, - 152, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, - }, - }, - "range": Array [ - 143, - 151, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 7, - }, - "start": Object { - "column": 14, - "line": 7, + "type": "MethodDefinition", + "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 { + "loc": Object { + "end": Object { + "column": 30, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "name": "name", + "range": Array [ + 91, + 95, + ], + "type": "Identifier", + }, + "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", }, - }, - "range": Array [ - 145, - 151, ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 13, - "line": 8, - }, - }, - "name": "f", - "range": Array [ - 166, - 167, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 157, - 176, - ], - "readonly": true, - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 8, - }, - "start": Object { - "column": 14, - "line": 8, - }, - }, - "range": Array [ - 167, - 175, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 22, - "line": 8, + "column": 5, + "line": 4, }, "start": Object { - "column": 16, - "line": 8, + "column": 41, + "line": 2, }, }, "range": Array [ - 169, - 175, + 63, + 108, ], - "type": "TSStringKeyword", + "type": "BlockStatement", }, - }, - }, - Object { - "accessibility": "public", - "index": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 23, - "line": 10, + "column": 5, + "line": 4, }, "start": Object { - "column": 12, - "line": 10, + "column": 16, + "line": 2, }, }, - "name": "baz", - "range": Array [ - 190, - 201, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 10, - }, - "start": Object { - "column": 15, - "line": 10, - }, - }, - "range": Array [ - 193, - 201, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "params": Array [ + Object { + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "name": "required", + "range": Array [ + 40, + 48, + ], + "type": "Identifier", + }, + "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": 23, - "line": 10, + "column": 39, + "line": 2, }, "start": Object { - "column": 17, - "line": 10, + "column": 27, + "line": 2, }, }, + "name": "name", "range": Array [ - 195, - 201, + 49, + 61, ], - "type": "TSStringKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 10, - }, - "start": Object { - "column": 4, - "line": 10, - }, - }, - "range": Array [ - 182, - 211, - ], - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 10, - }, - "start": Object { - "column": 24, - "line": 10, + "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 [ - 202, - 210, + 38, + 108, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 10, - }, - "start": Object { - "column": 26, - "line": 10, - }, - }, - "range": Array [ - 204, - 210, - ], - "type": "TSStringKeyword", - }, + "type": "FunctionExpression", }, }, - Object { - "accessibility": "private", - "index": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 11, - }, - "start": Object { - "column": 13, - "line": 11, - }, - }, - "name": "baz", - "range": Array [ - 225, - 236, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 11, - }, - "start": Object { - "column": 16, - "line": 11, - }, - }, - "range": Array [ - 228, - 236, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 11, - }, - "start": Object { - "column": 18, - "line": 11, - }, - }, - "range": Array [ - 230, - 236, - ], - "type": "TSStringKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 34, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "range": Array [ - 216, - 246, - ], - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 11, - }, - "start": Object { - "column": 25, - "line": 11, - }, - }, - "range": Array [ - 237, - 245, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 11, - }, - "start": Object { - "column": 27, - "line": 11, - }, - }, - "range": Array [ - 239, - 245, - ], - "type": "TSStringKeyword", - }, - }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, }, - Object { - "accessibility": "protected", - "index": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 12, - }, - "start": Object { - "column": 15, - "line": 12, - }, - }, - "name": "baz", - "range": Array [ - 262, - 273, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 12, - }, - "start": Object { - "column": 18, - "line": 12, - }, - }, - "range": Array [ - 265, - 273, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 12, - }, - "start": Object { - "column": 20, - "line": 12, - }, - }, - "range": Array [ - 267, - 273, - ], - "type": "TSStringKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 12, - }, - "start": Object { - "column": 4, - "line": 12, - }, - }, - "range": Array [ - 251, - 283, - ], - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 12, - }, - "start": Object { - "column": 27, - "line": 12, - }, - }, - "range": Array [ - 274, - 282, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 12, - }, - "start": Object { - "column": 29, - "line": 12, - }, - }, - "range": Array [ - 276, - 282, - ], - "type": "TSStringKeyword", - }, - }, + "start": Object { + "column": 20, + "line": 1, }, - Object { - "index": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 13, - }, - "start": Object { - "column": 12, - "line": 13, - }, - }, - "name": "baz", - "range": Array [ - 296, - 307, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 13, - }, - "start": Object { - "column": 15, - "line": 13, - }, - }, - "range": Array [ - 299, - 307, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 13, - }, - "start": Object { - "column": 17, - "line": 13, - }, - }, - "range": Array [ - 301, - 307, - ], - "type": "TSStringKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 13, - }, - "start": Object { - "column": 4, - "line": 13, - }, - }, - "range": Array [ - 288, - 317, - ], - "static": true, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 13, - }, - "start": Object { - "column": 24, - "line": 13, - }, - }, - "range": Array [ - 308, - 316, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 13, - }, - "start": Object { - "column": 26, - "line": 13, - }, - }, - "range": Array [ - 310, - 316, - ], - "type": "TSStringKeyword", - }, - }, + }, + "range": Array [ + 20, + 110, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, }, - Object { - "export": true, - "index": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 14, - }, - "start": Object { - "column": 12, - "line": 14, - }, - }, - "name": "baz", - "range": Array [ - 330, - 341, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 14, - }, - "start": Object { - "column": 15, - "line": 14, - }, - }, - "range": Array [ - 333, - 341, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 14, - }, - "start": Object { - "column": 17, - "line": 14, - }, - }, - "range": Array [ - 335, - 341, - ], - "type": "TSStringKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 14, - }, - "start": Object { - "column": 4, - "line": 14, - }, - }, - "range": Array [ - 322, - 351, - ], - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 14, - }, - "start": Object { - "column": 24, - "line": 14, - }, - }, - "range": Array [ - 342, - 350, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 14, - }, - "start": Object { - "column": 26, - "line": 14, - }, - }, - "range": Array [ - 344, - 350, - ], - "type": "TSStringKeyword", - }, - }, + "start": Object { + "column": 6, + "line": 1, }, - Object { - "index": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 15, - }, - "start": Object { - "column": 14, - "line": 15, - }, - }, - "name": "baz", - "range": Array [ - 366, - 377, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 15, - }, - "start": Object { - "column": 17, - "line": 15, - }, - }, - "range": Array [ - 369, - 377, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 15, - }, - "start": Object { - "column": 19, - "line": 15, - }, - }, - "range": Array [ - 371, - 377, - ], - "type": "TSStringKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 15, - }, - "start": Object { - "column": 4, - "line": 15, + }, + "name": "StaticGreeter", + "range": Array [ + 6, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 110, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/decorators/property-decorators/property-decorator-factory-instance-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "Input", + "range": Array [ + 27, + 32, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 27, + 34, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 26, + 34, + ], + "type": "Decorator", }, - }, - "range": Array [ - 356, - 387, ], - "readonly": true, - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": Object { + "key": Object { "loc": Object { "end": Object { - "column": 34, - "line": 15, + "column": 17, + "line": 2, }, "start": Object { - "column": 26, - "line": 15, + "column": 13, + "line": 2, }, }, + "name": "data", "range": Array [ - 378, - 386, + 35, + 39, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 26, + 40, + ], + "static": false, + "type": "ClassProperty", + "value": null, + }, + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "name": "Output", + "range": Array [ + 46, + 52, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "range": Array [ + 46, + 54, + ], + "type": "CallExpression", + }, "loc": Object { "end": Object { - "column": 34, - "line": 15, + "column": 13, + "line": 3, }, "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 45, + 54, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "name": "click", + "range": Array [ + 59, + 64, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 45, + 86, + ], + "static": false, + "type": "ClassProperty", + "value": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { "column": 28, - "line": 15, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, }, }, + "name": "EventEmitter", "range": Array [ - 380, - 386, + 71, + 83, ], - "type": "TSStringKeyword", + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 4, + }, + "start": Object { + "column": 12, + "line": 4, + }, }, + "range": Array [ + 67, + 85, + ], + "type": "NewExpression", }, }, - Object { - "accessibility": "public", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 17, - }, - "start": Object { - "column": 11, - "line": 17, - }, - }, - "name": "g", - "range": Array [ - 400, - 401, - ], - "type": "Identifier", + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 88, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "SomeComponent", + "range": Array [ + 6, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 88, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/decorators/property-decorators/property-decorator-factory-static-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": 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 { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "configurable", + "range": Array [ + 15, + 27, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 33, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 33, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "name": "prop1", + "range": Array [ + 41, + 46, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 47, + ], + "static": true, + "type": "ClassProperty", + "value": null, + }, + Object { + "computed": 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 { + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 5, + "line": 4, + }, + }, + "name": "configurable", + "range": Array [ + 54, + 66, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 4, + }, + "start": Object { + "column": 5, + "line": 4, + }, + }, + "range": Array [ + 54, + 73, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 53, + 73, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 5, + }, + "start": Object { + "column": 11, + "line": 5, + }, + }, + "name": "prop2", + "range": Array [ + 85, + 90, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 53, + 91, + ], + "static": true, + "type": "ClassProperty", + "value": null, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 93, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 93, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/decorators/property-decorators/property-decorator-instance-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 18, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "x", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 21, + ], + "static": false, + "type": "ClassProperty", + "value": null, + }, + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 26, + 30, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "name": "y", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 6, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 26, + 37, + ], + "static": false, + "type": "ClassProperty", + "value": null, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 39, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "B", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/decorators/property-decorators/property-decorator-static-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 18, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 28, + ], + "static": true, + "type": "ClassProperty", + "value": null, + }, + Object { + "computed": false, + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "name": "qux", + "range": Array [ + 34, + 37, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 33, + 37, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 4, + }, + "start": Object { + "column": 11, + "line": 4, + }, + }, + "name": "b", + "range": Array [ + 49, + 50, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 33, + 51, + ], + "static": true, + "type": "ClassProperty", + "value": null, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 53, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "C", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 53, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/errorRecovery/class-empty-extends.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 22, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/errorRecovery/class-empty-extends-implements.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 37, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "implements": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "name": "Bar", + "range": Array [ + 29, + 32, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 32, + ], + "type": "ClassImplements", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/errorRecovery/class-extends-empty-implements.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 37, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "implements": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "Bar", + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + }, + "type": "ClassDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/errorRecovery/decorator-on-enum-declaration.src 1`] = ` +Object { + "body": Array [ + Object { + "decorators": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "name": "dec", + "range": Array [ + 1, + 4, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Decorator", + }, + ], + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "E", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "members": Array [], + "range": Array [ + 0, + 14, + ], + "type": "TSEnumDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/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", + }, + "decorators": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "name": "deco", + "range": Array [ + 1, + 5, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 7, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Decorator", + }, + ], + "heritage": Array [], + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "name": "M", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/errorRecovery/empty-type-arguments.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "foo", + "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 { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 11, + 14, + ], + "type": "Identifier", + }, + "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", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "type": "VariableDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/errorRecovery/enum-with-keywords.src 1`] = ` +Object { + "body": Array [ + Object { + "declaration": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 69, + "line": 1, + }, + "start": Object { + "column": 68, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 68, + 69, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 72, + "line": 1, + }, + "start": Object { + "column": 63, + "line": 1, + }, + }, + "members": Array [], + "modifiers": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 14, + ], + "type": "TSPrivateKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 21, + ], + "type": "TSPublicKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 31, + ], + "type": "TSProtectedKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "TSStaticKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 47, + ], + "type": "TSReadonlyKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 48, + "line": 1, + }, + }, + "range": Array [ + 48, + 56, + ], + "type": "TSAbstractKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 62, + "line": 1, + }, + "start": Object { + "column": 57, + "line": 1, + }, + }, + "range": Array [ + 57, + 62, + ], + "type": "TSAsyncKeyword", + }, + ], + "range": Array [ + 63, + 72, + ], + "type": "TSEnumDeclaration", + }, + "loc": Object { + "end": Object { + "column": 72, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 72, + ], + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/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", + }, + "heritage": Array [], + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-property-modifiers.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "initializer": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 37, + ], + "raw": "'a'", + "type": "Literal", + "value": "a", + }, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 20, + 23, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 38, + ], + "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": "TSStringKeyword", + }, + }, + }, + Object { + "accessibility": "public", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "name": "a", + "range": Array [ + 50, + 51, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 43, + 60, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 51, + 59, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 53, + 59, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "accessibility": "private", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 12, + "line": 4, + }, + }, + "name": "b", + "range": Array [ + 73, + 74, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 65, + 83, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 4, + }, + }, + "range": Array [ + 74, + 82, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 4, + }, + }, + "range": Array [ + 76, + 82, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "accessibility": "protected", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "name": "c", + "range": Array [ + 98, + 99, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 88, + 108, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 5, + }, + "start": Object { + "column": 15, + "line": 5, + }, + }, + "range": Array [ + 99, + 107, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 5, + }, + "start": Object { + "column": 17, + "line": 5, + }, + }, + "range": Array [ + 101, + 107, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 6, + }, + "start": Object { + "column": 11, + "line": 6, + }, + }, + "name": "d", + "range": Array [ + 120, + 121, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 113, + 130, + ], + "static": true, + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 6, + }, + "start": Object { + "column": 12, + "line": 6, + }, + }, + "range": Array [ + 121, + 129, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 6, + }, + "start": Object { + "column": 14, + "line": 6, + }, + }, + "range": Array [ + 123, + 129, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "computed": false, + "export": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 7, + }, + "start": Object { + "column": 11, + "line": 7, + }, + }, + "name": "e", + "range": Array [ + 142, + 143, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "range": Array [ + 135, + 152, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 7, + }, + "start": Object { + "column": 12, + "line": 7, + }, + }, + "range": Array [ + 143, + 151, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 7, + }, + "start": Object { + "column": 14, + "line": 7, + }, + }, + "range": Array [ + 145, + 151, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 8, + }, + "start": Object { + "column": 13, + "line": 8, + }, + }, + "name": "f", + "range": Array [ + 166, + 167, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 157, + 176, + ], + "readonly": true, + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 8, + }, + "start": Object { + "column": 14, + "line": 8, + }, + }, + "range": Array [ + 167, + 175, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 8, + }, + "start": Object { + "column": 16, + "line": 8, + }, + }, + "range": Array [ + 169, + 175, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "accessibility": "public", + "index": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 10, + }, + "start": Object { + "column": 12, + "line": 10, + }, + }, + "name": "baz", + "range": Array [ + 190, + 201, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 10, + }, + "start": Object { + "column": 15, + "line": 10, + }, + }, + "range": Array [ + 193, + 201, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 10, + }, + "start": Object { + "column": 17, + "line": 10, + }, + }, + "range": Array [ + 195, + 201, + ], + "type": "TSStringKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 10, + }, + "start": Object { + "column": 4, + "line": 10, + }, + }, + "range": Array [ + 182, + 211, + ], + "static": false, + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 10, + }, + "start": Object { + "column": 24, + "line": 10, + }, + }, + "range": Array [ + 202, + 210, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 10, + }, + "start": Object { + "column": 26, + "line": 10, + }, + }, + "range": Array [ + 204, + 210, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "accessibility": "private", + "index": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 11, + }, + "start": Object { + "column": 13, + "line": 11, + }, + }, + "name": "baz", + "range": Array [ + 225, + 236, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 11, + }, + "start": Object { + "column": 16, + "line": 11, + }, + }, + "range": Array [ + 228, + 236, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 11, + }, + "start": Object { + "column": 18, + "line": 11, + }, + }, + "range": Array [ + 230, + 236, + ], + "type": "TSStringKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 34, + "line": 11, + }, + "start": Object { + "column": 4, + "line": 11, + }, + }, + "range": Array [ + 216, + 246, + ], + "static": false, + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 11, + }, + "start": Object { + "column": 25, + "line": 11, + }, + }, + "range": Array [ + 237, + 245, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 11, + }, + "start": Object { + "column": 27, + "line": 11, + }, + }, + "range": Array [ + 239, + 245, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "accessibility": "protected", + "index": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 12, + }, + "start": Object { + "column": 15, + "line": 12, + }, + }, + "name": "baz", + "range": Array [ + 262, + 273, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 12, + }, + "start": Object { + "column": 18, + "line": 12, + }, + }, + "range": Array [ + 265, + 273, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 12, + }, + "start": Object { + "column": 20, + "line": 12, + }, + }, + "range": Array [ + 267, + 273, + ], + "type": "TSStringKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 36, + "line": 12, + }, + "start": Object { + "column": 4, + "line": 12, + }, + }, + "range": Array [ + 251, + 283, + ], + "static": false, + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 12, + }, + "start": Object { + "column": 27, + "line": 12, + }, + }, + "range": Array [ + 274, + 282, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 12, + }, + "start": Object { + "column": 29, + "line": 12, + }, + }, + "range": Array [ + 276, + 282, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "index": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 13, + }, + "start": Object { + "column": 12, + "line": 13, + }, + }, + "name": "baz", + "range": Array [ + 296, + 307, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 13, + }, + "start": Object { + "column": 15, + "line": 13, + }, + }, + "range": Array [ + 299, + 307, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 13, + }, + "start": Object { + "column": 17, + "line": 13, + }, + }, + "range": Array [ + 301, + 307, + ], + "type": "TSStringKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 13, + }, + "start": Object { + "column": 4, + "line": 13, + }, + }, + "range": Array [ + 288, + 317, + ], + "static": true, + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 13, + }, + "start": Object { + "column": 24, + "line": 13, + }, + }, + "range": Array [ + 308, + 316, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 13, + }, + "start": Object { + "column": 26, + "line": 13, + }, + }, + "range": Array [ + 310, + 316, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "export": true, + "index": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 14, + }, + "start": Object { + "column": 12, + "line": 14, + }, + }, + "name": "baz", + "range": Array [ + 330, + 341, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 14, + }, + "start": Object { + "column": 15, + "line": 14, + }, + }, + "range": Array [ + 333, + 341, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 14, + }, + "start": Object { + "column": 17, + "line": 14, + }, + }, + "range": Array [ + 335, + 341, + ], + "type": "TSStringKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 14, + }, + "start": Object { + "column": 4, + "line": 14, + }, + }, + "range": Array [ + 322, + 351, + ], + "static": false, + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 14, + }, + "start": Object { + "column": 24, + "line": 14, + }, + }, + "range": Array [ + 342, + 350, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 14, + }, + "start": Object { + "column": 26, + "line": 14, + }, + }, + "range": Array [ + 344, + 350, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "index": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 15, + }, + "start": Object { + "column": 14, + "line": 15, + }, + }, + "name": "baz", + "range": Array [ + 366, + 377, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 15, + }, + "start": Object { + "column": 17, + "line": 15, + }, + }, + "range": Array [ + 369, + 377, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 15, + }, + "start": Object { + "column": 19, + "line": 15, + }, + }, + "range": Array [ + 371, + 377, + ], + "type": "TSStringKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 35, + "line": 15, + }, + "start": Object { + "column": 4, + "line": 15, + }, + }, + "range": Array [ + 356, + 387, + ], + "readonly": true, + "static": false, + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 15, + }, + "start": Object { + "column": 26, + "line": 15, + }, + }, + "range": Array [ + 378, + 386, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 15, + }, + "start": Object { + "column": 28, + "line": 15, + }, + }, + "range": Array [ + 380, + 386, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "accessibility": "public", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 17, + }, + "start": Object { + "column": 11, + "line": 17, + }, + }, + "name": "g", + "range": Array [ + 400, + 401, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 17, + }, + "start": Object { + "column": 4, + "line": 17, + }, + }, + "optional": false, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 17, + }, + "start": Object { + "column": 13, + "line": 17, + }, + }, + "name": "bar", + "range": Array [ + 402, + 413, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 17, + }, + "start": Object { + "column": 16, + "line": 17, + }, + }, + "range": Array [ + 405, + 413, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 17, + }, + "start": Object { + "column": 18, + "line": 17, + }, + }, + "range": Array [ + 407, + 413, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 393, + 421, + ], + "static": false, + "type": "TSMethodSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 17, + }, + "start": Object { + "column": 25, + "line": 17, + }, + }, + "range": Array [ + 414, + 420, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 17, + }, + "start": Object { + "column": 27, + "line": 17, + }, + }, + "range": Array [ + 416, + 420, + ], + "type": "TSVoidKeyword", + }, + }, + }, + Object { + "accessibility": "private", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 18, + }, + "start": Object { + "column": 12, + "line": 18, + }, + }, + "name": "h", + "range": Array [ + 434, + 435, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 18, + }, + "start": Object { + "column": 4, + "line": 18, + }, + }, + "optional": false, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 18, + }, + "start": Object { + "column": 14, + "line": 18, + }, + }, + "name": "bar", + "range": Array [ + 436, + 447, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 18, + }, + "start": Object { + "column": 17, + "line": 18, + }, + }, + "range": Array [ + 439, + 447, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 18, + }, + "start": Object { + "column": 19, + "line": 18, + }, + }, + "range": Array [ + 441, + 447, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 426, + 455, + ], + "static": false, + "type": "TSMethodSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 18, + }, + "start": Object { + "column": 26, + "line": 18, + }, + }, + "range": Array [ + 448, + 454, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 18, + }, + "start": Object { + "column": 28, + "line": 18, + }, + }, + "range": Array [ + 450, + 454, + ], + "type": "TSVoidKeyword", + }, + }, + }, + Object { + "accessibility": "protected", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 19, + }, + "start": Object { + "column": 14, + "line": 19, + }, + }, + "name": "i", + "range": Array [ + 470, + 471, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 35, + "line": 19, + }, + "start": Object { + "column": 4, + "line": 19, + }, + }, + "optional": false, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 19, + }, + "start": Object { + "column": 16, + "line": 19, + }, + }, + "name": "bar", + "range": Array [ + 472, + 483, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 19, + }, + "start": Object { + "column": 19, + "line": 19, + }, + }, + "range": Array [ + 475, + 483, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 19, + }, + "start": Object { + "column": 21, + "line": 19, + }, + }, + "range": Array [ + 477, + 483, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 460, + 491, + ], + "static": false, + "type": "TSMethodSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 19, + }, + "start": Object { + "column": 28, + "line": 19, + }, + }, + "range": Array [ + 484, + 490, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 19, + }, + "start": Object { + "column": 30, + "line": 19, + }, + }, + "range": Array [ + 486, + 490, + ], + "type": "TSVoidKeyword", + }, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 20, + }, + "start": Object { + "column": 11, + "line": 20, + }, + }, + "name": "j", + "range": Array [ + 503, + 504, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 20, + }, + "start": Object { + "column": 4, + "line": 20, + }, + }, + "optional": false, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 20, + }, + "start": Object { + "column": 13, + "line": 20, + }, + }, + "name": "bar", + "range": Array [ + 505, + 516, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 20, + }, + "start": Object { + "column": 16, + "line": 20, + }, + }, + "range": Array [ + 508, + 516, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 20, + }, + "start": Object { + "column": 18, + "line": 20, + }, + }, + "range": Array [ + 510, + 516, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 496, + 524, + ], + "static": true, + "type": "TSMethodSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 20, + }, + "start": Object { + "column": 25, + "line": 20, + }, + }, + "range": Array [ + 517, + 523, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 20, + }, + "start": Object { + "column": 27, + "line": 20, + }, + }, + "range": Array [ + 519, + 523, + ], + "type": "TSVoidKeyword", + }, + }, + }, + Object { + "computed": false, + "export": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 21, + }, + "start": Object { + "column": 11, + "line": 21, + }, + }, + "name": "k", + "range": Array [ + 536, + 537, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 21, + }, + "start": Object { + "column": 4, + "line": 21, + }, + }, + "optional": false, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 21, + }, + "start": Object { + "column": 13, + "line": 21, + }, + }, + "name": "bar", + "range": Array [ + 538, + 549, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 21, + }, + "start": Object { + "column": 16, + "line": 21, + }, + }, + "range": Array [ + 541, + 549, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 21, + }, + "start": Object { + "column": 18, + "line": 21, + }, + }, + "range": Array [ + 543, + 549, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 529, + 557, + ], + "static": false, + "type": "TSMethodSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 21, + }, + "start": Object { + "column": 25, + "line": 21, + }, + }, + "range": Array [ + 550, + 556, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 21, + }, + "start": Object { + "column": 27, + "line": 21, + }, + }, + "range": Array [ + 552, + 556, + ], + "type": "TSVoidKeyword", + }, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 22, + }, + "start": Object { + "column": 13, + "line": 22, + }, + }, + "name": "l", + "range": Array [ + 571, + 572, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 34, + "line": 22, + }, + "start": Object { + "column": 4, + "line": 22, + }, + }, + "optional": false, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 22, + }, + "start": Object { + "column": 15, + "line": 22, + }, + }, + "name": "bar", + "range": Array [ + 573, + 584, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 22, + }, + "start": Object { + "column": 18, + "line": 22, + }, + }, + "range": Array [ + 576, + 584, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 22, + }, + "start": Object { + "column": 20, + "line": 22, + }, + }, + "range": Array [ + 578, + 584, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 562, + 592, + ], + "readonly": true, + "static": false, + "type": "TSMethodSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 22, + }, + "start": Object { + "column": 27, + "line": 22, + }, + }, + "range": Array [ + 585, + 591, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 22, + }, + "start": Object { + "column": 29, + "line": 22, + }, + }, + "range": Array [ + 587, + 591, + ], + "type": "TSVoidKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 23, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 594, + ], + "type": "TSInterfaceBody", + }, + "heritage": Array [], + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 23, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 594, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 25, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 596, + ], + "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": "bar", + }, + 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": "string", + }, + 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": 21, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 37, + ], + "type": "String", + "value": "'a'", + }, + 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": 10, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 43, + 49, + ], + "type": "Keyword", + "value": "public", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Identifier", + "value": "a", + }, + 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": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "range": Array [ + 59, + 60, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 65, + 72, + ], + "type": "Keyword", + "value": "private", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 12, + "line": 4, + }, + }, + "range": Array [ + 73, + 74, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 4, + }, + }, + "range": Array [ + 74, + 75, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 4, + }, + }, + "range": Array [ + 76, + 82, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 4, + }, + "start": Object { + "column": 21, + "line": 4, + }, + }, + "range": Array [ + 82, + 83, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 88, + 97, + ], + "type": "Keyword", + "value": "protected", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "range": Array [ + 98, + 99, + ], + "type": "Identifier", + "value": "c", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 5, + }, + "start": Object { + "column": 15, + "line": 5, + }, + }, + "range": Array [ + 99, + 100, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 5, + }, + "start": Object { + "column": 17, + "line": 5, + }, + }, + "range": Array [ + 101, + 107, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 5, + }, + "start": Object { + "column": 23, + "line": 5, + }, + }, + "range": Array [ + 107, + 108, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 113, + 119, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 6, + }, + "start": Object { + "column": 11, + "line": 6, + }, + }, + "range": Array [ + 120, + 121, + ], + "type": "Identifier", + "value": "d", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 6, + }, + "start": Object { + "column": 12, + "line": 6, + }, + }, + "range": Array [ + 121, + 122, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 6, + }, + "start": Object { + "column": 14, + "line": 6, + }, + }, + "range": Array [ + 123, + 129, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 6, + }, + "start": Object { + "column": 20, + "line": 6, + }, + }, + "range": Array [ + 129, + 130, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "range": Array [ + 135, + 141, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 7, + }, + "start": Object { + "column": 11, + "line": 7, + }, + }, + "range": Array [ + 142, + 143, + ], + "type": "Identifier", + "value": "e", + }, + 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": 20, + "line": 7, + }, + "start": Object { + "column": 14, + "line": 7, + }, + }, + "range": Array [ + 145, + 151, + ], + "type": "Identifier", + "value": "string", + }, + 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": 12, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 157, + 165, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 8, + }, + "start": Object { + "column": 13, + "line": 8, + }, + }, + "range": Array [ + 166, + 167, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 8, + }, + "start": Object { + "column": 14, + "line": 8, + }, + }, + "range": Array [ + 167, + 168, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 8, + }, + "start": Object { + "column": 16, + "line": 8, + }, + }, + "range": Array [ + 169, + 175, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 8, + }, + "start": Object { + "column": 22, + "line": 8, + }, + }, + "range": Array [ + 175, + 176, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 10, + }, + "start": Object { + "column": 4, + "line": 10, + }, + }, + "range": Array [ + 182, + 188, + ], + "type": "Keyword", + "value": "public", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 10, + }, + "start": Object { + "column": 11, + "line": 10, + }, + }, + "range": Array [ + 189, + 190, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 10, + }, + "start": Object { + "column": 12, + "line": 10, + }, + }, + "range": Array [ + 190, + 193, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 10, + }, + "start": Object { + "column": 15, + "line": 10, + }, + }, + "range": Array [ + 193, + 194, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 10, + }, + "start": Object { + "column": 17, + "line": 10, + }, + }, + "range": Array [ + 195, + 201, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 10, + }, + "start": Object { + "column": 23, + "line": 10, + }, + }, + "range": Array [ + 201, + 202, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 10, + }, + "start": Object { + "column": 24, + "line": 10, + }, + }, + "range": Array [ + 202, + 203, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 10, + }, + "start": Object { + "column": 26, + "line": 10, + }, + }, + "range": Array [ + 204, + 210, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 10, + }, + "start": Object { + "column": 32, + "line": 10, + }, + }, + "range": Array [ + 210, + 211, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 11, + }, + "start": Object { + "column": 4, + "line": 11, + }, + }, + "range": Array [ + 216, + 223, + ], + "type": "Keyword", + "value": "private", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 11, + }, + "start": Object { + "column": 12, + "line": 11, + }, + }, + "range": Array [ + 224, + 225, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 11, + }, + "start": Object { + "column": 13, + "line": 11, + }, + }, + "range": Array [ + 225, + 228, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 11, + }, + "start": Object { + "column": 16, + "line": 11, + }, + }, + "range": Array [ + 228, + 229, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 11, + }, + "start": Object { + "column": 18, + "line": 11, + }, + }, + "range": Array [ + 230, + 236, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 11, + }, + "start": Object { + "column": 24, + "line": 11, + }, + }, + "range": Array [ + 236, + 237, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 11, + }, + "start": Object { + "column": 25, + "line": 11, + }, + }, + "range": Array [ + 237, + 238, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 11, + }, + "start": Object { + "column": 27, + "line": 11, + }, + }, + "range": Array [ + 239, + 245, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 11, + }, + "start": Object { + "column": 33, + "line": 11, + }, + }, + "range": Array [ + 245, + 246, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 12, + }, + "start": Object { + "column": 4, + "line": 12, + }, + }, + "range": Array [ + 251, + 260, + ], + "type": "Keyword", + "value": "protected", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 12, + }, + "start": Object { + "column": 14, + "line": 12, + }, + }, + "range": Array [ + 261, + 262, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 12, + }, + "start": Object { + "column": 15, + "line": 12, + }, + }, + "range": Array [ + 262, + 265, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 12, + }, + "start": Object { + "column": 18, + "line": 12, + }, + }, + "range": Array [ + 265, + 266, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 12, + }, + "start": Object { + "column": 20, + "line": 12, + }, + }, + "range": Array [ + 267, + 273, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 12, + }, + "start": Object { + "column": 26, + "line": 12, + }, + }, + "range": Array [ + 273, + 274, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 12, + }, + "start": Object { + "column": 27, + "line": 12, + }, + }, + "range": Array [ + 274, + 275, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 12, + }, + "start": Object { + "column": 29, + "line": 12, + }, + }, + "range": Array [ + 276, + 282, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 12, + }, + "start": Object { + "column": 35, + "line": 12, + }, + }, + "range": Array [ + 282, + 283, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 13, + }, + "start": Object { + "column": 4, + "line": 13, + }, + }, + "range": Array [ + 288, + 294, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 13, + }, + "start": Object { + "column": 11, + "line": 13, + }, + }, + "range": Array [ + 295, + 296, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 13, + }, + "start": Object { + "column": 12, + "line": 13, + }, + }, + "range": Array [ + 296, + 299, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 13, + }, + "start": Object { + "column": 15, + "line": 13, + }, + }, + "range": Array [ + 299, + 300, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 13, + }, + "start": Object { + "column": 17, + "line": 13, + }, + }, + "range": Array [ + 301, + 307, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 13, + }, + "start": Object { + "column": 23, + "line": 13, + }, + }, + "range": Array [ + 307, + 308, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 13, + }, + "start": Object { + "column": 24, + "line": 13, + }, + }, + "range": Array [ + 308, + 309, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 13, + }, + "start": Object { + "column": 26, + "line": 13, + }, + }, + "range": Array [ + 310, + 316, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 13, + }, + "start": Object { + "column": 32, + "line": 13, + }, + }, + "range": Array [ + 316, + 317, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 14, + }, + "start": Object { + "column": 4, + "line": 14, + }, + }, + "range": Array [ + 322, + 328, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 14, + }, + "start": Object { + "column": 11, + "line": 14, + }, + }, + "range": Array [ + 329, + 330, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 14, + }, + "start": Object { + "column": 12, + "line": 14, + }, + }, + "range": Array [ + 330, + 333, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 14, + }, + "start": Object { + "column": 15, + "line": 14, + }, + }, + "range": Array [ + 333, + 334, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 14, + }, + "start": Object { + "column": 17, + "line": 14, + }, + }, + "range": Array [ + 335, + 341, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 14, + }, + "start": Object { + "column": 23, + "line": 14, + }, + }, + "range": Array [ + 341, + 342, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 14, + }, + "start": Object { + "column": 24, + "line": 14, + }, + }, + "range": Array [ + 342, + 343, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 14, + }, + "start": Object { + "column": 26, + "line": 14, + }, + }, + "range": Array [ + 344, + 350, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 14, + }, + "start": Object { + "column": 32, + "line": 14, + }, + }, + "range": Array [ + 350, + 351, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 15, + }, + "start": Object { + "column": 4, + "line": 15, + }, + }, + "range": Array [ + 356, + 364, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 15, + }, + "start": Object { + "column": 13, + "line": 15, + }, + }, + "range": Array [ + 365, + 366, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 15, + }, + "start": Object { + "column": 14, + "line": 15, + }, + }, + "range": Array [ + 366, + 369, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 15, + }, + "start": Object { + "column": 17, + "line": 15, + }, + }, + "range": Array [ + 369, + 370, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 15, + }, + "start": Object { + "column": 19, + "line": 15, + }, + }, + "range": Array [ + 371, + 377, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 15, + }, + "start": Object { + "column": 25, + "line": 15, + }, + }, + "range": Array [ + 377, + 378, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 15, + }, + "start": Object { + "column": 26, + "line": 15, + }, + }, + "range": Array [ + 378, + 379, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 15, + }, + "start": Object { + "column": 28, + "line": 15, + }, + }, + "range": Array [ + 380, + 386, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 15, + }, + "start": Object { + "column": 34, + "line": 15, + }, + }, + "range": Array [ + 386, + 387, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 17, + }, + "start": Object { + "column": 4, + "line": 17, + }, + }, + "range": Array [ + 393, + 399, + ], + "type": "Keyword", + "value": "public", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 17, + }, + "start": Object { + "column": 11, + "line": 17, + }, + }, + "range": Array [ + 400, + 401, + ], + "type": "Identifier", + "value": "g", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 17, + }, + "start": Object { + "column": 12, + "line": 17, + }, + }, + "range": Array [ + 401, + 402, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 17, + }, + "start": Object { + "column": 13, + "line": 17, + }, + }, + "range": Array [ + 402, + 405, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 17, + }, + "start": Object { + "column": 16, + "line": 17, + }, + }, + "range": Array [ + 405, + 406, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 17, + }, + "start": Object { + "column": 18, + "line": 17, + }, + }, + "range": Array [ + 407, + 413, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 17, + }, + "start": Object { + "column": 24, + "line": 17, + }, + }, + "range": Array [ + 413, + 414, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 17, + }, + "start": Object { + "column": 25, + "line": 17, + }, + }, + "range": Array [ + 414, + 415, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 17, + }, + "start": Object { + "column": 27, + "line": 17, + }, + }, + "range": Array [ + 416, + 420, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 17, + }, + "start": Object { + "column": 31, + "line": 17, + }, + }, + "range": Array [ + 420, + 421, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 18, + }, + "start": Object { + "column": 4, + "line": 18, + }, + }, + "range": Array [ + 426, + 433, + ], + "type": "Keyword", + "value": "private", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 18, + }, + "start": Object { + "column": 12, + "line": 18, + }, + }, + "range": Array [ + 434, + 435, + ], + "type": "Identifier", + "value": "h", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 18, + }, + "start": Object { + "column": 13, + "line": 18, + }, + }, + "range": Array [ + 435, + 436, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 18, + }, + "start": Object { + "column": 14, + "line": 18, + }, + }, + "range": Array [ + 436, + 439, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 18, + }, + "start": Object { + "column": 17, + "line": 18, + }, + }, + "range": Array [ + 439, + 440, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 18, + }, + "start": Object { + "column": 19, + "line": 18, + }, + }, + "range": Array [ + 441, + 447, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 18, + }, + "start": Object { + "column": 25, + "line": 18, + }, + }, + "range": Array [ + 447, + 448, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 18, + }, + "start": Object { + "column": 26, + "line": 18, + }, + }, + "range": Array [ + 448, + 449, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 18, + }, + "start": Object { + "column": 28, + "line": 18, + }, + }, + "range": Array [ + 450, + 454, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 18, + }, + "start": Object { + "column": 32, + "line": 18, + }, + }, + "range": Array [ + 454, + 455, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 19, + }, + "start": Object { + "column": 4, + "line": 19, + }, + }, + "range": Array [ + 460, + 469, + ], + "type": "Keyword", + "value": "protected", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 19, + }, + "start": Object { + "column": 14, + "line": 19, + }, + }, + "range": Array [ + 470, + 471, + ], + "type": "Identifier", + "value": "i", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 19, + }, + "start": Object { + "column": 15, + "line": 19, + }, + }, + "range": Array [ + 471, + 472, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 19, + }, + "start": Object { + "column": 16, + "line": 19, + }, + }, + "range": Array [ + 472, + 475, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 19, + }, + "start": Object { + "column": 19, + "line": 19, + }, + }, + "range": Array [ + 475, + 476, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 19, + }, + "start": Object { + "column": 21, + "line": 19, + }, + }, + "range": Array [ + 477, + 483, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 19, + }, + "start": Object { + "column": 27, + "line": 19, + }, + }, + "range": Array [ + 483, + 484, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 19, + }, + "start": Object { + "column": 28, + "line": 19, + }, + }, + "range": Array [ + 484, + 485, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 19, + }, + "start": Object { + "column": 30, + "line": 19, + }, + }, + "range": Array [ + 486, + 490, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 19, + }, + "start": Object { + "column": 34, + "line": 19, + }, + }, + "range": Array [ + 490, + 491, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 20, + }, + "start": Object { + "column": 4, + "line": 20, + }, + }, + "range": Array [ + 496, + 502, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 20, + }, + "start": Object { + "column": 11, + "line": 20, + }, + }, + "range": Array [ + 503, + 504, + ], + "type": "Identifier", + "value": "j", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 20, + }, + "start": Object { + "column": 12, + "line": 20, + }, + }, + "range": Array [ + 504, + 505, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 20, + }, + "start": Object { + "column": 13, + "line": 20, + }, + }, + "range": Array [ + 505, + 508, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 20, + }, + "start": Object { + "column": 16, + "line": 20, + }, + }, + "range": Array [ + 508, + 509, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 20, + }, + "start": Object { + "column": 18, + "line": 20, + }, + }, + "range": Array [ + 510, + 516, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 20, + }, + "start": Object { + "column": 24, + "line": 20, + }, + }, + "range": Array [ + 516, + 517, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 20, + }, + "start": Object { + "column": 25, + "line": 20, + }, + }, + "range": Array [ + 517, + 518, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 20, + }, + "start": Object { + "column": 27, + "line": 20, + }, + }, + "range": Array [ + 519, + 523, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 20, + }, + "start": Object { + "column": 31, + "line": 20, + }, + }, + "range": Array [ + 523, + 524, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 21, + }, + "start": Object { + "column": 4, + "line": 21, + }, + }, + "range": Array [ + 529, + 535, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 21, + }, + "start": Object { + "column": 11, + "line": 21, + }, + }, + "range": Array [ + 536, + 537, + ], + "type": "Identifier", + "value": "k", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 21, + }, + "start": Object { + "column": 12, + "line": 21, + }, + }, + "range": Array [ + 537, + 538, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 21, + }, + "start": Object { + "column": 13, + "line": 21, + }, + }, + "range": Array [ + 538, + 541, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 21, + }, + "start": Object { + "column": 16, + "line": 21, + }, + }, + "range": Array [ + 541, + 542, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 21, + }, + "start": Object { + "column": 18, + "line": 21, + }, + }, + "range": Array [ + 543, + 549, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 21, + }, + "start": Object { + "column": 24, + "line": 21, + }, + }, + "range": Array [ + 549, + 550, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 21, + }, + "start": Object { + "column": 25, + "line": 21, + }, + }, + "range": Array [ + 550, + 551, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 21, + }, + "start": Object { + "column": 27, + "line": 21, + }, + }, + "range": Array [ + 552, + 556, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 21, + }, + "start": Object { + "column": 31, + "line": 21, + }, + }, + "range": Array [ + 556, + 557, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 22, + }, + "start": Object { + "column": 4, + "line": 22, + }, + }, + "range": Array [ + 562, + 570, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 22, + }, + "start": Object { + "column": 13, + "line": 22, + }, + }, + "range": Array [ + 571, + 572, + ], + "type": "Identifier", + "value": "l", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 22, + }, + "start": Object { + "column": 14, + "line": 22, + }, + }, + "range": Array [ + 572, + 573, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 22, + }, + "start": Object { + "column": 15, + "line": 22, + }, + }, + "range": Array [ + 573, + 576, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 22, + }, + "start": Object { + "column": 18, + "line": 22, + }, + }, + "range": Array [ + 576, + 577, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 22, + }, + "start": Object { + "column": 20, + "line": 22, + }, + }, + "range": Array [ + 578, + 584, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 22, + }, + "start": Object { + "column": 26, + "line": 22, + }, + }, + "range": Array [ + 584, + 585, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 22, + }, + "start": Object { + "column": 27, + "line": 22, + }, + }, + "range": Array [ + 585, + 586, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 22, + }, + "start": Object { + "column": 29, + "line": 22, + }, + }, + "range": Array [ + 587, + 591, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 22, + }, + "start": Object { + "column": 33, + "line": 22, + }, + }, + "range": Array [ + 591, + 592, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 23, + }, + "start": Object { + "column": 0, + "line": 23, + }, + }, + "range": Array [ + 593, + 594, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/expressions/call-expression-type-arguments.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "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 { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + }, + ], + "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 { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "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", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/expressions/new-expression-type-arguments.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "init": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "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 { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "B", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + }, + ], + "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", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "type": "VariableDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/expressions/tagged-template-expression-type-arguments.src 1`] = ` +Object { + "body": Array [ + Object { + "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 { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 0, + 3, + ], + "type": "Identifier", + }, + "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 { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + }, + ], + "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", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/namespaces-and-modules/ambient-module-declaration-with-import.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "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 { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "fs", + "range": Array [ + 41, + 43, + ], + "type": "Identifier", + }, + "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, + "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", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/namespaces-and-modules/declare-namespace-with-exported-function.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "declaration": Object { + "async": false, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "name": "select", + "range": Array [ + 41, + 47, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 59, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "name": "selector", + "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 { + "loc": Object { + "end": Object { + "column": 53, + "line": 2, + }, + "start": Object { + "column": 44, + "line": 2, + }, + }, + "name": "Selection", + "range": Array [ + 67, + 76, + ], + "type": "Identifier", + }, + "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": "FunctionDeclaration", + }, + "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, + "id": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "d3", + "range": Array [ + 18, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 84, + ], + "type": "TSModuleDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/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, + "id": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "name": "global", + "range": Array [ + 36, + 42, + ], + "type": "Identifier", + }, + "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, + "id": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 5, + }, + "start": Object { + "column": 22, + "line": 5, + }, + }, + "name": "global", + "range": Array [ + 74, + 80, + ], + "type": "Identifier", + }, + "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 { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "global", + "range": Array [ + 8, + 14, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 91, + ], + "type": "TSModuleDeclaration", + }, + ], + "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": "Keyword", + "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": "Keyword", + "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": "Keyword", + "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", +} +`; + +exports[`typescript fixtures/namespaces-and-modules/module-with-default-exports.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "declaration": Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "name": "method", + "range": Array [ + 52, + 58, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 22, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 52, + 66, + ], + "static": false, + "type": "MethodDefinition", + "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", + }, + "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 { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "name": "C", + "range": Array [ + 62, + 63, + ], + "type": "Identifier", + }, + }, + }, + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 42, + 73, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "name": "C", + "range": Array [ + 40, + 41, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 34, + 73, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + "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", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 5, + }, + "start": Object { + "column": 28, + "line": 5, + }, + }, + "name": "bar", + "range": Array [ + 102, + 105, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 36, + "line": 5, + }, + "start": Object { + "column": 19, + "line": 5, + }, + }, + "params": Array [], + "range": Array [ + 93, + 110, + ], + "type": "FunctionDeclaration", + }, + "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", + }, + "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", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/namespaces-and-modules/nested-internal-module.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "declaration": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "name": "x", + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + }, + "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", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 32, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 23, + 44, + ], + "type": "VariableDeclaration", + }, + "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 { + "declaration": Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "name": "constructor", + "range": Array [ + 78, + 89, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 59, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "range": Array [ + 78, + 129, + ], + "static": false, + "type": "MethodDefinition", + "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", + }, + "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", + "loc": Object { + "end": Object { + "column": 36, + "line": 5, + }, + "start": Object { + "column": 20, + "line": 5, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 5, + }, + "start": Object { + "column": 27, + "line": 5, + }, + }, + "name": "x", + "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, + ], + "type": "TSParameterProperty", + }, + Object { + "accessibility": "public", + "loc": Object { + "end": Object { + "column": 54, + "line": 5, + }, + "start": Object { + "column": 38, + "line": 5, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 5, + }, + "start": Object { + "column": 45, + "line": 5, + }, + }, + "name": "y", + "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, + ], + "type": "TSParameterProperty", + }, + ], + "range": Array [ + 89, + 129, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 6, + }, + "start": Object { + "column": 23, + "line": 4, + }, + }, + "range": Array [ + 68, + 135, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 4, + }, + "start": Object { + "column": 17, + "line": 4, + }, + }, + "name": "Point", + "range": Array [ + 62, + 67, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 6, + }, + "start": Object { + "column": 11, + "line": 4, + }, + }, + "range": Array [ + 56, + 135, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + "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 { + "declaration": Object { + "body": Object { + "body": Array [ + Object { + "declaration": Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 9, + }, + "start": Object { + "column": 12, + "line": 9, + }, + }, + "name": "name", + "range": Array [ + 200, + 204, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 9, + }, + "start": Object { + "column": 12, + "line": 9, + }, + }, + "range": Array [ + 200, + 213, + ], + "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", + }, + "heritage": Array [], + "id": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 8, + }, + "start": Object { + "column": 25, + "line": 8, + }, + }, + "name": "Id", + "range": Array [ + 183, + 185, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 10, + }, + "start": Object { + "column": 15, + "line": 8, + }, + }, + "range": Array [ + 173, + 223, + ], + "type": "TSInterfaceDeclaration", + }, + "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", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 7, + }, + "start": Object { + "column": 18, + "line": 7, + }, + }, + "name": "B", + "range": Array [ + 154, + 155, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 11, + }, + "start": Object { + "column": 11, + "line": 7, + }, + }, + "range": Array [ + 147, + 229, + ], + "type": "TSModuleDeclaration", + }, + "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", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 12, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 231, + ], + "type": "TSModuleDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/namespaces-and-modules/shorthand-ambient-module-declaration.src 1`] = ` +Object { + "body": Array [ + Object { + "declare": true, + "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", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/types/array-type.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 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, }, - "loc": Object { - "end": Object { - "column": 32, - "line": 17, - }, - "start": Object { - "column": 4, - "line": 17, - }, + "start": Object { + "column": 11, + "line": 1, }, - "optional": false, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 17, - }, - "start": Object { - "column": 13, - "line": 17, - }, - }, - "name": "bar", - "range": Array [ - 402, - 413, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 17, - }, - "start": Object { - "column": 16, - "line": 17, - }, - }, - "range": Array [ - 405, - 413, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 17, - }, - "start": Object { - "column": 18, - "line": 17, - }, - }, - "range": Array [ - 407, - 413, - ], - "type": "TSStringKeyword", - }, - }, + }, + "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", + }, + }, + ], + "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", +} +`; + +exports[`typescript fixtures/types/conditional.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, }, - ], + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", "range": Array [ - 393, - 421, + 4, + 47, ], - "static": false, - "type": "TSMethodSignature", + "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 31, - "line": 17, + "column": 47, + "line": 1, }, "start": Object { - "column": 25, - "line": 17, + "column": 5, + "line": 1, }, }, "range": Array [ - 414, - 420, + 5, + 47, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 17, - }, - "start": Object { - "column": 27, - "line": 17, - }, - }, - "range": Array [ - 416, - 420, - ], - "type": "TSVoidKeyword", - }, - }, - }, - Object { - "accessibility": "private", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 18, - }, - "start": Object { - "column": 12, - "line": 18, - }, - }, - "name": "h", - "range": Array [ - 434, - 435, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 33, - "line": 18, - }, - "start": Object { - "column": 4, - "line": 18, - }, - }, - "optional": false, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 18, - }, - "start": Object { - "column": 14, - "line": 18, + "checkType": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, }, + "range": Array [ + 7, + 13, + ], + "type": "TSNumberKeyword", }, - "name": "bar", - "range": Array [ - 436, - 447, - ], - "type": "Identifier", - "typeAnnotation": Object { + "extendsType": Object { "loc": Object { "end": Object { - "column": 25, - "line": 18, + "column": 28, + "line": 1, }, "start": Object { - "column": 17, - "line": 18, + "column": 22, + "line": 1, }, }, "range": Array [ - 439, - 447, + 22, + 28, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 18, - }, - "start": Object { - "column": 19, - "line": 18, - }, + "type": "TSStringKeyword", + }, + "falseType": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, }, - "range": Array [ - 441, - 447, - ], - "type": "TSStringKeyword", }, + "range": Array [ + 41, + 47, + ], + "type": "TSStringKeyword", }, - }, - ], - "range": Array [ - 426, - 455, - ], - "static": false, - "type": "TSMethodSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 18, - }, - "start": Object { - "column": 26, - "line": 18, - }, - }, - "range": Array [ - 448, - 454, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 32, - "line": 18, + "column": 47, + "line": 1, }, "start": Object { - "column": 28, - "line": 18, + "column": 7, + "line": 1, }, }, "range": Array [ - 450, - 454, + 7, + 47, ], - "type": "TSVoidKeyword", + "trueType": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 38, + ], + "type": "TSBooleanKeyword", + }, + "type": "TSConditionalType", }, }, }, - Object { - "accessibility": "protected", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 19, - }, - "start": Object { - "column": 14, - "line": 19, - }, - }, - "name": "i", - "range": Array [ - 470, - 471, - ], - "type": "Identifier", + "init": null, + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, }, + }, + "range": Array [ + 4, + 47, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "type": "VariableDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/types/conditional-with-null.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 35, - "line": 19, + "column": 45, + "line": 1, }, "start": Object { "column": 4, - "line": 19, + "line": 1, }, }, - "optional": false, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 19, - }, - "start": Object { - "column": 16, - "line": 19, - }, - }, - "name": "bar", - "range": Array [ - 472, - 483, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 19, - }, - "start": Object { - "column": 19, - "line": 19, - }, - }, - "range": Array [ - 475, - 483, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 19, - }, - "start": Object { - "column": 21, - "line": 19, - }, - }, - "range": Array [ - 477, - 483, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], + "name": "x", "range": Array [ - 460, - 491, + 4, + 45, ], - "static": false, - "type": "TSMethodSignature", + "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 34, - "line": 19, + "column": 45, + "line": 1, }, "start": Object { - "column": 28, - "line": 19, + "column": 5, + "line": 1, }, }, "range": Array [ - 484, - 490, + 5, + 45, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 19, - }, - "start": Object { - "column": 30, - "line": 19, + "checkType": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, }, + "range": Array [ + 7, + 13, + ], + "type": "TSNumberKeyword", }, - "range": Array [ - 486, - 490, - ], - "type": "TSVoidKeyword", - }, - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 20, + "extendsType": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "TSStringKeyword", }, - "start": Object { - "column": 11, - "line": 20, + "falseType": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 45, + ], + "type": "TSNullKeyword", }, - }, - "name": "j", - "range": Array [ - 503, - 504, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 20, - }, - "start": Object { - "column": 4, - "line": 20, - }, - }, - "optional": false, - "params": Array [ - Object { "loc": Object { "end": Object { - "column": 24, - "line": 20, + "column": 45, + "line": 1, }, "start": Object { - "column": 13, - "line": 20, + "column": 7, + "line": 1, }, }, - "name": "bar", "range": Array [ - 505, - 516, + 7, + 45, ], - "type": "Identifier", - "typeAnnotation": Object { + "trueType": Object { "loc": Object { "end": Object { - "column": 24, - "line": 20, + "column": 38, + "line": 1, }, "start": Object { - "column": 16, - "line": 20, + "column": 31, + "line": 1, }, }, "range": Array [ - 508, - 516, + 31, + 38, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 20, - }, - "start": Object { - "column": 18, - "line": 20, - }, - }, - "range": Array [ - 510, - 516, - ], - "type": "TSStringKeyword", - }, + "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", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 46, + ], + "type": "VariableDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/types/indexed.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", "range": Array [ - 496, - 524, + 4, + 11, ], - "static": true, - "type": "TSMethodSignature", + "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 31, - "line": 20, + "column": 11, + "line": 1, }, "start": Object { - "column": 25, - "line": 20, + "column": 5, + "line": 1, }, }, "range": Array [ - 517, - 523, + 5, + 11, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 20, + "indexType": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, }, - "start": Object { - "column": 27, - "line": 20, + "range": Array [ + 9, + 10, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "K", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", }, }, - "range": Array [ - 519, - 523, - ], - "type": "TSVoidKeyword", - }, - }, - }, - Object { - "computed": false, - "export": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 21, - }, - "start": Object { - "column": 11, - "line": 21, - }, - }, - "name": "k", - "range": Array [ - 536, - 537, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 21, - }, - "start": Object { - "column": 4, - "line": 21, - }, - }, - "optional": false, - "params": Array [ - Object { "loc": Object { "end": Object { - "column": 24, - "line": 21, + "column": 11, + "line": 1, }, "start": Object { - "column": 13, - "line": 21, + "column": 7, + "line": 1, }, }, - "name": "bar", - "range": Array [ - 538, - 549, - ], - "type": "Identifier", - "typeAnnotation": Object { + "objectType": Object { "loc": Object { "end": Object { - "column": 24, - "line": 21, + "column": 8, + "line": 1, }, "start": Object { - "column": 16, - "line": 21, + "column": 7, + "line": 1, }, }, "range": Array [ - 541, - 549, + 7, + 8, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 24, - "line": 21, + "column": 8, + "line": 1, }, "start": Object { - "column": 18, - "line": 21, + "column": 7, + "line": 1, }, }, + "name": "T", "range": Array [ - 543, - 549, + 7, + 8, ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 529, - 557, - ], - "static": false, - "type": "TSMethodSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 21, - }, - "start": Object { - "column": 25, - "line": 21, - }, - }, - "range": Array [ - 550, - 556, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 21, - }, - "start": Object { - "column": 27, - "line": 21, + "type": "Identifier", }, }, "range": Array [ - 552, - 556, + 7, + 11, ], - "type": "TSVoidKeyword", + "type": "TSIndexedAccessType", }, }, }, + "init": null, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 11, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "type": "VariableDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/types/intersection-type.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "LinkedList", + "range": Array [ + 5, + 15, + ], + "type": "Identifier", + }, + "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 { - "computed": false, - "key": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 14, - "line": 22, + "column": 22, + "line": 1, }, "start": Object { - "column": 13, - "line": 22, + "column": 21, + "line": 1, }, }, - "name": "l", + "name": "T", "range": Array [ - 571, - 572, + 21, + 22, ], "type": "Identifier", }, + }, + Object { "loc": Object { "end": Object { - "column": 34, - "line": 22, + "column": 48, + "line": 1, }, "start": Object { - "column": 4, - "line": 22, + "column": 25, + "line": 1, }, }, - "optional": false, - "params": Array [ + "members": Array [ Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "name": "next", + "range": Array [ + 27, + 31, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 26, - "line": 22, + "column": 46, + "line": 1, }, "start": Object { - "column": 15, - "line": 22, + "column": 27, + "line": 1, }, }, - "name": "bar", "range": Array [ - 573, - 584, + 27, + 46, ], - "type": "Identifier", + "type": "TSPropertySignature", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 26, - "line": 22, + "column": 46, + "line": 1, }, "start": Object { - "column": 18, - "line": 22, + "column": 31, + "line": 1, }, }, "range": Array [ - 576, - 584, + 31, + 46, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 26, - "line": 22, + "column": 46, + "line": 1, }, "start": Object { - "column": 20, - "line": 22, + "column": 33, + "line": 1, }, }, "range": Array [ - 578, - 584, + 33, + 46, ], - "type": "TSStringKeyword", + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "name": "LinkedList", + "range": Array [ + 33, + 43, + ], + "type": "Identifier", + }, + "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 { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 44, + 45, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 43, + 46, + ], + "type": "TSTypeParameterInstantiation", + }, }, }, }, ], "range": Array [ - 562, - 592, + 25, + 48, ], - "readonly": true, - "static": false, - "type": "TSMethodSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 22, - }, - "start": Object { - "column": 27, - "line": 22, - }, - }, - "range": Array [ - 585, - 591, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 22, - }, - "start": Object { - "column": 29, - "line": 22, - }, - }, - "range": Array [ - 587, - 591, - ], - "type": "TSVoidKeyword", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 23, - }, - "start": Object { - "column": 14, - "line": 1, + "type": "TSTypeLiteral", }, - }, - "range": Array [ - 14, - 594, ], - "type": "TSInterfaceBody", }, - "heritage": Array [], - "id": Object { + "typeParameters": Object { "loc": Object { "end": Object { - "column": 13, + "column": 18, "line": 1, }, "start": Object { - "column": 10, + "column": 15, "line": 1, }, }, - "name": "Foo", + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 16, + 17, + ], + "type": "TSTypeParameter", + }, + ], "range": Array [ - 10, - 13, + 15, + 18, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 23, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 594, - ], - "type": "TSInterfaceDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 25, + "line": 2, }, "start": Object { "column": 0, @@ -63292,14 +79139,14 @@ Object { }, "range": Array [ 0, - 596, + 50, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 4, "line": 1, }, "start": Object { @@ -63309,295 +79156,187 @@ Object { }, "range": Array [ 0, - 9, + 4, ], - "type": "Keyword", - "value": "interface", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 1, }, "start": Object { - "column": 10, + "column": 5, "line": 1, }, }, "range": Array [ - 10, - 13, + 5, + 15, ], "type": "Identifier", - "value": "Foo", + "value": "LinkedList", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 16, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, 15, + 16, ], "type": "Punctuator", - "value": "{", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 20, - 23, + 16, + 17, ], "type": "Identifier", - "value": "bar", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 23, - 24, + 17, + 18, ], "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": "string", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ - 32, - 33, + 19, + 20, ], "type": "Punctuator", "value": "=", }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 34, - 37, - ], - "type": "String", - "value": "'a'", - }, Object { "loc": Object { "end": Object { "column": 22, - "line": 2, + "line": 1, }, "start": Object { "column": 21, - "line": 2, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 43, - 49, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, + "line": 1, }, }, "range": Array [ - 50, - 51, + 21, + 22, ], "type": "Identifier", - "value": "a", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 24, + "line": 1, }, "start": Object { - "column": 12, - "line": 3, + "column": 23, + "line": 1, }, }, "range": Array [ - 51, - 52, + 23, + 24, ], "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 53, - 59, - ], - "type": "Identifier", - "value": "string", + "value": "&", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 3, + "column": 26, + "line": 1, }, "start": Object { - "column": 20, - "line": 3, + "column": 25, + "line": 1, }, }, "range": Array [ - 59, - 60, + 25, + 26, ], "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 65, - 72, - ], - "type": "Keyword", - "value": "private", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 31, + "line": 1, }, "start": Object { - "column": 12, - "line": 4, + "column": 27, + "line": 1, }, }, "range": Array [ - 73, - 74, + 27, + 31, ], "type": "Identifier", - "value": "b", + "value": "next", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 4, + "column": 32, + "line": 1, }, "start": Object { - "column": 13, - "line": 4, + "column": 31, + "line": 1, }, }, "range": Array [ - 74, - 75, + 31, + 32, ], "type": "Punctuator", "value": ":", @@ -63605,359 +79344,454 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 4, + "column": 43, + "line": 1, }, "start": Object { - "column": 15, - "line": 4, + "column": 33, + "line": 1, }, }, "range": Array [ - 76, - 82, + 33, + 43, ], "type": "Identifier", - "value": "string", + "value": "LinkedList", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 4, + "column": 44, + "line": 1, }, "start": Object { - "column": 21, - "line": 4, + "column": 43, + "line": 1, }, }, "range": Array [ - 82, - 83, + 43, + 44, ], "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 88, - 97, - ], - "type": "Keyword", - "value": "protected", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 5, + "column": 45, + "line": 1, }, "start": Object { - "column": 14, - "line": 5, + "column": 44, + "line": 1, }, }, "range": Array [ - 98, - 99, + 44, + 45, ], "type": "Identifier", - "value": "c", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 5, + "column": 46, + "line": 1, }, "start": Object { - "column": 15, - "line": 5, + "column": 45, + "line": 1, }, }, "range": Array [ - 99, - 100, + 45, + 46, ], "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 101, - 107, - ], - "type": "Identifier", - "value": "string", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 5, + "column": 48, + "line": 1, }, "start": Object { - "column": 23, - "line": 5, + "column": 47, + "line": 1, }, }, "range": Array [ - 107, - 108, + 47, + 48, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 6, + "column": 49, + "line": 1, }, "start": Object { - "column": 4, - "line": 6, + "column": 48, + "line": 1, }, }, "range": Array [ - 113, - 119, + 48, + 49, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/mapped.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "map", + "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, + }, + }, + "range": Array [ + 9, + 35, + ], + "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", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "P", + "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", + }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 12, - "line": 6, + "column": 36, + "line": 1, }, "start": Object { - "column": 11, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 120, - 121, + 0, + 36, ], - "type": "Identifier", - "value": "d", + "type": "VariableDeclaration", + }, + ], + "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": 13, - "line": 6, + "column": 3, + "line": 1, }, "start": Object { - "column": 12, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 121, - 122, + 0, + 3, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 6, + "column": 7, + "line": 1, }, "start": Object { - "column": 14, - "line": 6, + "column": 4, + "line": 1, }, }, "range": Array [ - 123, - 129, + 4, + 7, ], "type": "Identifier", - "value": "string", + "value": "map", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 6, + "column": 8, + "line": 1, }, "start": Object { - "column": 20, - "line": 6, + "column": 7, + "line": 1, }, }, "range": Array [ - 129, - 130, + 7, + 8, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { "column": 10, - "line": 7, + "line": 1, }, "start": Object { - "column": 4, - "line": 7, + "column": 9, + "line": 1, }, }, "range": Array [ - 135, - 141, + 9, + 10, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 12, - "line": 7, + "line": 1, }, "start": Object { "column": 11, - "line": 7, + "line": 1, }, }, "range": Array [ - 142, - 143, + 11, + 12, ], - "type": "Identifier", - "value": "e", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { "column": 13, - "line": 7, + "line": 1, }, "start": Object { "column": 12, - "line": 7, - }, - }, - "range": Array [ - 143, - 144, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 7, - }, - "start": Object { - "column": 14, - "line": 7, + "line": 1, }, }, "range": Array [ - 145, - 151, + 12, + 13, ], "type": "Identifier", - "value": "string", + "value": "P", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 7, + "column": 16, + "line": 1, }, "start": Object { - "column": 20, - "line": 7, + "column": 14, + "line": 1, }, }, "range": Array [ - 151, - 152, + 14, + 16, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 8, + "column": 23, + "line": 1, }, "start": Object { - "column": 4, - "line": 8, + "column": 17, + "line": 1, }, }, "range": Array [ - 157, - 165, + 17, + 23, ], "type": "Identifier", - "value": "readonly", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 8, + "column": 24, + "line": 1, }, "start": Object { - "column": 13, - "line": 8, + "column": 23, + "line": 1, }, }, "range": Array [ - 166, - 167, + 23, + 24, ], - "type": "Identifier", - "value": "f", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 8, + "column": 25, + "line": 1, }, "start": Object { - "column": 14, - "line": 8, + "column": 24, + "line": 1, }, }, "range": Array [ - 167, - 168, + 24, + 25, ], "type": "Punctuator", "value": ":", @@ -63965,35 +79799,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, - "line": 8, + "column": 32, + "line": 1, }, "start": Object { - "column": 16, - "line": 8, + "column": 26, + "line": 1, }, }, "range": Array [ - 169, - 175, + 26, + 32, ], "type": "Identifier", - "value": "string", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 8, + "column": 33, + "line": 1, }, "start": Object { - "column": 22, - "line": 8, + "column": 32, + "line": 1, }, }, "range": Array [ - 175, - 176, + 32, + 33, ], "type": "Punctuator", "value": ";", @@ -64001,305 +79835,366 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, - "line": 10, + "column": 35, + "line": 1, }, "start": Object { - "column": 4, - "line": 10, + "column": 34, + "line": 1, }, }, "range": Array [ - 182, - 188, + 34, + 35, ], - "type": "Keyword", - "value": "public", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 10, + "column": 36, + "line": 1, }, "start": Object { - "column": 11, - "line": 10, + "column": 35, + "line": 1, }, }, "range": Array [ - 189, - 190, + 35, + 36, ], "type": "Punctuator", - "value": "[", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/mapped-readonly.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 10, - }, - "start": Object { - "column": 12, - "line": 10, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "map", + "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, + }, + }, + "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", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "P", + "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", }, - }, - "range": Array [ - 190, - 193, ], - "type": "Identifier", - "value": "baz", - }, - Object { + "kind": "let", "loc": Object { "end": Object { - "column": 16, - "line": 10, + "column": 46, + "line": 1, }, "start": Object { - "column": 15, - "line": 10, + "column": 0, + "line": 1, }, }, "range": Array [ - 193, - 194, + 0, + 46, ], - "type": "Punctuator", - "value": ":", + "type": "VariableDeclaration", }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 10, - }, - "start": Object { - "column": 17, - "line": 10, - }, - }, - "range": Array [ - 195, - 201, - ], - "type": "Identifier", - "value": "string", + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 10, - }, - "start": Object { - "column": 23, - "line": 10, - }, - }, - "range": Array [ - 201, - 202, - ], - "type": "Punctuator", - "value": "]", + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 47, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 25, - "line": 10, + "column": 3, + "line": 1, }, "start": Object { - "column": 24, - "line": 10, + "column": 0, + "line": 1, }, }, "range": Array [ - 202, - 203, + 0, + 3, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 10, + "column": 7, + "line": 1, }, "start": Object { - "column": 26, - "line": 10, + "column": 4, + "line": 1, }, }, "range": Array [ - 204, - 210, + 4, + 7, ], "type": "Identifier", - "value": "string", + "value": "map", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 10, + "column": 8, + "line": 1, }, "start": Object { - "column": 32, - "line": 10, + "column": 7, + "line": 1, }, }, "range": Array [ - 210, - 211, + 7, + 8, ], "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 11, - }, - "start": Object { - "column": 4, - "line": 11, - }, - }, - "range": Array [ - 216, - 223, - ], - "type": "Keyword", - "value": "private", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 11, + "column": 10, + "line": 1, }, "start": Object { - "column": 12, - "line": 11, + "column": 9, + "line": 1, }, }, "range": Array [ - 224, - 225, + 9, + 10, ], "type": "Punctuator", - "value": "[", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 11, + "column": 19, + "line": 1, }, "start": Object { - "column": 13, - "line": 11, + "column": 11, + "line": 1, }, }, "range": Array [ - 225, - 228, + 11, + 19, ], "type": "Identifier", - "value": "baz", + "value": "readonly", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 11, + "column": 21, + "line": 1, }, "start": Object { - "column": 16, - "line": 11, + "column": 20, + "line": 1, }, }, "range": Array [ - 228, - 229, + 20, + 21, ], "type": "Punctuator", - "value": ":", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 11, + "column": 22, + "line": 1, }, "start": Object { - "column": 18, - "line": 11, + "column": 21, + "line": 1, }, }, "range": Array [ - 230, - 236, + 21, + 22, ], "type": "Identifier", - "value": "string", + "value": "P", }, Object { "loc": Object { "end": Object { "column": 25, - "line": 11, - }, - "start": Object { - "column": 24, - "line": 11, - }, - }, - "range": Array [ - 236, - 237, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 11, + "line": 1, }, "start": Object { - "column": 25, - "line": 11, + "column": 23, + "line": 1, }, }, "range": Array [ - 237, - 238, + 23, + 25, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 11, + "column": 32, + "line": 1, }, "start": Object { - "column": 27, - "line": 11, + "column": 26, + "line": 1, }, }, "range": Array [ - 239, - 245, + 26, + 32, ], "type": "Identifier", "value": "string", @@ -64307,89 +80202,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 34, - "line": 11, - }, - "start": Object { "column": 33, - "line": 11, - }, - }, - "range": Array [ - 245, - 246, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 12, - }, - "start": Object { - "column": 4, - "line": 12, - }, - }, - "range": Array [ - 251, - 260, - ], - "type": "Keyword", - "value": "protected", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 12, + "line": 1, }, "start": Object { - "column": 14, - "line": 12, + "column": 32, + "line": 1, }, }, "range": Array [ - 261, - 262, + 32, + 33, ], "type": "Punctuator", - "value": "[", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 12, + "column": 34, + "line": 1, }, "start": Object { - "column": 15, - "line": 12, + "column": 33, + "line": 1, }, }, "range": Array [ - 262, - 265, + 33, + 34, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 12, + "column": 35, + "line": 1, }, "start": Object { - "column": 18, - "line": 12, + "column": 34, + "line": 1, }, }, "range": Array [ - 265, - 266, + 34, + 35, ], "type": "Punctuator", "value": ":", @@ -64397,161 +80256,294 @@ Object { Object { "loc": Object { "end": Object { - "column": 26, - "line": 12, + "column": 42, + "line": 1, }, "start": Object { - "column": 20, - "line": 12, + "column": 36, + "line": 1, }, }, "range": Array [ - 267, - 273, + 36, + 42, ], "type": "Identifier", - "value": "string", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 12, + "column": 43, + "line": 1, }, "start": Object { - "column": 26, - "line": 12, + "column": 42, + "line": 1, }, }, "range": Array [ - 273, - 274, + 42, + 43, ], "type": "Punctuator", - "value": "]", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 12, + "column": 45, + "line": 1, }, "start": Object { - "column": 27, - "line": 12, + "column": 44, + "line": 1, }, }, "range": Array [ - 274, - 275, + 44, + 45, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 12, + "column": 46, + "line": 1, }, "start": Object { - "column": 29, - "line": 12, + "column": 45, + "line": 1, }, }, "range": Array [ - 276, - 282, + 45, + 46, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/mapped-readonly-minus.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 12, - }, - "start": Object { - "column": 35, - "line": 12, - }, - }, - "range": Array [ - 282, - 283, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "map", + "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, + }, + }, + "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", + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "P", + "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", + }, ], - "type": "Punctuator", - "value": ";", - }, - Object { + "kind": "let", "loc": Object { "end": Object { - "column": 10, - "line": 13, + "column": 47, + "line": 1, }, "start": Object { - "column": 4, - "line": 13, + "column": 0, + "line": 1, }, }, "range": Array [ - 288, - 294, + 0, + 47, ], - "type": "Keyword", - "value": "static", + "type": "VariableDeclaration", + }, + ], + "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": 12, - "line": 13, + "column": 3, + "line": 1, }, "start": Object { - "column": 11, - "line": 13, + "column": 0, + "line": 1, }, }, "range": Array [ - 295, - 296, + 0, + 3, ], - "type": "Punctuator", - "value": "[", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 13, + "column": 7, + "line": 1, }, "start": Object { - "column": 12, - "line": 13, + "column": 4, + "line": 1, }, }, "range": Array [ - 296, - 299, + 4, + 7, ], "type": "Identifier", - "value": "baz", + "value": "map", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 13, + "column": 8, + "line": 1, }, "start": Object { - "column": 15, - "line": 13, + "column": 7, + "line": 1, }, }, "range": Array [ - 299, - 300, + 7, + 8, ], "type": "Punctuator", "value": ":", @@ -64559,215 +80551,197 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, - "line": 13, - }, - "start": Object { - "column": 17, - "line": 13, - }, - }, - "range": Array [ - 301, - 307, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 13, + "column": 10, + "line": 1, }, "start": Object { - "column": 23, - "line": 13, + "column": 9, + "line": 1, }, }, "range": Array [ - 307, - 308, + 9, + 10, ], "type": "Punctuator", - "value": "]", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 13, + "column": 12, + "line": 1, }, "start": Object { - "column": 24, - "line": 13, + "column": 11, + "line": 1, }, }, "range": Array [ - 308, - 309, + 11, + 12, ], "type": "Punctuator", - "value": ":", + "value": "-", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 13, + "column": 20, + "line": 1, }, "start": Object { - "column": 26, - "line": 13, + "column": 12, + "line": 1, }, }, "range": Array [ - 310, - 316, + 12, + 20, ], "type": "Identifier", - "value": "string", + "value": "readonly", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 13, + "column": 22, + "line": 1, }, "start": Object { - "column": 32, - "line": 13, + "column": 21, + "line": 1, }, }, "range": Array [ - 316, - 317, + 21, + 22, ], "type": "Punctuator", - "value": ";", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 14, + "column": 23, + "line": 1, }, "start": Object { - "column": 4, - "line": 14, + "column": 22, + "line": 1, }, }, "range": Array [ - 322, - 328, + 22, + 23, ], - "type": "Keyword", - "value": "export", + "type": "Identifier", + "value": "P", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 14, + "column": 26, + "line": 1, }, "start": Object { - "column": 11, - "line": 14, + "column": 24, + "line": 1, }, }, "range": Array [ - 329, - 330, + 24, + 26, ], - "type": "Punctuator", - "value": "[", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 14, + "column": 33, + "line": 1, }, "start": Object { - "column": 12, - "line": 14, + "column": 27, + "line": 1, }, }, "range": Array [ - 330, - 333, + 27, + 33, ], "type": "Identifier", - "value": "baz", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 14, + "column": 34, + "line": 1, }, "start": Object { - "column": 15, - "line": 14, + "column": 33, + "line": 1, }, }, "range": Array [ - 333, - 334, + 33, + 34, ], "type": "Punctuator", - "value": ":", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 14, + "column": 35, + "line": 1, }, "start": Object { - "column": 17, - "line": 14, + "column": 34, + "line": 1, }, }, "range": Array [ - 335, - 341, + 34, + 35, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "-", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 14, + "column": 36, + "line": 1, }, "start": Object { - "column": 23, - "line": 14, + "column": 35, + "line": 1, }, }, "range": Array [ - 341, - 342, + 35, + 36, ], "type": "Punctuator", - "value": "]", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 14, + "column": 37, + "line": 1, }, "start": Object { - "column": 24, - "line": 14, + "column": 36, + "line": 1, }, }, "range": Array [ - 342, - 343, + 36, + 37, ], "type": "Punctuator", "value": ":", @@ -64775,341 +80749,474 @@ Object { Object { "loc": Object { "end": Object { - "column": 32, - "line": 14, + "column": 44, + "line": 1, }, "start": Object { - "column": 26, - "line": 14, + "column": 38, + "line": 1, }, }, "range": Array [ - 344, - 350, + 38, + 44, ], "type": "Identifier", - "value": "string", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 14, + "column": 46, + "line": 1, }, "start": Object { - "column": 32, - "line": 14, + "column": 45, + "line": 1, }, }, "range": Array [ - 350, - 351, + 45, + 46, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 15, + "column": 47, + "line": 1, }, "start": Object { - "column": 4, - "line": 15, + "column": 46, + "line": 1, }, }, "range": Array [ - 356, - 364, + 46, + 47, ], - "type": "Identifier", - "value": "readonly", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/mapped-readonly-plus.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 15, - }, - "start": Object { - "column": 13, - "line": 15, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "map", + "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, + }, + }, + "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", + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "P", + "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", }, - }, - "range": Array [ - 365, - 366, ], - "type": "Punctuator", - "value": "[", - }, - Object { + "kind": "let", "loc": Object { "end": Object { - "column": 17, - "line": 15, + "column": 48, + "line": 1, }, "start": Object { - "column": 14, - "line": 15, + "column": 0, + "line": 1, }, }, "range": Array [ - 366, - 369, + 0, + 48, ], - "type": "Identifier", - "value": "baz", + "type": "VariableDeclaration", + }, + ], + "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": 18, - "line": 15, + "column": 3, + "line": 1, }, "start": Object { - "column": 17, - "line": 15, + "column": 0, + "line": 1, }, }, "range": Array [ - 369, - 370, + 0, + 3, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 15, + "column": 7, + "line": 1, }, "start": Object { - "column": 19, - "line": 15, + "column": 4, + "line": 1, }, }, "range": Array [ - 371, - 377, + 4, + 7, ], "type": "Identifier", - "value": "string", + "value": "map", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 15, + "column": 8, + "line": 1, }, "start": Object { - "column": 25, - "line": 15, + "column": 7, + "line": 1, }, }, "range": Array [ - 377, - 378, + 7, + 8, ], "type": "Punctuator", - "value": "]", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 15, + "column": 10, + "line": 1, }, "start": Object { - "column": 26, - "line": 15, + "column": 9, + "line": 1, }, }, "range": Array [ - 378, - 379, + 9, + 10, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 15, + "column": 12, + "line": 1, }, "start": Object { - "column": 28, - "line": 15, + "column": 11, + "line": 1, }, }, "range": Array [ - 380, - 386, + 11, + 12, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "+", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 15, + "column": 20, + "line": 1, }, "start": Object { - "column": 34, - "line": 15, + "column": 12, + "line": 1, }, }, "range": Array [ - 386, - 387, + 12, + 20, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "readonly", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 17, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 17, + "column": 21, + "line": 1, }, }, "range": Array [ - 393, - 399, + 21, + 22, ], - "type": "Keyword", - "value": "public", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 17, + "column": 23, + "line": 1, }, "start": Object { - "column": 11, - "line": 17, + "column": 22, + "line": 1, }, }, "range": Array [ - 400, - 401, + 22, + 23, ], "type": "Identifier", - "value": "g", + "value": "P", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 17, + "column": 26, + "line": 1, }, "start": Object { - "column": 12, - "line": 17, + "column": 24, + "line": 1, }, }, "range": Array [ - 401, - 402, + 24, + 26, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 17, + "column": 33, + "line": 1, }, "start": Object { - "column": 13, - "line": 17, + "column": 27, + "line": 1, }, }, "range": Array [ - 402, - 405, + 27, + 33, ], "type": "Identifier", - "value": "bar", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 17, + "column": 34, + "line": 1, }, "start": Object { - "column": 16, - "line": 17, + "column": 33, + "line": 1, }, }, "range": Array [ - 405, - 406, + 33, + 34, ], "type": "Punctuator", - "value": ":", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 17, + "column": 35, + "line": 1, }, "start": Object { - "column": 18, - "line": 17, + "column": 34, + "line": 1, }, }, "range": Array [ - 407, - 413, + 34, + 35, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "+", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 17, + "column": 36, + "line": 1, }, "start": Object { - "column": 24, - "line": 17, + "column": 35, + "line": 1, }, }, "range": Array [ - 413, - 414, + 35, + 36, ], "type": "Punctuator", - "value": ")", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 17, + "column": 37, + "line": 1, }, "start": Object { - "column": 25, - "line": 17, + "column": 36, + "line": 1, }, }, "range": Array [ - 414, - 415, + 36, + 37, ], "type": "Punctuator", "value": ":", @@ -65117,35 +81224,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 31, - "line": 17, + "column": 44, + "line": 1, }, "start": Object { - "column": 27, - "line": 17, + "column": 38, + "line": 1, }, }, "range": Array [ - 416, - 420, + 38, + 44, ], - "type": "Keyword", - "value": "void", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 17, + "column": 45, + "line": 1, }, "start": Object { - "column": 31, - "line": 17, + "column": 44, + "line": 1, }, }, "range": Array [ - 420, - 421, + 44, + 45, ], "type": "Punctuator", "value": ";", @@ -65153,287 +81260,560 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, - "line": 18, + "column": 47, + "line": 1, }, "start": Object { - "column": 4, - "line": 18, + "column": 46, + "line": 1, }, }, "range": Array [ - 426, - 433, + 46, + 47, ], - "type": "Keyword", - "value": "private", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 18, + "column": 48, + "line": 1, }, "start": Object { - "column": 12, - "line": 18, + "column": 47, + "line": 1, }, }, "range": Array [ - 434, - 435, + 47, + 48, ], - "type": "Identifier", - "value": "h", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/nested-types.src 1`] = ` +Object { + "body": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 14, - "line": 18, + "column": 80, + "line": 1, }, "start": Object { - "column": 13, - "line": 18, + "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", + }, + ], + }, + ], }, - "range": Array [ - 435, - 436, - ], - "type": "Punctuator", - "value": "(", }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 18, - }, - "start": Object { - "column": 14, - "line": 18, - }, - }, - "range": Array [ - 436, - 439, - ], - "type": "Identifier", - "value": "bar", + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 18, - }, - "start": Object { - "column": 17, - "line": 18, - }, - }, - "range": Array [ - 439, - 440, - ], - "type": "Punctuator", - "value": ":", + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 81, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 25, - "line": 18, + "column": 4, + "line": 1, }, "start": Object { - "column": 19, - "line": 18, + "column": 0, + "line": 1, }, }, "range": Array [ - 441, - 447, + 0, + 4, ], "type": "Identifier", - "value": "string", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 18, + "column": 8, + "line": 1, }, "start": Object { - "column": 25, - "line": 18, + "column": 5, + "line": 1, }, }, "range": Array [ - 447, - 448, + 5, + 8, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 18, + "column": 10, + "line": 1, }, "start": Object { - "column": 26, - "line": 18, + "column": 9, + "line": 1, }, }, "range": Array [ - 448, - 449, + 9, + 10, ], "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 18, - }, - "start": Object { - "column": 28, - "line": 18, - }, - }, - "range": Array [ - 450, - 454, - ], - "type": "Keyword", - "value": "void", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 18, + "column": 12, + "line": 1, }, "start": Object { - "column": 32, - "line": 18, + "column": 11, + "line": 1, }, }, "range": Array [ - 454, - 455, + 11, + 12, ], "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 19, - }, - "start": Object { - "column": 4, - "line": 19, - }, - }, - "range": Array [ - 460, - 469, - ], - "type": "Keyword", - "value": "protected", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 19, + "column": 18, + "line": 1, }, "start": Object { - "column": 14, - "line": 19, + "column": 12, + "line": 1, }, }, "range": Array [ - 470, - 471, + 12, + 18, ], "type": "Identifier", - "value": "i", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 19, - }, - "start": Object { - "column": 15, - "line": 19, - }, - }, - "range": Array [ - 471, - 472, - ], - "type": "Punctuator", - "value": "(", + "value": "number", }, Object { "loc": Object { "end": Object { "column": 19, - "line": 19, - }, - "start": Object { - "column": 16, - "line": 19, - }, - }, - "range": Array [ - 472, - 475, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 19, + "line": 1, }, "start": Object { - "column": 19, - "line": 19, + "column": 18, + "line": 1, }, }, "range": Array [ - 475, - 476, + 18, + 19, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 19, + "column": 26, + "line": 1, }, "start": Object { - "column": 21, - "line": 19, + "column": 20, + "line": 1, }, }, "range": Array [ - 477, - 483, + 20, + 26, ], "type": "Identifier", "value": "string", @@ -65441,841 +81821,829 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, - "line": 19, + "column": 27, + "line": 1, }, "start": Object { - "column": 27, - "line": 19, + "column": 26, + "line": 1, }, }, "range": Array [ - 483, - 484, + 26, + 27, ], "type": "Punctuator", - "value": ")", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 19, + "column": 28, + "line": 1, }, "start": Object { - "column": 28, - "line": 19, + "column": 27, + "line": 1, }, }, "range": Array [ - 484, - 485, + 27, + 28, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 19, + "column": 36, + "line": 1, }, "start": Object { - "column": 30, - "line": 19, + "column": 29, + "line": 1, }, }, "range": Array [ - 486, - 490, + 29, + 36, ], - "type": "Keyword", - "value": "void", + "type": "Identifier", + "value": "boolean", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 19, + "column": 37, + "line": 1, }, "start": Object { - "column": 34, - "line": 19, + "column": 36, + "line": 1, }, }, "range": Array [ - 490, - 491, + 36, + 37, ], "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 20, - }, - "start": Object { - "column": 4, - "line": 20, - }, - }, - "range": Array [ - 496, - 502, - ], - "type": "Keyword", - "value": "static", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 20, + "column": 38, + "line": 1, }, "start": Object { - "column": 11, - "line": 20, + "column": 37, + "line": 1, }, }, "range": Array [ - 503, - 504, + 37, + 38, ], - "type": "Identifier", - "value": "j", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 20, + "column": 40, + "line": 1, }, "start": Object { - "column": 12, - "line": 20, + "column": 39, + "line": 1, }, }, "range": Array [ - 504, - 505, + 39, + 40, ], "type": "Punctuator", - "value": "(", + "value": "|", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 20, + "column": 42, + "line": 1, }, "start": Object { - "column": 13, - "line": 20, + "column": 41, + "line": 1, }, }, "range": Array [ - 505, - 508, + 41, + 42, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 20, + "column": 43, + "line": 1, }, "start": Object { - "column": 16, - "line": 20, + "column": 42, + "line": 1, }, }, "range": Array [ - 508, - 509, + 42, + 43, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 20, + "column": 44, + "line": 1, }, "start": Object { - "column": 18, - "line": 20, + "column": 43, + "line": 1, }, }, "range": Array [ - 510, - 516, + 43, + 44, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 20, + "column": 45, + "line": 1, }, "start": Object { - "column": 24, - "line": 20, + "column": 44, + "line": 1, }, }, "range": Array [ - 516, - 517, + 44, + 45, ], "type": "Punctuator", - "value": ")", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 20, + "column": 47, + "line": 1, }, "start": Object { - "column": 25, - "line": 20, + "column": 46, + "line": 1, }, }, "range": Array [ - 517, - 518, + 46, + 47, ], "type": "Punctuator", - "value": ":", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 20, + "column": 53, + "line": 1, }, "start": Object { - "column": 27, - "line": 20, + "column": 47, + "line": 1, }, }, "range": Array [ - 519, - 523, + 47, + 53, ], - "type": "Keyword", - "value": "void", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 20, + "column": 54, + "line": 1, }, "start": Object { - "column": 31, - "line": 20, + "column": 53, + "line": 1, }, }, "range": Array [ - 523, - 524, + 53, + 54, ], "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 21, - }, - "start": Object { - "column": 4, - "line": 21, - }, - }, - "range": Array [ - 529, - 535, - ], - "type": "Keyword", - "value": "export", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 21, + "column": 55, + "line": 1, }, "start": Object { - "column": 11, - "line": 21, + "column": 54, + "line": 1, }, }, "range": Array [ - 536, - 537, + 54, + 55, ], - "type": "Identifier", - "value": "k", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 21, + "column": 57, + "line": 1, }, "start": Object { - "column": 12, - "line": 21, + "column": 56, + "line": 1, }, }, "range": Array [ - 537, - 538, + 56, + 57, ], "type": "Punctuator", - "value": "(", + "value": "|", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 21, + "column": 62, + "line": 1, }, "start": Object { - "column": 13, - "line": 21, + "column": 58, + "line": 1, }, }, "range": Array [ - 538, - 541, + 58, + 62, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 21, + "column": 64, + "line": 1, }, "start": Object { - "column": 16, - "line": 21, + "column": 63, + "line": 1, }, }, "range": Array [ - 541, - 542, + 63, + 64, ], "type": "Punctuator", - "value": ":", + "value": "&", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 21, + "column": 72, + "line": 1, }, "start": Object { - "column": 18, - "line": 21, + "column": 65, + "line": 1, }, }, "range": Array [ - 543, - 549, + 65, + 72, ], "type": "Identifier", - "value": "string", + "value": "boolean", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 21, + "column": 73, + "line": 1, }, "start": Object { - "column": 24, - "line": 21, + "column": 72, + "line": 1, }, }, "range": Array [ - 549, - 550, + 72, + 73, ], "type": "Punctuator", - "value": ")", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 21, + "column": 74, + "line": 1, }, "start": Object { - "column": 25, - "line": 21, + "column": 73, + "line": 1, }, }, "range": Array [ - 550, - 551, + 73, + 74, ], "type": "Punctuator", - "value": ":", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 21, + "column": 75, + "line": 1, }, "start": Object { - "column": 27, - "line": 21, + "column": 74, + "line": 1, }, }, "range": Array [ - 552, - 556, + 74, + 75, ], - "type": "Keyword", - "value": "void", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 21, + "column": 77, + "line": 1, }, "start": Object { - "column": 31, - "line": 21, + "column": 76, + "line": 1, }, }, "range": Array [ - 556, - 557, + 76, + 77, ], "type": "Punctuator", - "value": ";", + "value": "&", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 22, + "column": 79, + "line": 1, }, "start": Object { - "column": 4, - "line": 22, + "column": 78, + "line": 1, }, }, "range": Array [ - 562, - 570, + 78, + 79, ], - "type": "Identifier", - "value": "readonly", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 22, + "column": 80, + "line": 1, }, "start": Object { - "column": 13, - "line": 22, + "column": 79, + "line": 1, }, }, "range": Array [ - 571, - 572, + 79, + 80, ], - "type": "Identifier", - "value": "l", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/parenthesized-type.src 1`] = ` +Object { + "body": Array [ Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 15, - "line": 22, + "column": 28, + "line": 1, }, "start": Object { - "column": 14, - "line": 22, + "column": 0, + "line": 1, }, }, "range": Array [ - 572, - 573, + 0, + 28, ], - "type": "Punctuator", - "value": "(", + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 28, + ], + "type": "TSParenthesizedType", + "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", + }, + ], + }, + }, + }, + ], + "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": 18, - "line": 22, + "column": 4, + "line": 1, }, "start": Object { - "column": 15, - "line": 22, + "column": 0, + "line": 1, }, }, "range": Array [ - 573, - 576, + 0, + 4, ], "type": "Identifier", - "value": "bar", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 22, + "column": 8, + "line": 1, }, "start": Object { - "column": 18, - "line": 22, + "column": 5, + "line": 1, }, }, "range": Array [ - 576, - 577, + 5, + 8, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 22, + "column": 10, + "line": 1, }, "start": Object { - "column": 20, - "line": 22, + "column": 9, + "line": 1, }, }, "range": Array [ - 578, - 584, + 9, + 10, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 22, + "column": 12, + "line": 1, }, "start": Object { - "column": 26, - "line": 22, + "column": 11, + "line": 1, }, }, "range": Array [ - 584, - 585, + 11, + 12, ], "type": "Punctuator", - "value": ")", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 22, + "column": 18, + "line": 1, }, "start": Object { - "column": 27, - "line": 22, + "column": 12, + "line": 1, }, }, "range": Array [ - 585, - 586, + 12, + 18, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 22, + "column": 20, + "line": 1, }, "start": Object { - "column": 29, - "line": 22, + "column": 19, + "line": 1, }, }, "range": Array [ - 587, - 591, + 19, + 20, ], - "type": "Keyword", - "value": "void", + "type": "Punctuator", + "value": "|", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 22, + "column": 27, + "line": 1, }, "start": Object { - "column": 33, - "line": 22, + "column": 21, + "line": 1, }, }, "range": Array [ - 591, - 592, + 21, + 27, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 23, + "column": 28, + "line": 1, }, "start": Object { - "column": 0, - "line": 23, + "column": 27, + "line": 1, }, }, "range": Array [ - 593, - 594, + 27, + 28, ], "type": "Punctuator", - "value": "}", + "value": ")", }, ], "type": "Program", } `; -exports[`typescript fixtures/expressions/call-expression-type-arguments.src 1`] = ` +exports[`typescript fixtures/types/reference.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "CallExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, - }, - "params": Array [ - Object { + "name": "x", + "range": Array [ + 4, + 8, + ], + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { - "column": 4, + "column": 5, "line": 1, }, }, "range": Array [ - 4, 5, + 8, ], - "type": "TSTypeReference", - "typeName": Object { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { - "column": 4, + "column": 7, "line": 1, }, }, - "name": "A", "range": Array [ - 4, - 5, + 7, + 8, ], - "type": "Identifier", - }, - }, - ], - "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 { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + }, }, }, - "name": "foo", - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 10, - 23, - ], - "type": "CallExpression", - "typeParameters": Object { + "init": null, "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 3, - "line": 2, + "column": 4, + "line": 1, }, }, - "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, + 4, + 8, ], - "type": "TSTypeParameterInstantiation", + "type": "VariableDeclarator", }, - }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 9, + "line": 1, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 10, - 24, + 0, + 9, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 14, + "column": 0, "line": 2, }, "start": Object { @@ -66285,7 +82653,7 @@ Object { }, "range": Array [ 0, - 24, + 10, ], "sourceType": "script", "tokens": Array [ @@ -66304,26 +82672,8 @@ Object { 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": "<", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { @@ -66341,7 +82691,7 @@ Object { 5, ], "type": "Identifier", - "value": "A", + "value": "x", }, Object { "loc": Object { @@ -66359,184 +82709,353 @@ Object { 6, ], "type": "Punctuator", - "value": ">", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 8, "line": 1, }, "start": Object { - "column": 6, + "column": 7, "line": 1, }, }, "range": Array [ - 6, 7, + 8, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 9, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "range": Array [ - 7, 8, + 9, ], "type": "Punctuator", - "value": ")", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/reference-generic.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "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 { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "Array", + "range": Array [ + 7, + 12, + ], + "type": "Identifier", + }, + "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", + }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 9, + "column": 21, "line": 1, }, "start": Object { - "column": 8, + "column": 0, "line": 1, }, }, "range": Array [ - 8, - 9, + 0, + 21, ], - "type": "Punctuator", - "value": ";", + "type": "VariableDeclaration", + }, + ], + "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": 2, + "line": 1, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 10, - 13, + 0, + 3, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { "column": 4, - "line": 2, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, }, "start": Object { - "column": 3, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 13, - 14, + 5, + 6, ], "type": "Punctuator", - "value": "<", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 14, - 20, + 7, + 12, ], "type": "Identifier", - "value": "number", + "value": "Array", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 20, - 21, + 12, + 13, ], "type": "Punctuator", - "value": ">", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 21, - 22, + 13, + 19, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ - 22, - 23, + 19, + 20, ], "type": "Punctuator", - "value": ")", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 13, - "line": 2, + "column": 20, + "line": 1, }, }, "range": Array [ - 23, - 24, + 20, + 21, ], "type": "Punctuator", "value": ";", @@ -66546,7 +83065,7 @@ Object { } `; -exports[`typescript fixtures/expressions/new-expression-type-arguments.src 1`] = ` +exports[`typescript fixtures/types/reference-generic-nested.src 1`] = ` Object { "body": Array [ Object { @@ -66555,132 +83074,185 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 27, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, - "name": "a", + "name": "x", "range": Array [ - 6, - 7, + 4, + 27, ], "type": "Identifier", - }, - "init": Object { - "arguments": Array [], - "callee": Object { + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 15, + "column": 27, "line": 1, }, "start": Object { - "column": 14, + "column": 5, "line": 1, }, }, - "name": "A", "range": Array [ - 14, - 15, + 5, + 27, ], - "type": "Identifier", - }, - "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, + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, }, - }, - "params": Array [ - Object { + "range": Array [ + 7, + 27, + ], + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 17, + "column": 12, "line": 1, }, "start": Object { - "column": 16, + "column": 7, "line": 1, }, }, + "name": "Array", "range": Array [ - 16, - 17, + 7, + 12, ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, + "type": "Identifier", + }, + "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 { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "Array", + "range": Array [ + 13, + 18, + ], + "type": "Identifier", }, - "start": Object { - "column": 16, - "line": 1, + "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", }, }, - "name": "B", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, + ], + "range": Array [ + 12, + 27, + ], + "type": "TSTypeParameterInstantiation", }, - ], - "range": Array [ - 15, - 18, - ], - "type": "TSTypeParameterInstantiation", + }, }, }, + "init": null, "loc": Object { "end": Object { - "column": 20, + "column": 27, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 20, + 4, + 27, ], "type": "VariableDeclarator", }, ], - "kind": "const", + "kind": "let", "loc": Object { "end": Object { - "column": 21, + "column": 28, "line": 1, }, "start": Object { @@ -66690,15 +83262,15 @@ Object { }, "range": Array [ 0, - 21, + 28, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -66707,14 +83279,14 @@ Object { }, "range": Array [ 0, - 21, + 29, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -66724,187 +83296,187 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "const", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 7, + 4, + 5, ], "type": "Identifier", - "value": "a", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { - "column": 8, + "column": 5, "line": 1, }, }, "range": Array [ - 8, - 9, + 5, + 6, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 12, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ - 10, - 13, + 7, + 12, ], - "type": "Keyword", - "value": "new", + "type": "Identifier", + "value": "Array", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 13, "line": 1, }, "start": Object { - "column": 14, + "column": 12, "line": 1, }, }, "range": Array [ - 14, - 15, + 12, + 13, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { - "column": 15, + "column": 13, "line": 1, }, }, "range": Array [ - 15, - 16, + 13, + 18, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "Array", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 19, "line": 1, }, "start": Object { - "column": 16, + "column": 18, "line": 1, }, }, "range": Array [ - 16, - 17, + 18, + 19, ], - "type": "Identifier", - "value": "B", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 25, "line": 1, }, "start": Object { - "column": 17, + "column": 19, "line": 1, }, }, "range": Array [ - 17, - 18, + 19, + 25, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 26, "line": 1, }, "start": Object { - "column": 18, + "column": 25, "line": 1, }, }, "range": Array [ - 18, - 19, + 25, + 26, ], "type": "Punctuator", - "value": "(", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 27, "line": 1, }, "start": Object { - "column": 19, + "column": 26, "line": 1, }, }, "range": Array [ - 19, - 20, + 26, + 27, ], "type": "Punctuator", - "value": ")", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 28, "line": 1, }, "start": Object { - "column": 20, + "column": 27, "line": 1, }, }, "range": Array [ - 20, - 21, + 27, + 28, ], "type": "Punctuator", "value": ";", @@ -66914,144 +83486,139 @@ Object { } `; -exports[`typescript fixtures/expressions/tagged-template-expression-type-arguments.src 1`] = ` +exports[`typescript fixtures/types/tuple.src 1`] = ` Object { "body": Array [ Object { - "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, - }, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, }, - "range": Array [ - 8, - 13, - ], - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "baz", - "raw": "baz", + "start": Object { + "column": 4, + "line": 1, }, }, - ], - "range": Array [ - 8, - 13, - ], - "type": "TemplateLiteral", - }, - "range": Array [ - 0, - 13, - ], - "tag": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 0, - 3, - ], - "type": "Identifier", - }, - "type": "TaggedTemplateExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "params": Array [ - Object { + "name": "x", + "range": Array [ + 4, + 31, + ], + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 7, + "column": 31, "line": 1, }, "start": Object { - "column": 4, + "column": 5, "line": 1, }, }, "range": Array [ - 4, - 7, + 5, + 31, ], - "type": "TSTypeReference", - "typeName": Object { + "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": 7, + "column": 31, "line": 1, }, "start": Object { - "column": 4, + "column": 7, "line": 1, }, }, - "name": "bar", "range": Array [ - 4, 7, + 31, ], - "type": "Identifier", + "type": "TSTupleType", }, }, - ], + }, + "init": null, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, "range": Array [ - 3, - 8, + 4, + 31, ], - "type": "TSTypeParameterInstantiation", + "type": "VariableDeclarator", }, - }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 14, + "column": 32, "line": 1, }, "start": Object { @@ -67061,15 +83628,15 @@ Object { }, "range": Array [ 0, - 14, + 32, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -67078,7 +83645,7 @@ Object { }, "range": Array [ 0, - 14, + 33, ], "sourceType": "script", "tokens": Array [ @@ -67097,95 +83664,185 @@ Object { 0, 3, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 5, "line": 1, }, "start": Object { - "column": 3, + "column": 4, "line": 1, }, }, "range": Array [ - 3, 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": "<", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 8, "line": 1, }, "start": Object { - "column": 4, + "column": 7, "line": 1, }, }, "range": Array [ - 4, 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": "bar", + "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": 8, + "column": 30, "line": 1, }, "start": Object { - "column": 7, + "column": 24, "line": 1, }, }, "range": Array [ - 7, - 8, + 24, + 30, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 31, "line": 1, }, "start": Object { - "column": 8, + "column": 30, "line": 1, }, }, "range": Array [ - 8, - 13, + 30, + 31, ], - "type": "Template", - "value": "\`baz\`", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 32, "line": 1, }, "start": Object { - "column": 13, + "column": 31, "line": 1, }, }, "range": Array [ - 13, - 14, + 31, + 32, ], "type": "Punctuator", "value": ";", @@ -67195,126 +83852,88 @@ Object { } `; -exports[`typescript fixtures/namespaces-and-modules/ambient-module-declaration-with-import.src 1`] = ` +exports[`typescript fixtures/types/tuple-empty.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 9, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 4, + "line": 1, }, }, + "name": "x", "range": Array [ - 34, - 54, + 4, + 9, ], - "source": Object { + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 9, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 49, - 53, + 5, + 9, ], - "raw": "'fs'", - "type": "Literal", - "value": "fs", - }, - "specifiers": Array [ - Object { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "elementTypes": Array [], "loc": Object { "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { "column": 9, - "line": 2, + "line": 1, }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, + "start": Object { + "column": 7, + "line": 1, }, - "name": "fs", - "range": Array [ - 41, - 43, - ], - "type": "Identifier", }, "range": Array [ - 41, - 43, + 7, + 9, ], - "type": "ImportDefaultSpecifier", + "type": "TSTupleType", }, - ], - "type": "ImportDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 56, - ], - "type": "TSModuleBlock", - }, - "declare": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, + }, }, - "start": Object { - "column": 15, - "line": 1, + "init": null, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 9, + ], + "type": "VariableDeclarator", }, - "range": Array [ - 15, - 29, - ], - "raw": "\\"i-use-things\\"", - "type": "Literal", - "value": "i-use-things", - }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 10, + "line": 1, }, "start": Object { "column": 0, @@ -67323,15 +83942,15 @@ Object { }, "range": Array [ 0, - 56, + 10, ], - "type": "TSModuleDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -67340,14 +83959,14 @@ Object { }, "range": Array [ 0, - 57, + 11, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 3, "line": 1, }, "start": Object { @@ -67357,423 +83976,327 @@ Object { }, "range": Array [ 0, - 7, + 3, ], - "type": "Identifier", - "value": "declare", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 4, "line": 1, }, }, "range": Array [ - 8, - 14, + 4, + 5, ], "type": "Identifier", - "value": "module", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 6, "line": 1, }, "start": Object { - "column": 15, + "column": 5, "line": 1, }, }, "range": Array [ - 15, - 29, + 5, + 6, ], - "type": "String", - "value": "\\"i-use-things\\"", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 8, "line": 1, }, "start": Object { - "column": 30, + "column": 7, "line": 1, }, }, "range": Array [ - 30, - 31, + 7, + 8, ], "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", + "value": "[", }, 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, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 53, - 54, + 8, + 9, ], "type": "Punctuator", - "value": ";", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 10, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 9, + "line": 1, }, }, "range": Array [ - 55, - 56, + 9, + 10, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/namespaces-and-modules/declare-namespace-with-exported-function.src 1`] = ` +exports[`typescript fixtures/types/tuple-optional.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "declaration": Object { - "async": false, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "name": "select", - "range": Array [ - 41, - 47, - ], - "type": "Identifier", + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 44, + ], + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 59, - "line": 2, + "column": 44, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 5, + "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, + "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", }, - "name": "selector", - "range": Array [ - 48, - 64, - ], - "type": "Identifier", - "typeAnnotation": Object { + Object { "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 33, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 56, - 64, + 16, + 23, ], - "type": "TSTypeAnnotation", + "type": "TSOptionalType", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 35, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 58, - 64, + 16, + 22, ], - "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, + "type": "TSNumberKeyword", }, }, - "range": Array [ - 67, - 81, - ], - "type": "TSTypeReference", - "typeName": Object { + Object { "loc": Object { "end": Object { - "column": 53, - "line": 2, + "column": 43, + "line": 1, }, "start": Object { - "column": 44, - "line": 2, + "column": 25, + "line": 1, }, }, - "name": "Selection", "range": Array [ - 67, - 76, + 25, + 43, ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 2, - }, - "start": Object { - "column": 53, - "line": 2, + "type": "TSOptionalType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, }, - }, - "params": Array [ - Object { + "range": Array [ + 25, + 42, + ], + "type": "TSParenthesizedType", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 57, - "line": 2, + "column": 41, + "line": 1, }, "start": Object { - "column": 54, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 77, - 80, + 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", + }, ], - "type": "TSAnyKeyword", }, - ], - "range": Array [ - 76, - 81, - ], - "type": "TSTypeParameterInstantiation", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, }, }, - }, - "type": "FunctionDeclaration", - }, - "loc": Object { - "end": Object { - "column": 59, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, + "range": Array [ + 7, + 44, + ], + "type": "TSTupleType", }, }, - "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, - "id": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, }, - "start": Object { - "column": 18, - "line": 1, + "init": null, + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 44, + ], + "type": "VariableDeclarator", }, - "name": "d3", - "range": Array [ - 18, - 20, - ], - "type": "Identifier", - }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 44, + "line": 1, }, "start": Object { "column": 0, @@ -67782,15 +84305,15 @@ Object { }, "range": Array [ 0, - 84, + 44, ], - "type": "TSModuleDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -67799,14 +84322,14 @@ Object { }, "range": Array [ 0, - 84, + 45, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 3, "line": 1, }, "start": Object { @@ -67816,46 +84339,100 @@ Object { }, "range": Array [ 0, - 7, + 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": "declare", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 17, + "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, - 17, ], - "type": "Identifier", - "value": "namespace", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 14, "line": 1, }, "start": Object { - "column": 18, + "column": 8, "line": 1, }, }, "range": Array [ - 18, - 20, + 8, + 14, ], "type": "Identifier", - "value": "d3", + "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 { @@ -67864,464 +84441,680 @@ Object { "line": 1, }, "start": Object { - "column": 21, + "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 [ - 21, 22, + 23, ], "type": "Punctuator", - "value": "{", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "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, - 31, + 26, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ + 26, 32, - 40, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 34, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "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", +} +`; + +exports[`typescript fixtures/types/tuple-rest.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "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", }, - }, - "range": Array [ - 41, - 47, ], - "type": "Identifier", - "value": "select", - }, - Object { + "kind": "let", "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 47, - 48, + 0, + 28, ], - "type": "Punctuator", - "value": "(", + "type": "VariableDeclaration", + }, + ], + "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": 33, - "line": 2, + "column": 3, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 48, - 56, + 0, + 3, ], - "type": "Identifier", - "value": "selector", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 33, - "line": 2, + "column": 4, + "line": 1, }, }, "range": Array [ - 56, - 57, + 4, + 5, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 35, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 58, - 64, + 5, + 6, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 41, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 64, - 65, + 7, + 8, ], "type": "Punctuator", - "value": ")", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 43, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 42, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 65, - 66, + 8, + 14, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 53, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 44, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 67, - 76, + 14, + 15, ], - "type": "Identifier", - "value": "Selection", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 54, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 53, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 76, - 77, + 16, + 19, ], "type": "Punctuator", - "value": "<", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 57, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 54, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ - 77, - 80, + 19, + 25, ], "type": "Identifier", - "value": "any", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 58, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 57, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 80, - 81, + 25, + 26, ], "type": "Punctuator", - "value": ">", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 59, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 58, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 81, - 82, + 26, + 27, ], "type": "Punctuator", - "value": ";", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 27, + "line": 1, }, }, "range": Array [ - 83, - 84, + 27, + 28, ], "type": "Punctuator", - "value": "}", + "value": "]", }, ], "type": "Program", } `; -exports[`typescript fixtures/namespaces-and-modules/global-module-declaration.src 1`] = ` +exports[`typescript fixtures/types/tuple-type.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "elementTypes": 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, - "id": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "name": "global", - "range": Array [ - 36, - 42, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 18, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 21, - 51, + 12, + 18, ], - "type": "TSModuleDeclaration", + "type": "TSStringKeyword", }, Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 29, - "line": 5, - }, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, }, - "range": Array [ - 81, - 89, - ], - "type": "TSModuleBlock", }, - "declare": true, - "id": Object { + "range": Array [ + 20, + 27, + ], + "type": "TSOptionalType", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 28, - "line": 5, + "column": 26, + "line": 1, }, "start": Object { - "column": 22, - "line": 5, + "column": 20, + "line": 1, }, }, - "name": "global", "range": Array [ - 74, - 80, + 20, + 26, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 5, - }, + "type": "TSStringKeyword", }, - "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 { "loc": Object { "end": Object { - "column": 14, + "column": 28, "line": 1, }, "start": Object { - "column": 8, + "column": 11, "line": 1, }, }, - "name": "global", "range": Array [ - 8, - 14, + 11, + 28, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "TSTupleType", }, - "range": Array [ - 0, - 91, - ], - "type": "TSModuleDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 9, + "line": 2, }, "start": Object { "column": 0, @@ -68330,14 +85123,14 @@ Object { }, "range": Array [ 0, - 92, + 29, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 4, "line": 1, }, "start": Object { @@ -68347,1158 +85140,1575 @@ Object { }, "range": Array [ 0, - 7, + 4, ], "type": "Identifier", - "value": "declare", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { "column": 8, "line": 1, }, - }, - "range": Array [ - 8, - 14, - ], - "type": "Keyword", - "value": "global", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, "start": Object { - "column": 15, + "column": 5, "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, + 5, + 8, ], "type": "Identifier", - "value": "module", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 36, - 42, - ], - "type": "Keyword", - "value": "global", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 43, - 44, - ], - "type": "Punctuator", - "value": "{", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 10, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 9, + "line": 1, }, }, "range": Array [ - 50, - 51, + 9, + 10, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 5, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 11, + "line": 1, }, }, "range": Array [ - 56, - 63, + 11, + 12, ], - "type": "Identifier", - "value": "declare", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 5, + "column": 18, + "line": 1, }, "start": Object { "column": 12, - "line": 5, + "line": 1, }, }, "range": Array [ - 64, - 73, + 12, + 18, ], "type": "Identifier", - "value": "namespace", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 5, + "column": 19, + "line": 1, }, "start": Object { - "column": 22, - "line": 5, + "column": 18, + "line": 1, }, }, "range": Array [ - 74, - 80, + 18, + 19, ], - "type": "Keyword", - "value": "global", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 5, + "column": 26, + "line": 1, }, "start": Object { - "column": 29, - "line": 5, + "column": 20, + "line": 1, }, }, "range": Array [ - 81, - 82, + 20, + 26, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 7, + "column": 27, + "line": 1, }, "start": Object { - "column": 4, - "line": 7, + "column": 26, + "line": 1, }, }, "range": Array [ - 88, - 89, + 26, + 27, ], "type": "Punctuator", - "value": "}", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 8, + "column": 28, + "line": 1, }, "start": Object { - "column": 0, - "line": 8, + "column": 27, + "line": 1, }, }, "range": Array [ - 90, - 91, + 27, + 28, ], "type": "Punctuator", - "value": "}", + "value": "]", }, ], "type": "Program", } `; -exports[`typescript fixtures/namespaces-and-modules/module-with-default-exports.src 1`] = ` +exports[`typescript fixtures/types/type-literal.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "declaration": Object { - "body": Object { - "body": Array [ + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "obj", + "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 { "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 12, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 11, + "line": 1, }, }, - "name": "method", + "name": "x", "range": Array [ - 52, - 58, + 11, + 12, ], "type": "Identifier", }, - "kind": "method", "loc": Object { "end": Object { - "column": 22, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 11, + "line": 1, }, }, "range": Array [ - 52, - 66, + 11, + 20, ], - "static": false, - "type": "MethodDefinition", - "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", - }, - "expression": false, - "generator": false, - "id": null, + "type": "TSPropertySignature", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 22, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 12, + "line": 1, }, }, - "params": Array [], "range": Array [ - 58, - 66, + 12, + 20, ], - "returnType": Object { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 19, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { - "column": 16, - "line": 3, + "column": 14, + "line": 1, }, }, "range": Array [ - 60, - 63, + 14, + 20, ], - "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 { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 3, - }, - }, - "name": "C", - "range": Array [ - 62, - 63, - ], - "type": "Identifier", - }, - }, + "type": "TSNumberKeyword", }, - "type": "FunctionExpression", }, }, ], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 42, - 73, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "C", "range": Array [ - 40, - 41, + 9, + 22, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 34, - 73, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, + "type": "TSTypeLiteral", }, }, - "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", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 5, - }, - "start": Object { - "column": 28, - "line": 5, - }, - }, - "name": "bar", - "range": Array [ - 102, - 105, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, - }, - "params": Array [], - "range": Array [ - 93, - 110, - ], - "type": "FunctionDeclaration", + "init": null, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, + "start": Object { + "column": 4, + "line": 1, }, - "range": Array [ - 78, - 110, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 13, - "line": 1, }, + "range": Array [ + 4, + 22, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, - "range": Array [ - 13, - 112, - ], - "type": "TSModuleBlock", }, - "id": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, + "range": Array [ + 0, + 23, + ], + "type": "VariableDeclaration", + }, + ], + "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, - 12, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ":", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 10, + "line": 1, }, "start": Object { - "column": 0, + "column": 9, "line": 1, }, }, "range": Array [ - 0, - 112, + 9, + 10, ], - "type": "TSModuleDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "{", }, - }, - "range": Array [ - 0, - 114, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 12, "line": 1, }, "start": Object { - "column": 0, + "column": 11, "line": 1, }, }, "range": Array [ - 0, - 6, + 11, + 12, ], "type": "Identifier", - "value": "module", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 13, "line": 1, }, "start": Object { - "column": 7, + "column": 12, "line": 1, }, }, "range": Array [ - 7, 12, + 13, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 20, "line": 1, }, "start": Object { - "column": 13, + "column": 14, "line": 1, }, }, "range": Array [ - 13, 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": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 19, - 25, + 22, + 23, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/type-operator.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "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 { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 14, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 26, - 33, + 0, + 15, ], - "type": "Keyword", - "value": "default", + "type": "VariableDeclaration", }, Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "y", + "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", + }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 24, + "column": 21, "line": 2, }, "start": Object { - "column": 19, + "column": 0, "line": 2, }, }, "range": Array [ - 34, - 39, + 16, + 37, + ], + "type": "VariableDeclaration", + }, + ], + "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": "class", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 4, + "line": 1, }, }, "range": Array [ - 40, - 41, + 4, + 5, ], "type": "Identifier", - "value": "C", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 27, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 42, - 43, + 5, + 6, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 12, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 7, + "line": 1, }, }, "range": Array [ - 52, - 58, + 7, + 12, ], "type": "Identifier", - "value": "method", + "value": "keyof", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 13, + "line": 1, }, }, "range": Array [ - 58, - 59, + 13, + 14, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 15, - "line": 3, + "column": 14, + "line": 1, }, }, "range": Array [ - 59, - 60, + 14, + 15, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 3, + "column": 3, + "line": 2, }, "start": Object { - "column": 16, - "line": 3, + "column": 0, + "line": 2, }, }, "range": Array [ - 60, - 61, + 16, + 19, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 3, + "column": 5, + "line": 2, }, "start": Object { - "column": 18, - "line": 3, + "column": 4, + "line": 2, }, }, "range": Array [ - 62, - 63, + 20, + 21, ], "type": "Identifier", - "value": "C", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 3, + "column": 6, + "line": 2, }, "start": Object { - "column": 20, - "line": 3, + "column": 5, + "line": 2, }, }, "range": Array [ - 64, - 65, + 21, + 22, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 3, + "column": 13, + "line": 2, }, "start": Object { - "column": 21, - "line": 3, + "column": 7, + "line": 2, }, }, "range": Array [ - 65, - 66, + 23, + 29, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "unique", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 20, + "line": 2, }, "start": Object { - "column": 22, - "line": 3, + "column": 14, + "line": 2, }, }, "range": Array [ - 66, - 67, + 30, + 36, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "symbol", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 21, + "line": 2, }, "start": Object { - "column": 4, - "line": 4, + "column": 20, + "line": 2, }, }, "range": Array [ - 72, - 73, + 36, + 37, ], "type": "Punctuator", - "value": "}", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/typeof.src 1`] = ` +Object { + "body": Array [ Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "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 { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 17, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "type": "TSQualifiedName", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 17, + ], + "type": "TSTypeQuery", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 17, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 10, - "line": 5, + "column": 18, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 78, - 84, + 0, + 18, ], - "type": "Keyword", - "value": "export", + "type": "VariableDeclaration", + }, + ], + "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": 18, - "line": 5, + "column": 3, + "line": 1, }, "start": Object { - "column": 11, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 85, - 92, + 0, + 3, ], "type": "Keyword", - "value": "default", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 5, + "column": 5, + "line": 1, }, "start": Object { - "column": 19, - "line": 5, + "column": 4, + "line": 1, }, }, "range": Array [ - 93, - 101, + 4, + 5, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 5, + "column": 6, + "line": 1, }, "start": Object { - "column": 28, - "line": 5, + "column": 5, + "line": 1, }, }, "range": Array [ - 102, - 105, + 5, + 6, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 5, + "column": 13, + "line": 1, }, "start": Object { - "column": 31, - "line": 5, + "column": 7, + "line": 1, }, }, "range": Array [ - 105, - 106, + 7, + 13, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "typeof", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 5, + "column": 15, + "line": 1, }, "start": Object { - "column": 32, - "line": 5, + "column": 14, + "line": 1, }, }, "range": Array [ - 106, - 107, + 14, + 15, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 5, + "column": 16, + "line": 1, }, "start": Object { - "column": 34, - "line": 5, + "column": 15, + "line": 1, }, }, "range": Array [ - 108, - 109, + 15, + 16, ], "type": "Punctuator", - "value": "{", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 36, - "line": 5, + "column": 17, + "line": 1, }, "start": Object { - "column": 35, - "line": 5, + "column": 16, + "line": 1, }, }, "range": Array [ - 109, - 110, + 16, + 17, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 18, + "line": 1, }, "start": Object { - "column": 0, - "line": 6, + "column": 17, + "line": 1, }, }, "range": Array [ - 111, - 112, + 17, + 18, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/namespaces-and-modules/nested-internal-module.src 1`] = ` +exports[`typescript fixtures/types/union-intersection.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "declaration": Object { - "declarations": Array [ - Object { - "id": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "union", + "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": 16, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 15, - "line": 3, + "column": 11, + "line": 1, }, }, - "name": "x", "range": Array [ - 27, - 28, + 11, + 17, ], - "type": "Identifier", + "type": "TSNumberKeyword", }, - "init": Object { + Object { "loc": Object { "end": Object { - "column": 32, - "line": 3, + "column": 24, + "line": 1, }, "start": Object { - "column": 19, - "line": 3, + "column": 20, + "line": 1, }, }, "range": Array [ - 31, - 44, + 20, + 24, ], - "raw": "'hello world'", - "type": "Literal", - "value": "hello world", + "type": "TSNullKeyword", }, - "loc": Object { - "end": Object { - "column": 32, - "line": 3, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, }, - "start": Object { - "column": 15, - "line": 3, + "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", + }, + ], + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "intersection", + "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", }, - "range": Array [ - 27, - 44, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, + ], }, - "range": Array [ - 23, - 44, - ], - "type": "VariableDeclaration", }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 42, + 71, + ], + "type": "VariableDeclarator", + }, + ], + "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 { + "id": Object { "loc": Object { "end": Object { - "column": 32, + "column": 42, "line": 3, }, "start": Object { @@ -69506,580 +86716,321 @@ Object { "line": 3, }, }, + "name": "precedence1", "range": Array [ - 16, - 44, + 77, + 115, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - Object { - "declaration": Object { - "body": Object { - "body": Array [ + "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 { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 3, }, - "name": "constructor", - "range": Array [ - 78, - 89, - ], - "type": "Identifier", }, - "kind": "constructor", + "range": Array [ + 90, + 96, + ], + "type": "TSNumberKeyword", + }, + Object { "loc": Object { "end": Object { - "column": 59, - "line": 5, + "column": 42, + "line": 3, }, "start": Object { - "column": 8, - "line": 5, + "column": 26, + "line": 3, }, }, "range": Array [ - 78, - 129, + 99, + 115, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "type": "TSIntersectionType", + "types": Array [ + Object { "loc": Object { "end": Object { - "column": 59, - "line": 5, + "column": 32, + "line": 3, }, "start": Object { - "column": 56, - "line": 5, + "column": 26, + "line": 3, }, }, "range": Array [ - 126, - 129, + 99, + 105, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 59, - "line": 5, - }, - "start": Object { - "column": 19, - "line": 5, - }, + "type": "TSStringKeyword", }, - "params": Array [ - Object { - "accessibility": "public", - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 5, - }, - }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 5, - }, - "start": Object { - "column": 27, - "line": 5, - }, - }, - "name": "x", - "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, - ], - "type": "TSParameterProperty", - }, - Object { - "accessibility": "public", - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 38, - "line": 5, - }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 3, }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 45, - "line": 5, - }, - }, - "name": "y", - "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", - }, - }, + "start": Object { + "column": 35, + "line": 3, }, - "range": Array [ - 108, - 124, - ], - "type": "TSParameterProperty", }, - ], - "range": Array [ - 89, - 129, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 68, - 135, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, + "range": Array [ + 108, + 115, + ], + "type": "TSBooleanKeyword", + }, + ], }, - }, - "name": "Point", - "range": Array [ - 62, - 67, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 11, - "line": 4, - }, }, - "range": Array [ - 56, - 135, - ], - "superClass": null, - "type": "ClassDeclaration", }, - "loc": Object { - "end": Object { - "column": 5, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 4, - }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 42, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, }, - "range": Array [ - 49, - 135, - ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", }, - Object { - "declaration": Object { - "body": Object { - "body": Array [ - Object { - "declaration": Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "name": "name", - "range": Array [ - 200, - 204, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 9, - }, - "start": Object { - "column": 12, - "line": 9, - }, - }, - "range": Array [ - 200, - 213, - ], - "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", - }, - }, - }, - ], + "range": Array [ + 77, + 115, + ], + "type": "VariableDeclarator", + }, + ], + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "name": "precedence2", + "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": 9, - "line": 10, + "column": 23, + "line": 4, }, "start": Object { - "column": 28, - "line": 8, + "column": 17, + "line": 4, }, }, "range": Array [ - 186, - 223, + 134, + 140, ], - "type": "TSInterfaceBody", + "type": "TSNumberKeyword", }, - "heritage": Array [], - "id": Object { + Object { "loc": Object { "end": Object { - "column": 27, - "line": 8, + "column": 32, + "line": 4, }, "start": Object { - "column": 25, - "line": 8, + "column": 26, + "line": 4, }, }, - "name": "Id", "range": Array [ - 183, - 185, + 143, + 149, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 10, - }, - "start": Object { - "column": 15, - "line": 8, - }, + "type": "TSStringKeyword", }, - "range": Array [ - 173, - 223, - ], - "type": "TSInterfaceDeclaration", - }, + ], + }, + Object { "loc": Object { "end": Object { - "column": 9, - "line": 10, + "column": 42, + "line": 4, }, "start": Object { - "column": 8, - "line": 8, + "column": 35, + "line": 4, }, }, "range": Array [ - 166, - 223, + 152, + 159, ], - "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", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 7, + "type": "TSBooleanKeyword", }, - "start": Object { - "column": 18, - "line": 7, - }, - }, - "name": "B", - "range": Array [ - 154, - 155, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 11, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 147, - 229, - ], - "type": "TSModuleDeclaration", - }, - "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", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, }, - "start": Object { - "column": 7, - "line": 1, + "init": null, + "loc": Object { + "end": Object { + "column": 42, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, }, + "range": Array [ + 121, + 159, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 1, - "line": 12, + "column": 43, + "line": 4, }, "start": Object { "column": 0, - "line": 1, + "line": 4, }, }, "range": Array [ - 0, - 231, + 117, + 160, ], - "type": "TSModuleDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 1, - "line": 12, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -70088,14 +87039,14 @@ Object { }, "range": Array [ 0, - 231, + 161, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 3, "line": 1, }, "start": Object { @@ -70105,28 +87056,28 @@ Object { }, "range": Array [ 0, - 6, + 3, ], - "type": "Identifier", - "value": "module", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 9, "line": 1, }, "start": Object { - "column": 7, + "column": 4, "line": 1, }, }, "range": Array [ - 7, - 8, + 4, + 9, ], "type": "Identifier", - "value": "A", + "value": "union", }, Object { "loc": Object { @@ -70144,346 +87095,166 @@ Object { 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", + "value": ":", }, 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, + "line": 1, }, "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, + "line": 1, }, }, "range": Array [ - 62, - 67, + 11, + 17, ], "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": "{", + "value": "number", }, 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, + "line": 1, }, "start": Object { - "column": 19, - "line": 5, + "column": 18, + "line": 1, }, }, "range": Array [ - 89, - 90, + 18, + 19, ], "type": "Punctuator", - "value": "(", + "value": "|", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 5, + "column": 24, + "line": 1, }, "start": Object { "column": 20, - "line": 5, + "line": 1, }, }, "range": Array [ - 90, - 96, + 20, + 24, ], "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", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 5, + "column": 26, + "line": 1, }, "start": Object { - "column": 28, - "line": 5, + "column": 25, + "line": 1, }, }, "range": Array [ - 98, - 99, + 25, + 26, ], "type": "Punctuator", - "value": ":", + "value": "|", }, Object { "loc": Object { "end": Object { "column": 36, - "line": 5, + "line": 1, }, "start": Object { - "column": 30, - "line": 5, + "column": 27, + "line": 1, }, }, - "range": Array [ - 100, - 106, + "range": Array [ + 27, + 36, ], "type": "Identifier", - "value": "number", + "value": "undefined", }, Object { "loc": Object { "end": Object { "column": 37, - "line": 5, + "line": 1, }, "start": Object { "column": 36, - "line": 5, + "line": 1, }, }, "range": Array [ - 106, - 107, + 36, + 37, ], "type": "Punctuator", - "value": ",", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 44, - "line": 5, + "column": 3, + "line": 2, }, "start": Object { - "column": 38, - "line": 5, + "column": 0, + "line": 2, }, }, "range": Array [ - 108, - 114, + 38, + 41, ], "type": "Keyword", - "value": "public", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 46, - "line": 5, + "column": 16, + "line": 2, }, "start": Object { - "column": 45, - "line": 5, + "column": 4, + "line": 2, }, }, "range": Array [ - 115, - 116, + 42, + 54, ], "type": "Identifier", - "value": "y", + "value": "intersection", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 5, + "column": 17, + "line": 2, }, "start": Object { - "column": 46, - "line": 5, + "column": 16, + "line": 2, }, }, "range": Array [ - 116, - 117, + 54, + 55, ], "type": "Punctuator", "value": ":", @@ -70491,17 +87262,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 54, - "line": 5, + "column": 24, + "line": 2, }, "start": Object { - "column": 48, - "line": 5, + "column": 18, + "line": 2, }, }, "range": Array [ - 118, - 124, + 56, + 62, ], "type": "Identifier", "value": "number", @@ -70509,251 +87280,269 @@ Object { Object { "loc": Object { "end": Object { - "column": 55, - "line": 5, + "column": 26, + "line": 2, }, "start": Object { - "column": 54, - "line": 5, + "column": 25, + "line": 2, }, }, "range": Array [ - 124, - 125, + 63, + 64, ], "type": "Punctuator", - "value": ")", + "value": "&", }, Object { "loc": Object { "end": Object { - "column": 57, - "line": 5, + "column": 33, + "line": 2, }, "start": Object { - "column": 56, - "line": 5, + "column": 27, + "line": 2, }, }, "range": Array [ - 126, - 127, + 65, + 71, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 59, - "line": 5, + "column": 34, + "line": 2, }, "start": Object { - "column": 58, - "line": 5, + "column": 33, + "line": 2, }, }, "range": Array [ - 128, - 129, + 71, + 72, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 6, + "column": 3, + "line": 3, }, "start": Object { - "column": 4, - "line": 6, + "column": 0, + "line": 3, }, }, "range": Array [ - 134, - 135, + 73, + 76, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 7, + "column": 15, + "line": 3, }, "start": Object { "column": 4, - "line": 7, + "line": 3, }, }, "range": Array [ - 140, - 146, + 77, + 88, ], - "type": "Keyword", - "value": "export", + "type": "Identifier", + "value": "precedence1", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 7, + "column": 16, + "line": 3, }, "start": Object { - "column": 11, - "line": 7, + "column": 15, + "line": 3, }, }, "range": Array [ - 147, - 153, + 88, + 89, ], - "type": "Identifier", - "value": "module", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 7, + "column": 23, + "line": 3, }, "start": Object { - "column": 18, - "line": 7, + "column": 17, + "line": 3, }, }, "range": Array [ - 154, - 155, + 90, + 96, ], "type": "Identifier", - "value": "B", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 7, + "column": 25, + "line": 3, }, "start": Object { - "column": 20, - "line": 7, + "column": 24, + "line": 3, }, }, "range": Array [ - 156, - 157, + 97, + 98, ], "type": "Punctuator", - "value": "{", + "value": "|", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 8, + "column": 32, + "line": 3, }, "start": Object { - "column": 8, - "line": 8, + "column": 26, + "line": 3, }, }, "range": Array [ - 166, - 172, + 99, + 105, ], - "type": "Keyword", - "value": "export", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 8, + "column": 34, + "line": 3, }, "start": Object { - "column": 15, - "line": 8, + "column": 33, + "line": 3, }, }, "range": Array [ - 173, - 182, + 106, + 107, ], - "type": "Keyword", - "value": "interface", + "type": "Punctuator", + "value": "&", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 8, + "column": 42, + "line": 3, }, "start": Object { - "column": 25, - "line": 8, + "column": 35, + "line": 3, }, }, "range": Array [ - 183, - 185, + 108, + 115, ], "type": "Identifier", - "value": "Id", + "value": "boolean", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 8, + "column": 43, + "line": 3, }, "start": Object { - "column": 28, - "line": 8, + "column": 42, + "line": 3, }, }, "range": Array [ - 186, - 187, + 115, + 116, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 9, + "column": 3, + "line": 4, }, "start": Object { - "column": 12, - "line": 9, + "column": 0, + "line": 4, }, }, "range": Array [ - 200, - 204, + 117, + 120, ], - "type": "Identifier", - "value": "name", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 9, + "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": 9, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 4, }, }, "range": Array [ - 204, - 205, + 132, + 133, ], "type": "Punctuator", "value": ":", @@ -70761,125 +87550,141 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, - "line": 9, + "column": 23, + "line": 4, }, "start": Object { - "column": 18, - "line": 9, + "column": 17, + "line": 4, }, }, "range": Array [ - 206, - 212, + 134, + 140, ], "type": "Identifier", - "value": "string", + "value": "number", }, Object { "loc": Object { "end": Object { "column": 25, - "line": 9, + "line": 4, }, "start": Object { "column": 24, - "line": 9, + "line": 4, }, }, "range": Array [ - 212, - 213, + 141, + 142, ], "type": "Punctuator", - "value": ";", + "value": "&", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 10, + "column": 32, + "line": 4, }, "start": Object { - "column": 8, - "line": 10, + "column": 26, + "line": 4, }, }, "range": Array [ - 222, - 223, + 143, + 149, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 11, + "column": 34, + "line": 4, }, "start": Object { - "column": 4, - "line": 11, + "column": 33, + "line": 4, }, }, "range": Array [ - 228, - 229, + 150, + 151, ], "type": "Punctuator", - "value": "}", + "value": "|", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 12, + "column": 42, + "line": 4, }, "start": Object { - "column": 0, - "line": 12, + "column": 35, + "line": 4, }, }, "range": Array [ - 230, - 231, + 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": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/namespaces-and-modules/shorthand-ambient-module-declaration.src 1`] = ` +exports[`typescript fixtures/types/union-type.src 1`] = ` Object { "body": Array [ Object { - "declare": true, "id": Object { "loc": Object { "end": Object { - "column": 31, + "column": 8, "line": 1, }, "start": Object { - "column": 15, + "column": 5, "line": 1, }, }, + "name": "Foo", "range": Array [ - 15, - 31, + 5, + 8, ], - "raw": "\\"hot-new-module\\"", - "type": "Literal", - "value": "hot-new-module", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 32, + "column": 26, "line": 1, }, "start": Object { @@ -70889,9 +87694,62 @@ Object { }, "range": Array [ 0, - 32, + 26, ], - "type": "TSModuleDeclaration", + "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", + }, + ], + }, }, ], "loc": Object { @@ -70906,14 +87764,14 @@ Object { }, "range": Array [ 0, - 33, + 27, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 4, "line": 1, }, "start": Object { @@ -70923,64 +87781,100 @@ Object { }, "range": Array [ 0, - 7, + 4, ], "type": "Identifier", - "value": "declare", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { - "column": 8, + "column": 5, "line": 1, }, }, "range": Array [ + 5, 8, - 14, ], "type": "Identifier", - "value": "module", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 10, "line": 1, }, "start": Object { - "column": 15, + "column": 9, "line": 1, }, }, "range": Array [ - 15, - 31, + 9, + 10, ], - "type": "String", - "value": "\\"hot-new-module\\"", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 17, "line": 1, }, "start": Object { - "column": 31, + "column": 11, "line": 1, }, }, "range": Array [ - 31, - 32, + 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": ";", + "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", diff --git a/yarn.lock b/yarn.lock index 25ccc12..9333764 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,17 +10,17 @@ "@babel/highlight" "^7.0.0" "@babel/core@^7.0.0": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.1.6.tgz#3733cbee4317429bc87c62b29cf8587dba7baeb3" - integrity sha512-Hz6PJT6e44iUNpAn8AoyAs6B3bl60g7MJQaI0rZEar6ECzh6+srYO1xlIdssio34mPaUtAb1y+XlkkSJzok3yw== + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.2.tgz#07adba6dde27bb5ad8d8672f15fde3e08184a687" + integrity sha512-59vB0RWt09cAct5EIe58+NzGP4TFSD3Bz//2/ELy3ZeTeKF6VTD1AXlH8BGGbCX0PuobZBsIzO7IAI9PH67eKw== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.1.6" - "@babel/helpers" "^7.1.5" - "@babel/parser" "^7.1.6" - "@babel/template" "^7.1.2" - "@babel/traverse" "^7.1.6" - "@babel/types" "^7.1.6" + "@babel/generator" "^7.2.2" + "@babel/helpers" "^7.2.0" + "@babel/parser" "^7.2.2" + "@babel/template" "^7.2.2" + "@babel/traverse" "^7.2.2" + "@babel/types" "^7.2.2" convert-source-map "^1.1.0" debug "^4.1.0" json5 "^2.1.0" @@ -29,12 +29,12 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.1.6": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.1.6.tgz#001303cf87a5b9d093494a4bf251d7b5d03d3999" - integrity sha512-brwPBtVvdYdGxtenbQgfCdDPmtkmUBZPjUoK5SXJEBuHaA5BCubh9ly65fzXz7R6o5rA76Rs22ES8Z+HCc0YIQ== +"@babel/generator@^7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.2.2.tgz#18c816c70962640eab42fe8cae5f3947a5c65ccc" + integrity sha512-I4o675J/iS8k+P38dvJ3IBGqObLXyQLTxtrR4u9cSUJOURvafeEWb/pFMOTwtNrmq73mJzyF6ueTbO1BtN0Zeg== dependencies: - "@babel/types" "^7.1.6" + "@babel/types" "^7.2.2" jsesc "^2.5.1" lodash "^4.17.10" source-map "^0.5.0" @@ -119,15 +119,15 @@ "@babel/types" "^7.0.0" "@babel/helper-module-transforms@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.1.0.tgz#470d4f9676d9fad50b324cdcce5fbabbc3da5787" - integrity sha512-0JZRd2yhawo79Rcm4w0LwSMILFmFXjugG3yqf+P/UsKsRS1mJCmMwwlHDlMg7Avr9LrvSpp4ZSULO9r8jpCzcw== + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.2.2.tgz#ab2f8e8d231409f8370c883d20c335190284b963" + integrity sha512-YRD7I6Wsv+IHuTPkAmAS4HhY0dkPobgLftHp0cRGZSdrRvmZY8rFvae/GVu3bD00qscuvK3WPHB3YdNpBXUqrA== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/template" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/template" "^7.2.2" + "@babel/types" "^7.2.2" lodash "^4.17.10" "@babel/helper-optimise-call-expression@^7.0.0": @@ -161,13 +161,13 @@ "@babel/types" "^7.0.0" "@babel/helper-replace-supers@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz#5fc31de522ec0ef0899dc9b3e7cf6a5dd655f362" - integrity sha512-BvcDWYZRWVuDeXTYZWxekQNO5D4kO55aArwZOTFXw6rlLQA8ZaDicJR1sO47h+HrnCiDFiww0fSPV0d713KBGQ== + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.2.3.tgz#19970020cf22677d62b3a689561dbd9644d8c5e5" + integrity sha512-GyieIznGUfPXPWu0yLS6U55Mz67AZD9cUk0BfirOWlPrXlBcan9Gz+vHGz+cPfuoweZSnPzPIm67VtQM0OWZbA== dependencies: "@babel/helper-member-expression-to-functions" "^7.0.0" "@babel/helper-optimise-call-expression" "^7.0.0" - "@babel/traverse" "^7.1.0" + "@babel/traverse" "^7.2.3" "@babel/types" "^7.0.0" "@babel/helper-simple-access@^7.1.0": @@ -186,23 +186,23 @@ "@babel/types" "^7.0.0" "@babel/helper-wrap-function@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.1.0.tgz#8cf54e9190706067f016af8f75cb3df829cc8c66" - integrity sha512-R6HU3dete+rwsdAfrOzTlE9Mcpk4RjU3aX3gi9grtmugQY0u79X7eogUvfXA5sI81Mfq1cn6AgxihfN33STjJA== + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" + integrity sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/template" "^7.1.0" "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/types" "^7.2.0" -"@babel/helpers@^7.1.5": - version "7.1.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.5.tgz#68bfc1895d685f2b8f1995e788dbfe1f6ccb1996" - integrity sha512-2jkcdL02ywNBry1YNFAH/fViq4fXG0vdckHqeJk+75fpQ2OH+Az6076tX/M0835zA45E0Cqa6pV5Kiv9YOqjEg== +"@babel/helpers@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.2.0.tgz#8335f3140f3144270dc63c4732a4f8b0a50b7a21" + integrity sha512-Fr07N+ea0dMcMN8nFpuK6dUIT7/ivt9yKQdEEnjVS83tG2pHwPi03gYmk/tyuwONnZ+sY+GFFPlWGgCtW1hF9A== dependencies: "@babel/template" "^7.1.2" "@babel/traverse" "^7.1.5" - "@babel/types" "^7.1.5" + "@babel/types" "^7.2.0" "@babel/highlight@^7.0.0": version "7.0.0" @@ -213,116 +213,116 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@7.1.6", "@babel/parser@^7.1.2", "@babel/parser@^7.1.6": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.6.tgz#16e97aca1ec1062324a01c5a6a7d0df8dd189854" - integrity sha512-dWP6LJm9nKT6ALaa+bnL247GHHMWir3vSlZ2+IHgHgktZQx0L3Uvq2uAWcuzIe+fujRsYWBW2q622C5UvGK9iQ== +"@babel/parser@7.2.3", "@babel/parser@^7.2.2", "@babel/parser@^7.2.3": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.3.tgz#32f5df65744b70888d17872ec106b02434ba1489" + integrity sha512-0LyEcVlfCoFmci8mXx8A5oIkpkOgyo8dRHtxBnK9RRBwxO2+JZPNsqtVEZQ7mJFPxnXF9lfmU24mHOPI0qnlkA== -"@babel/plugin-proposal-async-generator-functions@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.1.0.tgz#41c1a702e10081456e23a7b74d891922dd1bb6ce" - integrity sha512-Fq803F3Jcxo20MXUSDdmZZXrPe6BWyGcWBPPNB/M7WaUYESKDeKMOGIxEzQOjGSmW/NWb6UaPZrtTB2ekhB/ew== +"@babel/plugin-proposal-async-generator-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" + integrity sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-remap-async-to-generator" "^7.1.0" - "@babel/plugin-syntax-async-generators" "^7.0.0" + "@babel/plugin-syntax-async-generators" "^7.2.0" -"@babel/plugin-proposal-json-strings@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.0.0.tgz#3b4d7b5cf51e1f2e70f52351d28d44fc2970d01e" - integrity sha512-kfVdUkIAGJIVmHmtS/40i/fg/AGnw/rsZBCaapY5yjeO5RA9m165Xbw9KMOu2nqXP5dTFjEjHdfNdoVcHv133Q== +"@babel/plugin-proposal-json-strings@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz#568ecc446c6148ae6b267f02551130891e29f317" + integrity sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-json-strings" "^7.0.0" + "@babel/plugin-syntax-json-strings" "^7.2.0" -"@babel/plugin-proposal-object-rest-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.0.0.tgz#9a17b547f64d0676b6c9cecd4edf74a82ab85e7e" - integrity sha512-14fhfoPcNu7itSen7Py1iGN0gEm87hX/B+8nZPqkdmANyyYWYMY2pjA3r8WXbWVKMzfnSNS0xY8GVS0IjXi/iw== +"@babel/plugin-proposal-object-rest-spread@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.2.0.tgz#88f5fec3e7ad019014c97f7ee3c992f0adbf7fb8" + integrity sha512-1L5mWLSvR76XYUQJXkd/EEQgjq8HHRP6lQuZTTg0VA4tTGPpGemmCdAfQIz1rzEuWAm+ecP8PyyEm30jC1eQCg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" -"@babel/plugin-proposal-optional-catch-binding@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.0.0.tgz#b610d928fe551ff7117d42c8bb410eec312a6425" - integrity sha512-JPqAvLG1s13B/AuoBjdBYvn38RqW6n1TzrQO839/sIpqLpbnXKacsAgpZHzLD83Sm8SDXMkkrAvEnJ25+0yIpw== +"@babel/plugin-proposal-optional-catch-binding@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5" + integrity sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" -"@babel/plugin-proposal-unicode-property-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.0.0.tgz#498b39cd72536cd7c4b26177d030226eba08cd33" - integrity sha512-tM3icA6GhC3ch2SkmSxv7J/hCWKISzwycub6eGsDrFDgukD4dZ/I+x81XgW0YslS6mzNuQ1Cbzh5osjIMgepPQ== +"@babel/plugin-proposal-unicode-property-regex@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.2.0.tgz#abe7281fe46c95ddc143a65e5358647792039520" + integrity sha512-LvRVYb7kikuOtIoUeWTkOxQEV1kYvL5B6U3iWEGCzPNRus1MzJweFqORTj+0jkxozkTSYNJozPOddxmqdqsRpw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" regexpu-core "^4.2.0" -"@babel/plugin-syntax-async-generators@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.0.0.tgz#bf0891dcdbf59558359d0c626fdc9490e20bc13c" - integrity sha512-im7ged00ddGKAjcZgewXmp1vxSZQQywuQXe2B1A7kajjZmDeY/ekMPmWr9zJgveSaQH0k7BcGrojQhcK06l0zA== +"@babel/plugin-syntax-async-generators@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz#69e1f0db34c6f5a0cf7e2b3323bf159a76c8cb7f" + integrity sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-json-strings@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.0.0.tgz#0d259a68090e15b383ce3710e01d5b23f3770cbd" - integrity sha512-UlSfNydC+XLj4bw7ijpldc1uZ/HB84vw+U6BTuqMdIEmz/LDe63w/GHtpQMdXWdqQZFeAI9PjnHe/vDhwirhKA== +"@babel/plugin-syntax-json-strings@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470" + integrity sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-object-rest-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.0.0.tgz#37d8fbcaf216bd658ea1aebbeb8b75e88ebc549b" - integrity sha512-5A0n4p6bIiVe5OvQPxBnesezsgFJdHhSs3uFSvaPdMqtsovajLZ+G2vZyvNe10EzJBWWo3AcHGKhAFUxqwp2dw== +"@babel/plugin-syntax-object-rest-spread@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e" + integrity sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-optional-catch-binding@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.0.0.tgz#886f72008b3a8b185977f7cb70713b45e51ee475" - integrity sha512-Wc+HVvwjcq5qBg1w5RG9o9RVzmCaAg/Vp0erHCKpAYV8La6I94o4GQAmFYNmkzoMO6gzoOSulpKeSSz6mPEoZw== +"@babel/plugin-syntax-optional-catch-binding@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz#a94013d6eda8908dfe6a477e7f9eda85656ecf5c" + integrity sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-arrow-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.0.0.tgz#a6c14875848c68a3b4b3163a486535ef25c7e749" - integrity sha512-2EZDBl1WIO/q4DIkIp4s86sdp4ZifL51MoIviLY/gG/mLSuOIEg7J8o6mhbxOTvUJkaN50n+8u41FVsr5KLy/w== +"@babel/plugin-transform-arrow-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550" + integrity sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-async-to-generator@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.1.0.tgz#109e036496c51dd65857e16acab3bafdf3c57811" - integrity sha512-rNmcmoQ78IrvNCIt/R9U+cixUHeYAzgusTFgIAv+wQb9HJU4szhpDD6e5GCACmj/JP5KxuCwM96bX3L9v4ZN/g== +"@babel/plugin-transform-async-to-generator@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.2.0.tgz#68b8a438663e88519e65b776f8938f3445b1a2ff" + integrity sha512-CEHzg4g5UraReozI9D4fblBYABs7IM6UerAVG7EJVrTLC5keh00aEuLUT+O40+mJCEzaXkYfTCUKIyeDfMOFFQ== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-remap-async-to-generator" "^7.1.0" -"@babel/plugin-transform-block-scoped-functions@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.0.0.tgz#482b3f75103927e37288b3b67b65f848e2aa0d07" - integrity sha512-AOBiyUp7vYTqz2Jibe1UaAWL0Hl9JUXEgjFvvvcSc9MVDItv46ViXFw2F7SVt1B5k+KWjl44eeXOAk3UDEaJjQ== +"@babel/plugin-transform-block-scoped-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz#5d3cc11e8d5ddd752aa64c9148d0db6cb79fd190" + integrity sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-block-scoping@^7.1.5": - version "7.1.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.1.5.tgz#3e8e0bc9a5104519923302a24f748f72f2f61f37" - integrity sha512-jlYcDrz+5ayWC7mxgpn1Wj8zj0mmjCT2w0mPIMSwO926eXBRxpEgoN/uQVRBfjtr8ayjcmS+xk2G1jaP8JjMJQ== +"@babel/plugin-transform-block-scoping@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.2.0.tgz#f17c49d91eedbcdf5dd50597d16f5f2f770132d4" + integrity sha512-vDTgf19ZEV6mx35yiPJe4fS02mPQUUcBNwWQSZFXSzTSbsJFQvHt7DqyS3LK8oOWALFOsJ+8bbqBgkirZteD5Q== dependencies: "@babel/helper-plugin-utils" "^7.0.0" lodash "^4.17.10" -"@babel/plugin-transform-classes@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.1.0.tgz#ab3f8a564361800cbc8ab1ca6f21108038432249" - integrity sha512-rNaqoD+4OCBZjM7VaskladgqnZ1LO6o2UxuWSDzljzW21pN1KXkB7BstAVweZdxQkHAujps5QMNOTWesBciKFg== +"@babel/plugin-transform-classes@^7.2.0": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.2.2.tgz#6c90542f210ee975aa2aa8c8b5af7fa73a126953" + integrity sha512-gEZvgTy1VtcDOaQty1l10T3jQmJKlNVxLDCs+3rCVPr6nMkODLELxViq5X9l+rfxbie3XrfrMCYYY6eX3aOcOQ== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-define-map" "^7.1.0" @@ -333,95 +333,95 @@ "@babel/helper-split-export-declaration" "^7.0.0" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.0.0.tgz#2fbb8900cd3e8258f2a2ede909b90e7556185e31" - integrity sha512-ubouZdChNAv4AAWAgU7QKbB93NU5sHwInEWfp+/OzJKA02E6Woh9RVoX4sZrbRwtybky/d7baTUqwFx+HgbvMA== +"@babel/plugin-transform-computed-properties@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz#83a7df6a658865b1c8f641d510c6f3af220216da" + integrity sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-destructuring@^7.0.0": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.1.3.tgz#e69ff50ca01fac6cb72863c544e516c2b193012f" - integrity sha512-Mb9M4DGIOspH1ExHOUnn2UUXFOyVTiX84fXCd+6B5iWrQg/QMeeRmSwpZ9lnjYLSXtZwiw80ytVMr3zue0ucYw== +"@babel/plugin-transform-destructuring@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.2.0.tgz#e75269b4b7889ec3a332cd0d0c8cff8fed0dc6f3" + integrity sha512-coVO2Ayv7g0qdDbrNiadE4bU7lvCd9H539m2gMknyVjjMdwF/iCOM7R+E8PkntoqLkltO0rk+3axhpp/0v68VQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-dotall-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.0.0.tgz#73a24da69bc3c370251f43a3d048198546115e58" - integrity sha512-00THs8eJxOJUFVx1w8i1MBF4XH4PsAjKjQ1eqN/uCH3YKwP21GCKfrn6YZFZswbOk9+0cw1zGQPHVc1KBlSxig== +"@babel/plugin-transform-dotall-regex@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.2.0.tgz#f0aabb93d120a8ac61e925ea0ba440812dbe0e49" + integrity sha512-sKxnyHfizweTgKZf7XsXu/CNupKhzijptfTM+bozonIuyVrLWVUvYjE2bhuSBML8VQeMxq4Mm63Q9qvcvUcciQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" regexpu-core "^4.1.3" -"@babel/plugin-transform-duplicate-keys@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.0.0.tgz#a0601e580991e7cace080e4cf919cfd58da74e86" - integrity sha512-w2vfPkMqRkdxx+C71ATLJG30PpwtTpW7DDdLqYt2acXU7YjztzeWW2Jk1T6hKqCLYCcEA5UQM/+xTAm+QCSnuQ== +"@babel/plugin-transform-duplicate-keys@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz#d952c4930f312a4dbfff18f0b2914e60c35530b3" + integrity sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-exponentiation-operator@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.1.0.tgz#9c34c2ee7fd77e02779cfa37e403a2e1003ccc73" - integrity sha512-uZt9kD1Pp/JubkukOGQml9tqAeI8NkE98oZnHZ2qHRElmeKCodbTZgOEUtujSCSLhHSBWbzNiFSDIMC4/RBTLQ== +"@babel/plugin-transform-exponentiation-operator@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz#a63868289e5b4007f7054d46491af51435766008" + integrity sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A== dependencies: "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-for-of@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.0.0.tgz#f2ba4eadb83bd17dc3c7e9b30f4707365e1c3e39" - integrity sha512-TlxKecN20X2tt2UEr2LNE6aqA0oPeMT1Y3cgz8k4Dn1j5ObT8M3nl9aA37LLklx0PBZKETC9ZAf9n/6SujTuXA== +"@babel/plugin-transform-for-of@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.2.0.tgz#ab7468befa80f764bb03d3cb5eef8cc998e1cad9" + integrity sha512-Kz7Mt0SsV2tQk6jG5bBv5phVbkd0gd27SgYD4hH1aLMJRchM0dzHaXvrWhVZ+WxAlDoAKZ7Uy3jVTW2mKXQ1WQ== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-function-name@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.1.0.tgz#29c5550d5c46208e7f730516d41eeddd4affadbb" - integrity sha512-VxOa1TMlFMtqPW2IDYZQaHsFrq/dDoIjgN098NowhexhZcz3UGlvPgZXuE1jEvNygyWyxRacqDpCZt+par1FNg== +"@babel/plugin-transform-function-name@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.2.0.tgz#f7930362829ff99a3174c39f0afcc024ef59731a" + integrity sha512-kWgksow9lHdvBC2Z4mxTsvc7YdY7w/V6B2vy9cTIPtLEE9NhwoWivaxdNM/S37elu5bqlLP/qOY906LukO9lkQ== dependencies: "@babel/helper-function-name" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-literals@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.0.0.tgz#2aec1d29cdd24c407359c930cdd89e914ee8ff86" - integrity sha512-1NTDBWkeNXgpUcyoVFxbr9hS57EpZYXpje92zv0SUzjdu3enaRwF/l3cmyRnXLtIdyJASyiS6PtybK+CgKf7jA== +"@babel/plugin-transform-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz#690353e81f9267dad4fd8cfd77eafa86aba53ea1" + integrity sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-amd@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.1.0.tgz#f9e0a7072c12e296079b5a59f408ff5b97bf86a8" - integrity sha512-wt8P+xQ85rrnGNr2x1iV3DW32W8zrB6ctuBkYBbf5/ZzJY99Ob4MFgsZDFgczNU76iy9PWsy4EuxOliDjdKw6A== +"@babel/plugin-transform-modules-amd@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz#82a9bce45b95441f617a24011dc89d12da7f4ee6" + integrity sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-commonjs@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.1.0.tgz#0a9d86451cbbfb29bd15186306897c67f6f9a05c" - integrity sha512-wtNwtMjn1XGwM0AXPspQgvmE6msSJP15CX2RVfpTSTNPLhKhaOjaIfBaVfj4iUZ/VrFSodcFedwtPg/NxwQlPA== +"@babel/plugin-transform-modules-commonjs@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.2.0.tgz#c4f1933f5991d5145e9cfad1dfd848ea1727f404" + integrity sha512-V6y0uaUQrQPXUrmj+hgnks8va2L0zcZymeU7TtWEgdRLNkceafKXEduv7QzgQAE4lT+suwooG9dC7LFhdRAbVQ== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-simple-access" "^7.1.0" -"@babel/plugin-transform-modules-systemjs@^7.0.0": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.1.3.tgz#2119a3e3db612fd74a19d88652efbfe9613a5db0" - integrity sha512-PvTxgjxQAq4pvVUZF3mD5gEtVDuId8NtWkJsZLEJZMZAW3TvgQl1pmydLLN1bM8huHFVVU43lf0uvjQj9FRkKw== +"@babel/plugin-transform-modules-systemjs@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.2.0.tgz#912bfe9e5ff982924c81d0937c92d24994bb9068" + integrity sha512-aYJwpAhoK9a+1+O625WIjvMY11wkB/ok0WClVwmeo3mCjcNRjt+/8gHWrB5i+00mUju0gWsBkQnPpdvQ7PImmQ== dependencies: "@babel/helper-hoist-variables" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-modules-umd@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.1.0.tgz#a29a7d85d6f28c3561c33964442257cc6a21f2a8" - integrity sha512-enrRtn5TfRhMmbRwm7F8qOj0qEYByqUvTttPEGimcBH4CJHphjyK1Vg7sdU7JjeEmgSpM890IT/efS2nMHwYig== +"@babel/plugin-transform-modules-umd@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz#7678ce75169f0877b8eb2235538c074268dd01ae" + integrity sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw== dependencies: "@babel/helper-module-transforms" "^7.1.0" "@babel/helper-plugin-utils" "^7.0.0" @@ -433,18 +433,18 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-object-super@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.1.0.tgz#b1ae194a054b826d8d4ba7ca91486d4ada0f91bb" - integrity sha512-/O02Je1CRTSk2SSJaq0xjwQ8hG4zhZGNjE8psTsSNPXyLRCODv7/PBozqT5AmQMzp7MI3ndvMhGdqp9c96tTEw== +"@babel/plugin-transform-object-super@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz#b35d4c10f56bab5d650047dad0f1d8e8814b6598" + integrity sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-replace-supers" "^7.1.0" -"@babel/plugin-transform-parameters@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.1.0.tgz#44f492f9d618c9124026e62301c296bf606a7aed" - integrity sha512-vHV7oxkEJ8IHxTfRr3hNGzV446GAb+0hgbA7o/0Jd76s+YzccdWuTU296FOCOl/xweU4t/Ya4g41yWz80RFCRw== +"@babel/plugin-transform-parameters@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.2.0.tgz#0d5ad15dc805e2ea866df4dd6682bfe76d1408c2" + integrity sha512-kB9+hhUidIgUoBQ0MsxMewhzr8i60nMa2KgeJKQWYrqQpqcBYtnpR+JgkadZVZoaEZ/eKu9mclFaVwhRpLNSzA== dependencies: "@babel/helper-call-delegate" "^7.1.0" "@babel/helper-get-function-arity" "^7.0.0" @@ -457,103 +457,103 @@ dependencies: regenerator-transform "^0.13.3" -"@babel/plugin-transform-shorthand-properties@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.0.0.tgz#85f8af592dcc07647541a0350e8c95c7bf419d15" - integrity sha512-g/99LI4vm5iOf5r1Gdxq5Xmu91zvjhEG5+yZDJW268AZELAu4J1EiFLnkSG3yuUsZyOipVOVUKoGPYwfsTymhw== +"@babel/plugin-transform-shorthand-properties@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz#6333aee2f8d6ee7e28615457298934a3b46198f0" + integrity sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-spread@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.0.0.tgz#93583ce48dd8c85e53f3a46056c856e4af30b49b" - integrity sha512-L702YFy2EvirrR4shTj0g2xQp7aNwZoWNCkNu2mcoU0uyzMl0XRwDSwzB/xp6DSUFiBmEXuyAyEN16LsgVqGGQ== +"@babel/plugin-transform-spread@^7.2.0": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz#3103a9abe22f742b6d406ecd3cd49b774919b406" + integrity sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-sticky-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.0.0.tgz#30a9d64ac2ab46eec087b8530535becd90e73366" - integrity sha512-LFUToxiyS/WD+XEWpkx/XJBrUXKewSZpzX68s+yEOtIbdnsRjpryDw9U06gYc6klYEij/+KQVRnD3nz3AoKmjw== +"@babel/plugin-transform-sticky-regex@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz#a1e454b5995560a9c1e0d537dfc15061fd2687e1" + integrity sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" -"@babel/plugin-transform-template-literals@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.0.0.tgz#084f1952efe5b153ddae69eb8945f882c7a97c65" - integrity sha512-vA6rkTCabRZu7Nbl9DfLZE1imj4tzdWcg5vtdQGvj+OH9itNNB6hxuRMHuIY8SGnEt1T9g5foqs9LnrHzsqEFg== +"@babel/plugin-transform-template-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.2.0.tgz#d87ed01b8eaac7a92473f608c97c089de2ba1e5b" + integrity sha512-FkPix00J9A/XWXv4VoKJBMeSkyY9x/TqIh76wzcdfl57RJJcf8CehQ08uwfhCDNtRQYtHQKBTwKZDEyjE13Lwg== dependencies: "@babel/helper-annotate-as-pure" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-typeof-symbol@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.0.0.tgz#4dcf1e52e943e5267b7313bff347fdbe0f81cec9" - integrity sha512-1r1X5DO78WnaAIvs5uC48t41LLckxsYklJrZjNKcevyz83sF2l4RHbw29qrCPr/6ksFsdfRpT/ZgxNWHXRnffg== +"@babel/plugin-transform-typeof-symbol@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz#117d2bcec2fbf64b4b59d1f9819894682d29f2b2" + integrity sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw== dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-unicode-regex@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.0.0.tgz#c6780e5b1863a76fe792d90eded9fcd5b51d68fc" - integrity sha512-uJBrJhBOEa3D033P95nPHu3nbFwFE9ZgXsfEitzoIXIwqAZWk7uXcg06yFKXz9FSxBH5ucgU/cYdX0IV8ldHKw== +"@babel/plugin-transform-unicode-regex@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.2.0.tgz#4eb8db16f972f8abb5062c161b8b115546ade08b" + integrity sha512-m48Y0lMhrbXEJnVUaYly29jRXbQ3ksxPrS1Tg8t+MHqzXhtBYAvI51euOBaoAlZLPHsieY9XPVMf80a5x0cPcA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/helper-regex" "^7.0.0" regexpu-core "^4.1.3" "@babel/polyfill@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.0.0.tgz#c8ff65c9ec3be6a1ba10113ebd40e8750fb90bff" - integrity sha512-dnrMRkyyr74CRelJwvgnnSUDh2ge2NCTyHVwpOdvRMHtJUyxLtMAfhBN3s64pY41zdw0kgiLPh6S20eb1NcX6Q== + version "7.2.5" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.2.5.tgz#6c54b964f71ad27edddc567d065e57e87ed7fa7d" + integrity sha512-8Y/t3MWThtMLYr0YNC/Q76tqN1w30+b0uQMeFUYauG2UGTR19zyUtFrAzT23zNtBxPp+LbE5E/nwV/q/r3y6ug== dependencies: core-js "^2.5.7" - regenerator-runtime "^0.11.1" + regenerator-runtime "^0.12.0" "@babel/preset-env@^7.0.0": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.1.6.tgz#a0bf4b96b6bfcf6e000afc5b72b4abe7cc13ae97" - integrity sha512-YIBfpJNQMBkb6MCkjz/A9J76SNCSuGVamOVBgoUkLzpJD/z8ghHi9I42LQ4pulVX68N/MmImz6ZTixt7Azgexw== + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.2.3.tgz#948c8df4d4609c99c7e0130169f052ea6a7a8933" + integrity sha512-AuHzW7a9rbv5WXmvGaPX7wADxFkZIqKlbBh1dmZUQp4iwiPpkE/Qnrji6SC4UQCQzvWY/cpHET29eUhXS9cLPw== dependencies: "@babel/helper-module-imports" "^7.0.0" "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-async-generator-functions" "^7.1.0" - "@babel/plugin-proposal-json-strings" "^7.0.0" - "@babel/plugin-proposal-object-rest-spread" "^7.0.0" - "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.0.0" - "@babel/plugin-syntax-async-generators" "^7.0.0" - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" - "@babel/plugin-syntax-optional-catch-binding" "^7.0.0" - "@babel/plugin-transform-arrow-functions" "^7.0.0" - "@babel/plugin-transform-async-to-generator" "^7.1.0" - "@babel/plugin-transform-block-scoped-functions" "^7.0.0" - "@babel/plugin-transform-block-scoping" "^7.1.5" - "@babel/plugin-transform-classes" "^7.1.0" - "@babel/plugin-transform-computed-properties" "^7.0.0" - "@babel/plugin-transform-destructuring" "^7.0.0" - "@babel/plugin-transform-dotall-regex" "^7.0.0" - "@babel/plugin-transform-duplicate-keys" "^7.0.0" - "@babel/plugin-transform-exponentiation-operator" "^7.1.0" - "@babel/plugin-transform-for-of" "^7.0.0" - "@babel/plugin-transform-function-name" "^7.1.0" - "@babel/plugin-transform-literals" "^7.0.0" - "@babel/plugin-transform-modules-amd" "^7.1.0" - "@babel/plugin-transform-modules-commonjs" "^7.1.0" - "@babel/plugin-transform-modules-systemjs" "^7.0.0" - "@babel/plugin-transform-modules-umd" "^7.1.0" + "@babel/plugin-proposal-async-generator-functions" "^7.2.0" + "@babel/plugin-proposal-json-strings" "^7.2.0" + "@babel/plugin-proposal-object-rest-spread" "^7.2.0" + "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.2.0" + "@babel/plugin-syntax-async-generators" "^7.2.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" + "@babel/plugin-transform-arrow-functions" "^7.2.0" + "@babel/plugin-transform-async-to-generator" "^7.2.0" + "@babel/plugin-transform-block-scoped-functions" "^7.2.0" + "@babel/plugin-transform-block-scoping" "^7.2.0" + "@babel/plugin-transform-classes" "^7.2.0" + "@babel/plugin-transform-computed-properties" "^7.2.0" + "@babel/plugin-transform-destructuring" "^7.2.0" + "@babel/plugin-transform-dotall-regex" "^7.2.0" + "@babel/plugin-transform-duplicate-keys" "^7.2.0" + "@babel/plugin-transform-exponentiation-operator" "^7.2.0" + "@babel/plugin-transform-for-of" "^7.2.0" + "@babel/plugin-transform-function-name" "^7.2.0" + "@babel/plugin-transform-literals" "^7.2.0" + "@babel/plugin-transform-modules-amd" "^7.2.0" + "@babel/plugin-transform-modules-commonjs" "^7.2.0" + "@babel/plugin-transform-modules-systemjs" "^7.2.0" + "@babel/plugin-transform-modules-umd" "^7.2.0" "@babel/plugin-transform-new-target" "^7.0.0" - "@babel/plugin-transform-object-super" "^7.1.0" - "@babel/plugin-transform-parameters" "^7.1.0" + "@babel/plugin-transform-object-super" "^7.2.0" + "@babel/plugin-transform-parameters" "^7.2.0" "@babel/plugin-transform-regenerator" "^7.0.0" - "@babel/plugin-transform-shorthand-properties" "^7.0.0" - "@babel/plugin-transform-spread" "^7.0.0" - "@babel/plugin-transform-sticky-regex" "^7.0.0" - "@babel/plugin-transform-template-literals" "^7.0.0" - "@babel/plugin-transform-typeof-symbol" "^7.0.0" - "@babel/plugin-transform-unicode-regex" "^7.0.0" - browserslist "^4.1.0" + "@babel/plugin-transform-shorthand-properties" "^7.2.0" + "@babel/plugin-transform-spread" "^7.2.0" + "@babel/plugin-transform-sticky-regex" "^7.2.0" + "@babel/plugin-transform-template-literals" "^7.2.0" + "@babel/plugin-transform-typeof-symbol" "^7.2.0" + "@babel/plugin-transform-unicode-regex" "^7.2.0" + browserslist "^4.3.4" invariant "^2.2.2" js-levenshtein "^1.1.3" semver "^5.3.0" @@ -571,34 +571,34 @@ pirates "^4.0.0" source-map-support "^0.5.9" -"@babel/template@^7.1.0", "@babel/template@^7.1.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644" - integrity sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag== +"@babel/template@^7.1.0", "@babel/template@^7.1.2", "@babel/template@^7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.2.2.tgz#005b3fdf0ed96e88041330379e0da9a708eb2907" + integrity sha512-zRL0IMM02AUDwghf5LMSSDEz7sBCO2YnNmpg3uWTZj/v1rcG2BmQUvaGU8GhU8BvfMh1k2KIAYZ7Ji9KXPUg7g== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.1.2" - "@babel/types" "^7.1.2" + "@babel/parser" "^7.2.2" + "@babel/types" "^7.2.2" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.1.6": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.1.6.tgz#c8db9963ab4ce5b894222435482bd8ea854b7b5c" - integrity sha512-CXedit6GpISz3sC2k2FsGCUpOhUqKdyL0lqNrImQojagnUMXf8hex4AxYFRuMkNGcvJX5QAFGzB5WJQmSv8SiQ== +"@babel/traverse@^7.1.0", "@babel/traverse@^7.1.5", "@babel/traverse@^7.2.2", "@babel/traverse@^7.2.3": + version "7.2.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.2.3.tgz#7ff50cefa9c7c0bd2d81231fdac122f3957748d8" + integrity sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw== dependencies: "@babel/code-frame" "^7.0.0" - "@babel/generator" "^7.1.6" + "@babel/generator" "^7.2.2" "@babel/helper-function-name" "^7.1.0" "@babel/helper-split-export-declaration" "^7.0.0" - "@babel/parser" "^7.1.6" - "@babel/types" "^7.1.6" + "@babel/parser" "^7.2.3" + "@babel/types" "^7.2.2" debug "^4.1.0" globals "^11.1.0" lodash "^4.17.10" -"@babel/types@^7.0.0", "@babel/types@^7.1.2", "@babel/types@^7.1.5", "@babel/types@^7.1.6": - version "7.1.6" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.1.6.tgz#0adb330c3a281348a190263aceb540e10f04bcce" - integrity sha512-DMiUzlY9DSjVsOylJssxLHSgj6tWM9PRFJOGW/RaOglVOK9nzTxoOMfTfRQXGUCUQ/HmlG2efwC+XqUEJ5ay4w== +"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.2.2": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.2.tgz#44e10fc24e33af524488b716cdaee5360ea8ed1e" + integrity sha512-fKCuD6UFUMkR541eDWL+2ih/xFZBXPOg/7EQFeTluMDebfqR4jrpaCjLhkWlQS4hT6nRa2PMEgXKbRB5/H2fpg== dependencies: esutils "^2.0.2" lodash "^4.17.10" @@ -775,11 +775,11 @@ integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== "@octokit/endpoint@^3.0.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-3.1.0.tgz#ec60152d018d75d4eed5d8a5fd68c9a1e99f3b50" - integrity sha512-ANAOhyEY40qzOjQPEYXqg3GDGLYTjLDjqQqcG1wgqRoE7qFLnvx5a0upzxpes83UK/YHUu6qTymZl/yTu4GvKg== + version "3.1.1" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-3.1.1.tgz#ede9afefaa4d6b7584169e12346425c6fbb45cc3" + integrity sha512-KPkoTvKwCTetu/UqonLs1pfwFO5HAqTv/Ksp9y4NAg//ZgUCpvJsT4Hrst85uEzJvkB8+LxKyR4Bfv2X8O4cmQ== dependencies: - deepmerge "2.2.1" + deepmerge "3.0.0" is-plain-object "^2.0.4" universal-user-agent "^2.0.1" url-template "^2.0.8" @@ -795,9 +795,9 @@ universal-user-agent "^2.0.1" "@octokit/rest@^16.0.1": - version "16.1.0" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.1.0.tgz#43bee0f58821b6c6a4c9d63e14919a1fb67a71b5" - integrity sha512-/D1XokSycOE+prxxI2r9cxssiLMqcr+BsEUjdruC67puEEjNJjJoRIkuA1b20jOkX5Ue3Rz99Mu9rTnNmjetUA== + version "16.3.0" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.3.0.tgz#98a24a3334312a87fff8a2a54c1dca4d0900d54d" + integrity sha512-u0HkROLB0nOSfJhkF5FKMg6I12m6cN5S3S73Lwtfgrs9u4LhgUCZN2hC2KDyIaT7nhvNe9Kx0PgxhhD6li6QsA== dependencies: "@octokit/request" "2.2.0" before-after-hook "^1.2.0" @@ -835,9 +835,9 @@ integrity sha512-9Tj/qn+y2j+sjCI3Jd+qseGtHjOAeg7dU2/lVcqIQ9TV3QDaDXDYXcoOHU+7o2Hwh8L8ymL4gfuO7KxDs3q2zg== "@semantic-release/github@^5.1.0": - version "5.2.5" - resolved "https://registry.yarnpkg.com/@semantic-release/github/-/github-5.2.5.tgz#14e53d99f1e84c76b5674b7506f235a7a4cae302" - integrity sha512-myO00q84CyfyzaEZ4OdA7GOMCQKd+juZd5g2Cloh4jV6CyiMyWflZ629RH99wjAVUiwMKnvX2SQ5XPFvO1+FCw== + version "5.2.7" + resolved "https://registry.yarnpkg.com/@semantic-release/github/-/github-5.2.7.tgz#d9eb8bcc9332a02b85458ddb0988a17023e2b460" + integrity sha512-cWQhM9bdBv8KAwClmwM64Mo3vsOHVM2aJAGI6K3qbJfJ3GsLJLh1hTi+rMd5EkZ2DA8zUUHCiAJZ3ujMvUB0yg== dependencies: "@octokit/rest" "^16.0.1" "@semantic-release/error" "^2.2.0" @@ -853,14 +853,14 @@ lodash "^4.17.4" mime "^2.0.3" p-filter "^1.0.0" - p-retry "^2.0.0" + p-retry "^3.0.0" parse-github-url "^1.0.1" url-join "^4.0.0" "@semantic-release/npm@^5.0.5": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@semantic-release/npm/-/npm-5.1.1.tgz#f05d50ad174b7b90d71367799780e6dedb7797d8" - integrity sha512-5OnV0od1HKp2QjToXxQufvHNG8n+IQlp7h3FjqmZYH7DAHzAGx4NCf/R4p3RhyX5YJEfQl4ZflX9219JVNsuJg== + version "5.1.2" + resolved "https://registry.yarnpkg.com/@semantic-release/npm/-/npm-5.1.2.tgz#96dda235677c628059abb35f5e8f447f1c5c4d64" + integrity sha512-hAt8Q86jjp0AiykihhZ7vuCFKYz0j8v3W6Jae8b+RCLi8IUofrPF1ZImx3oY0rRu8ZZSb4aU9uxtFmeOYZebjg== dependencies: "@semantic-release/error" "^2.2.0" aggregate-error "^1.0.0" @@ -889,12 +889,10 @@ into-stream "^4.0.0" lodash "^4.17.4" -"@sindresorhus/is@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.12.0.tgz#55c37409c809e802efea25911a579731adfc6e07" - integrity sha512-9ve22cGrAKlSRvi8Vb2JIjzcaaQg79531yQHnF+hi/kOpsSj3Om8AyR1wcHrgl0u7U3vYQ7gmF5erZzOp4+51Q== - dependencies: - symbol-observable "^1.2.0" +"@sindresorhus/is@^0.14.0": + version "0.14.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" + integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== "@szmarczak/http-timer@^1.1.0": version "1.1.1" @@ -942,9 +940,9 @@ "@types/lodash" "*" "@types/lodash@*": - version "4.14.118" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.118.tgz#247bab39bfcc6d910d4927c6e06cbc70ec376f27" - integrity sha512-iiJbKLZbhSa6FYRip/9ZDX6HXhayXLDGY2Fqws9cOkEQ6XeKfaxB0sC541mowZJueYyMnVUmmG+al5/4fCDrgw== + version "4.14.119" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.119.tgz#be847e5f4bc3e35e46d041c394ead8b603ad8b39" + integrity sha512-Z3TNyBL8Vd/M9D9Ms2S3LmFq2sSMzahodD6rCS9V2N44HUMINb75jNkSuwAx7eo2ufqTdfOdtGQpNbieUjPQmw== "@types/minimatch@*": version "3.0.3" @@ -952,9 +950,9 @@ integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== "@types/node@*", "@types/node@^10.12.2": - version "10.12.11" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.11.tgz#715c476c99a5f6898a1ae61caf9825e43c03912e" - integrity sha512-3iIOhNiPGTdcUNVCv9e5G7GotfvJJe2pc9w2UgDXlUwnxSZ3RgcUocIU+xYm+rTU54jIKih998QE4dMOyMN1NQ== + version "10.12.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67" + integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ== "@types/semver@^5.5.0": version "5.5.0" @@ -962,9 +960,9 @@ integrity sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ== "@types/shelljs@^0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.0.tgz#0caa56b68baae4f68f44e0dd666ab30b098e3632" - integrity sha512-vs1hCC8RxLHRu2bwumNyYRNrU3o8BtZhLysH5A4I98iYmA2APl6R3uNQb5ihl+WiwH0xdC9LLO+vRrXLs/Kyxg== + version "0.8.1" + resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.1.tgz#133e874b5fb816a2e1c8647839c82d76760b1191" + integrity sha512-1lQw+48BuVgp6c1+z8EMipp18IdnV2dLh6KQGwOm+kJy9nPjEkaqRKmwbDNEYf//EKBvKcwOC6V2cDrNxVoQeQ== dependencies: "@types/glob" "*" "@types/node" "*" @@ -1033,9 +1031,9 @@ aggregate-error@^1.0.0: indent-string "^3.0.0" ajv@^6.5.5: - version "6.6.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.1.tgz#6360f5ed0d80f232cc2b294c362d5dc2e538dd61" - integrity sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww== + version "6.6.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.2.tgz#caceccf474bf3fc3ce3b147443711a24063cc30d" + integrity sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g== dependencies: fast-deep-equal "^2.0.1" fast-json-stable-stringify "^2.0.0" @@ -1487,15 +1485,15 @@ block-stream@*: dependencies: inherits "~2.0.0" -bluebird@^3.5.0, bluebird@^3.5.1, bluebird@~3.5.1: +bluebird@^3.5.0, bluebird@^3.5.1, bluebird@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7" integrity sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw== bottleneck@^2.0.1: - version "2.13.0" - resolved "https://registry.yarnpkg.com/bottleneck/-/bottleneck-2.13.0.tgz#875df17df9e62c76bea42b62af3a45c73a995c4f" - integrity sha512-9YmZ0aiKta2OAxTujKCS/INjGWCIGWK4Ff1nQpgHnR4CTjlk9jcnpaHOjPnMZPtqRXkqwKdtxZgvJ9udsXylaw== + version "2.14.1" + resolved "https://registry.yarnpkg.com/bottleneck/-/bottleneck-2.14.1.tgz#3134b3dabbdafa19abbb0531c03529858d029190" + integrity sha512-FAZr9OekUbx/lCGY/Sok2QOFOy3exRWRcjVJfmHrh3J9UoIaLHT0E+TwhXTIPmKS8JHuX6i/eH/kmhhHBEx7DQ== boxen@^1.2.1: version "1.3.0" @@ -1555,14 +1553,14 @@ browser-resolve@^1.11.3: dependencies: resolve "1.1.7" -browserslist@^4.1.0: - version "4.3.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.3.4.tgz#4477b737db6a1b07077275b24791e680d4300425" - integrity sha512-u5iz+ijIMUlmV8blX82VGFrB9ecnUg5qEt55CMZ/YJEhha+d8qpBfOFuutJ6F/VKRXjZoD33b6uvarpPxcl3RA== +browserslist@^4.3.4: + version "4.3.6" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.3.6.tgz#0f9d9081afc66b36f477c6bdf3813f784f42396a" + integrity sha512-kMGKs4BTzRWviZ8yru18xBpx+CyHG9eqgRbj9XbE3IMgtczf4aiA0Y1YCpVdvUieKGZ03kolSPXqTcscBCb9qw== dependencies: - caniuse-lite "^1.0.30000899" - electron-to-chromium "^1.3.82" - node-releases "^1.0.1" + caniuse-lite "^1.0.30000921" + electron-to-chromium "^1.3.92" + node-releases "^1.1.1" bs-logger@0.x: version "0.2.6" @@ -1628,23 +1626,23 @@ cacache@^10.0.4: y18n "^4.0.0" cacache@^11.0.1, cacache@^11.0.2, cacache@^11.2.0: - version "11.3.1" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.1.tgz#d09d25f6c4aca7a6d305d141ae332613aa1d515f" - integrity sha512-2PEw4cRRDu+iQvBTTuttQifacYjLPhET+SYO/gEFMy8uhi+jlJREDAjSF5FWSdV/Aw5h18caHA7vMTw2c+wDzA== + version "11.3.2" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.2.tgz#2d81e308e3d258ca38125b676b98b2ac9ce69bfa" + integrity sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg== dependencies: - bluebird "^3.5.1" - chownr "^1.0.1" - figgy-pudding "^3.1.0" - glob "^7.1.2" - graceful-fs "^4.1.11" - lru-cache "^4.1.3" + bluebird "^3.5.3" + chownr "^1.1.1" + figgy-pudding "^3.5.1" + glob "^7.1.3" + graceful-fs "^4.1.15" + lru-cache "^5.1.1" mississippi "^3.0.0" mkdirp "^0.5.1" move-concurrently "^1.0.1" promise-inflight "^1.0.1" rimraf "^2.6.2" - ssri "^6.0.0" - unique-filename "^1.1.0" + ssri "^6.0.1" + unique-filename "^1.1.1" y18n "^4.0.0" cache-base@^1.0.1: @@ -1663,9 +1661,9 @@ cache-base@^1.0.1: unset-value "^1.0.0" cacheable-request@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-5.2.0.tgz#00c87097835af4caf92a97390660ecadce51187d" - integrity sha512-h1n0vjpFaByTvU6PiyTKk2kx4OnuV1aVUynCUd/FiKl4icpPSceowk3rHczwFEBuZvz+E1EU4KExR0MCPeQfaQ== + version "5.2.1" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-5.2.1.tgz#41814b0460b68b9baf74f57f5a6046224d55d71e" + integrity sha512-+dLut9zvvuIM/MrtdHBVSh/QYJ9+uCKYoqww9cOYrndQH4O4rD/qH0IAwFhD5WJKfmWE6WgCOrLQPd/H5YJRVQ== dependencies: clone-response "^1.0.2" get-stream "^4.0.0" @@ -1735,10 +1733,10 @@ camelcase@^5.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42" integrity sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA== -caniuse-lite@^1.0.30000899: - version "1.0.30000912" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000912.tgz#08e650d4090a9c0ab06bfd2b46b7d3ad6dcaea28" - integrity sha512-M3zAtV36U+xw5mMROlTXpAHClmPAor6GPKAMD5Yi7glCB5sbMPFtnQ3rGpk4XqPdUrrTIaVYSJZxREZWNy8QJg== +caniuse-lite@^1.0.30000921: + version "1.0.30000923" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000923.tgz#148f9bda508024b5ce957b463ae2e8302b451bb2" + integrity sha512-j5ur7eeluOFjjPUkydtXP4KFAsmH3XaQNch5tvWSO+dLHYt5PE+VgJZLWtbVOodfWij6m6zas28T4gB/cLYq1w== capture-exit@^1.2.0: version "1.2.0" @@ -1804,7 +1802,7 @@ chownr@~1.0.1: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" integrity sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE= -ci-info@^1.4.0, ci-info@^1.5.0: +ci-info@^1.5.0, ci-info@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A== @@ -1941,9 +1939,9 @@ colors@1.0.3: integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs= colors@^1.1.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.2.tgz#2df8ff573dfbf255af562f8ce7181d6b971a359b" - integrity sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ== + version "1.3.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.3.tgz#39e005d546afe01e01f9c4ca8fa50f686a01205d" + integrity sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg== columnify@~1.5.4: version "1.5.4" @@ -2003,7 +2001,7 @@ concat-stream@^1.5.0, concat-stream@^1.5.2: readable-stream "^2.2.2" typedarray "^0.0.6" -config-chain@~1.1.11: +config-chain@^1.1.12: version "1.1.12" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa" integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA== @@ -2124,9 +2122,9 @@ copy-descriptor@^0.1.0: integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= core-js@^2.4.0, core-js@^2.5.0, core-js@^2.5.7: - version "2.5.7" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.7.tgz#f972608ff0cead68b841a16a932d0b183791814e" - integrity sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw== + version "2.6.1" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.1.tgz#87416ae817de957a3f249b3b5ca475d4aaed6042" + integrity sha512-L72mmmEayPJBejKIWe2pYtGis5r0tQ5NaJekdhyXgeMQTpJoBsH0NL4ElY2LfSoV15xeQWKQ+XTTOZdyero5Xg== core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" @@ -2244,9 +2242,9 @@ data-urls@^1.0.0: whatwg-url "^7.0.0" date-fns@^1.27.2: - version "1.29.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6" - integrity sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw== + version "1.30.1" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" + integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== dateformat@^3.0.0: version "3.0.3" @@ -2275,9 +2273,9 @@ debug@^3.1.0: ms "^2.1.1" debug@^4.0.0, debug@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" - integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg== + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== dependencies: ms "^2.1.1" @@ -2326,10 +2324,10 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -deepmerge@2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.2.1.tgz#5d3ff22a01c00f645405a2fbc17d0778a1801170" - integrity sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA== +deepmerge@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-3.0.0.tgz#ca7903b34bfa1f8c2eab6779280775a411bfc6ba" + integrity sha512-a8z8bkgHsAML+uHLqmMS83HHlpy3PvZOOuiTQqaa3wu8ZVg3h0hqHk6aCsGdOnZV2XMM/FRimNGjUh0KCcmHBw== default-require-extensions@^1.0.0: version "1.0.0" @@ -2493,10 +2491,10 @@ editor@~1.0.0: resolved "https://registry.yarnpkg.com/editor/-/editor-1.0.0.tgz#60c7f87bd62bcc6a894fa8ccd6afb7823a24f742" integrity sha1-YMf4e9YrzGqJT6jM1q+3gjok90I= -electron-to-chromium@^1.3.82: - version "1.3.86" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.86.tgz#a45ea01da5b26500d12bca5e0f194ebb3e1fd14e" - integrity sha512-BcmXOu37FCPxrrh0wyKgKi5dAjIu2ohxN5ptapkLPKRC3IBK2NeIwh9n1x/8HzSRQiEKamJkDce1ZgOGgEX9iw== +electron-to-chromium@^1.3.92: + version "1.3.96" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.96.tgz#25770ec99b8b07706dedf3a5f43fa50cb54c4f9a" + integrity sha512-ZUXBUyGLeoJxp4Nt6G/GjBRLnyz8IKQGexZ2ndWaoegThgMGFO1tdDYID5gBV32/1S83osjJHyfzvanE/8HY4Q== elegant-spinner@^1.0.1: version "1.0.1" @@ -2518,9 +2516,9 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: once "^1.4.0" env-ci@^3.0.0: - version "3.1.2" - resolved "https://registry.yarnpkg.com/env-ci/-/env-ci-3.1.2.tgz#ee3c78cd24f61ee12aca8b69ecdf0a97ca3ceb5b" - integrity sha512-qJ+ug5OEHEK6HyjhEB0z2tPJCmdvemQE3WUUYEe7qj7teZIJGjZK9elWB4kxE8qRdVHWl4aBvyVmX0Y5xlMbBw== + version "3.1.3" + resolved "https://registry.yarnpkg.com/env-ci/-/env-ci-3.1.3.tgz#17626015676d35bfb64d6f2945a178d559c0d23d" + integrity sha512-4NudFu3oUCNprsGkt/LmvqAwJlzX9QT8289AavXiDH1pBJuEd4n0ty98yUOWN3uFtjOhOGrmt1/FDKFxCewejw== dependencies: execa "^1.0.0" java-properties "^0.2.9" @@ -3159,7 +3157,7 @@ glob@7.1.2: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@~7.1.2: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== @@ -3219,11 +3217,11 @@ got@^6.7.1: url-parse-lax "^1.0.0" got@^9.1.0: - version "9.3.2" - resolved "https://registry.yarnpkg.com/got/-/got-9.3.2.tgz#f6e3bd063aa8f461ccd924afa2ba2b61deab3989" - integrity sha512-OyKOUg71IKvwb8Uj0KP6EN3+qVVvXmYsFznU1fnwUnKtDbZnwSlAi7muNlu4HhBfN9dImtlgg9e7H0g5qVdaeQ== + version "9.5.0" + resolved "https://registry.yarnpkg.com/got/-/got-9.5.0.tgz#6fd0312c6b694c0a11d9119d95fd7daed174eb49" + integrity sha512-N+4kb6i9t1lauJ4NwLVVoFVLxZNa6i+iivtNzCSVw7+bVbTXoq0qXctdd8i9rj3lrI0zDk5NGzcO4bfpEP6Uuw== dependencies: - "@sindresorhus/is" "^0.12.0" + "@sindresorhus/is" "^0.14.0" "@szmarczak/http-timer" "^1.1.0" cacheable-request "^5.1.0" decompress-response "^3.3.0" @@ -3235,7 +3233,7 @@ got@^9.1.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@~4.1.11: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6: version "4.1.15" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== @@ -4940,6 +4938,13 @@ lru-cache@^4.0.1, lru-cache@^4.1.1, lru-cache@^4.1.2, lru-cache@^4.1.3: pseudomap "^1.0.2" yallist "^2.1.2" +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + macos-release@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.0.0.tgz#7dddf4caf79001a851eb4fba7fb6034f251276ab" @@ -5220,9 +5225,9 @@ minipass@^2.2.1, minipass@^2.3.3, minipass@^2.3.4: yallist "^3.0.0" minizlib@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.1.1.tgz#6734acc045a46e61d596a43bb9d9cd326e19cc42" - integrity sha512-TrfjCjk4jLhcJyGMYymBH6oTXcWjYbUAXTHDbtnWHjZC25h0cdajHuPE1zxb4DVmu8crfh+HwH/WMuyLG0nHBg== + version "1.2.1" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614" + integrity sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA== dependencies: minipass "^2.2.1" @@ -5306,9 +5311,9 @@ mute-stream@~0.0.4: integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= nan@^2.9.2: - version "2.11.1" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.1.tgz#90e22bccb8ca57ea4cd37cc83d3819b52eea6766" - integrity sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA== + version "2.12.1" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.12.1.tgz#7b1aa193e9aa86057e3c7bbd0ac448e770925552" + integrity sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw== nanomatch@^1.2.9: version "1.2.13" @@ -5426,10 +5431,10 @@ node-pre-gyp@^0.10.0: semver "^5.3.0" tar "^4" -node-releases@^1.0.1: - version "1.0.5" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.5.tgz#a641adcc968b039a27345d92ef10b093e5cbd41d" - integrity sha512-Ky7q0BO1BBkG/rQz6PkEZ59rwo+aSfhczHP1wwq8IowoVdN/FpiP7qp0XW0P2+BVCWe5fQUBozdbVd54q1RbCQ== +node-releases@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.2.tgz#93c17fba5eec8650ad908de5433fa8763baebe4d" + integrity sha512-j1gEV/zX821yxdWp/1vBMN0pSUjuH9oGUdLCb4PfUko6ZW7KdRs3Z+QGGwDUhYtSpQvdVVyLd2V0YvLsmdg5jQ== dependencies: semver "^5.3.0" @@ -5476,14 +5481,14 @@ normalize-url@^3.1.0: integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== normalize-url@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.0.0.tgz#6c2214dde2fc8ea88509ec79774ccbd1d426c1ea" - integrity sha512-OrtNzJOeI9+UaF8KfvPoqh8ZVjLiun+fggtLzrpPsmdOU01eIp3vYXDfeFv4KwqJxcmmrW/ubNCN+9iIQRVtfw== + version "4.1.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.1.0.tgz#307e74c87473efa81969ad1b4bb91f1990178904" + integrity sha512-X781mkWeK6PDMAZJfGn/wnwil4dV6pIdF9euiNqtA89uJvZuNDJO2YyJxiwpPhTQcF5pYUU1v+kcOxzYV6rZlA== npm-audit-report@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/npm-audit-report/-/npm-audit-report-1.3.1.tgz#e79ea1fcb5ffaf3031102b389d5222c2b0459632" - integrity sha512-SjTF8ZP4rOu3JiFrTMi4M1CmVo2tni2sP4TzhyCMHwnMGf6XkdGLZKt9cdZ12esKf0mbQqFyU9LtY0SoeahL7g== + version "1.3.2" + resolved "https://registry.yarnpkg.com/npm-audit-report/-/npm-audit-report-1.3.2.tgz#303bc78cd9e4c226415076a4f7e528c89fc77018" + integrity sha512-abeqS5ONyXNaZJPGAf6TOUMNdSe1Y6cpc9MLBRn+CuUoYbfdca6AxOyXVlfIv9OgKX+cacblbG5w7A6ccwoTPw== dependencies: cli-table3 "^0.5.0" console-control-strings "^1.1.0" @@ -5534,7 +5539,7 @@ npm-logical-tree@^1.2.1: semver "^5.5.0" validate-npm-package-name "^3.0.0" -npm-packlist@^1.1.10, npm-packlist@^1.1.11, npm-packlist@^1.1.6: +npm-packlist@^1.1.10, npm-packlist@^1.1.12, npm-packlist@^1.1.6: version "1.1.12" resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.12.tgz#22bde2ebc12e72ca482abd67afc51eb49377243a" integrity sha512-WJKFOVMeAlsU/pjXuqVdzU0WfgtIBCupkEVwn+1Y0ERAbUfWw8R4GjgVbaKnUjRoD2FoQbHOCbOyT5Mbs9Lw4g== @@ -5631,9 +5636,9 @@ npm-which@^3.0.1: which "^1.2.10" npm@^6.3.0: - version "6.4.1" - resolved "https://registry.yarnpkg.com/npm/-/npm-6.4.1.tgz#4f39f9337b557a28faed4a771d5c8802d6b4288b" - integrity sha512-mXJL1NTVU136PtuopXCUQaNWuHlXCTp4McwlSW8S9/Aj8OEPAlSBgo8og7kJ01MjCDrkmqFQTvN5tTEhBMhXQg== + version "6.5.0" + resolved "https://registry.yarnpkg.com/npm/-/npm-6.5.0.tgz#30ed48d4cd4d17d68ee04a5fcf9fa2ca9167d819" + integrity sha512-SPq8zG2Kto+Xrq55E97O14Jla13PmQT5kSnvwBj88BmJZ5Nvw++OmlWfhjkB67pcgP5UEXljEtnGFKZtOgt6MQ== dependencies: JSONStream "^1.3.4" abbrev "~1.1.1" @@ -5642,28 +5647,28 @@ npm@^6.3.0: aproba "~1.2.0" archy "~1.0.0" bin-links "^1.1.2" - bluebird "~3.5.1" + bluebird "^3.5.3" byte-size "^4.0.3" cacache "^11.2.0" call-limit "~1.1.0" chownr "~1.0.1" - ci-info "^1.4.0" + ci-info "^1.6.0" cli-columns "^3.1.2" cli-table3 "^0.5.0" cmd-shim "~2.0.2" columnify "~1.5.4" - config-chain "~1.1.11" + config-chain "^1.1.12" detect-indent "~5.0.0" detect-newline "^2.1.0" dezalgo "~1.0.3" editor "~1.0.0" - figgy-pudding "^3.4.1" + figgy-pudding "^3.5.1" find-npm-prefix "^1.0.2" fs-vacuum "~1.2.10" fs-write-stream-atomic "~1.0.10" gentle-fs "^2.0.1" - glob "~7.1.2" - graceful-fs "~4.1.11" + glob "^7.1.3" + graceful-fs "^4.1.15" has-unicode "~2.0.1" hosted-git-info "^2.7.1" iferr "^1.0.2" @@ -5697,7 +5702,7 @@ npm@^6.3.0: npm-install-checks "~3.0.0" npm-lifecycle "^2.1.0" npm-package-arg "^6.1.0" - npm-packlist "^1.1.11" + npm-packlist "^1.1.12" npm-pick-manifest "^2.1.0" npm-profile "^3.0.2" npm-registry-client "^8.6.0" @@ -5705,7 +5710,7 @@ npm@^6.3.0: npm-user-validate "~1.0.0" npmlog "~4.1.2" once "~1.4.0" - opener "^1.5.0" + opener "^1.5.1" osenv "^0.1.5" pacote "^8.1.6" path-is-inside "~1.0.2" @@ -5723,14 +5728,14 @@ npm@^6.3.0: retry "^0.12.0" rimraf "~2.6.2" safe-buffer "^5.1.2" - semver "^5.5.0" + semver "^5.5.1" sha "~2.0.1" slide "~1.1.6" sorted-object "~2.0.1" sorted-union-stream "~2.1.3" - ssri "^6.0.0" + ssri "^6.0.1" stringify-package "^1.0.0" - tar "^4.4.6" + tar "^4.4.8" text-table "~0.2.0" tiny-relative-date "^1.3.0" uid-number "0.0.6" @@ -5838,7 +5843,7 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" -opener@^1.5.0: +opener@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA== @@ -5982,10 +5987,10 @@ p-reduce@^1.0.0: resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo= -p-retry@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-2.0.0.tgz#b97f1f4d6d81a3c065b2b40107b811e995c1bfba" - integrity sha512-ZbCuzAmiwJ45q4evp/IG9D+5MUllGSUeCWwPt3j/tdYSi1KPkSD+46uqmAA1LhccDhOXv8kYZKNb8x78VflzfA== +p-retry@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-3.0.0.tgz#f1a09233417dd40b42a7a4a3ed0f4780f23b90d8" + integrity sha512-fAB7bebxaj8nylNAsxPNkwPZ/48bXFdFnWrz0v2sV+H5BsGfVL7Ap7KgONqy7rOK4ZI1I+SU+lmettO3hM+2HQ== dependencies: retry "^0.12.0" @@ -6121,7 +6126,7 @@ path-key@^2.0.0, path-key@^2.0.1: resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= -path-parse@^1.0.5: +path-parse@^1.0.5, path-parse@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== @@ -6302,9 +6307,9 @@ pseudomap@^1.0.2: integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= psl@^1.1.24, psl@^1.1.28: - version "1.1.29" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" - integrity sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ== + version "1.1.31" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" + integrity sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw== pump@^2.0.0, pump@^2.0.1: version "2.0.1" @@ -6574,11 +6579,16 @@ regenerator-runtime@^0.10.5: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" integrity sha1-M2w+/BIgrc7dosn6tntaeVWjNlg= -regenerator-runtime@^0.11.0, regenerator-runtime@^0.11.1: +regenerator-runtime@^0.11.0: version "0.11.1" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== +regenerator-runtime@^0.12.0: + version "0.12.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" + integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg== + regenerator-transform@^0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" @@ -6602,14 +6612,14 @@ regex-not@^1.0.0, regex-not@^1.0.2: safe-regex "^1.1.0" regexpu-core@^4.1.3, regexpu-core@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.2.0.tgz#a3744fa03806cffe146dea4421a3e73bdcc47b1d" - integrity sha512-Z835VSnJJ46CNBttalHD/dB+Sj2ezmY6Xp38npwU87peK6mqOzOpV8eYktdkLTEkzzD+JsTcxd84ozd8I14+rw== + version "4.4.0" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.4.0.tgz#8d43e0d1266883969720345e70c275ee0aec0d32" + integrity sha512-eDDWElbwwI3K0Lo6CqbQbA6FwgtCz4kYTarrri1okfkRLZAqstU+B3voZBCjg8Fl6iq0gXrJG6MvRgLthfvgOA== dependencies: regenerate "^1.4.0" regenerate-unicode-properties "^7.0.0" - regjsgen "^0.4.0" - regjsparser "^0.3.0" + regjsgen "^0.5.0" + regjsparser "^0.6.0" unicode-match-property-ecmascript "^1.0.4" unicode-match-property-value-ecmascript "^1.0.2" @@ -6628,15 +6638,15 @@ registry-url@^3.0.3: dependencies: rc "^1.0.1" -regjsgen@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.4.0.tgz#c1eb4c89a209263f8717c782591523913ede2561" - integrity sha512-X51Lte1gCYUdlwhF28+2YMO0U6WeN0GLpgpA7LK7mbdDnkQYiwvEpmpe0F/cv5L14EbxgrdayAG3JETBv0dbXA== +regjsgen@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.0.tgz#a7634dc08f89209c2049adda3525711fb97265dd" + integrity sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA== -regjsparser@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.3.0.tgz#3c326da7fcfd69fa0d332575a41c8c0cdf588c96" - integrity sha512-zza72oZBBHzt64G7DxdqrOo/30bhHkwMUoT0WqfGu98XLd7N+1tsy5MJ96Bk4MD0y74n629RhmrGW6XlnLLwCA== +regjsparser@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.0.tgz#f1e6ae8b7da2bae96c99399b868cd6c933a2ba9c" + integrity sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ== dependencies: jsesc "~0.5.0" @@ -6767,11 +6777,11 @@ resolve@1.1.7: integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= resolve@1.x, resolve@^1.1.6, resolve@^1.3.2: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" - integrity sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA== + version "1.9.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.9.0.tgz#a14c6fdfa8f92a7df1d996cb7105fa744658ea06" + integrity sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ== dependencies: - path-parse "^1.0.5" + path-parse "^1.0.6" responselike@^1.0.2: version "1.0.2" @@ -6873,9 +6883,9 @@ sax@^1.2.4: integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== semantic-release@^15.9.16: - version "15.12.3" - resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-15.12.3.tgz#9f7c5a8ac55624a6418e0bf95bf53c2030487c12" - integrity sha512-3HCKD2ORxi6jItIoP9WeYJjjHsZqozSf6WUGcLClnRH553OVNKf4mLdOwo9UHJe6dVNSk5z7oDfGWKGwVy63BA== + version "15.13.1" + resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-15.13.1.tgz#18541032504aa0b443d011083685c9b42eb38c9f" + integrity sha512-bkrfQ10BhbJRMeq/Ih9DZ9FO4ffDwFYsRR134JP9JvQSf8GVX4sg3SnFFd7Q10C6pKwjKqMZ4+ZNB5uQYMLPEg== dependencies: "@semantic-release/commit-analyzer" "^6.1.0" "@semantic-release/error" "^2.2.0" @@ -6921,7 +6931,7 @@ semver-regex@^2.0.0: resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-2.0.0.tgz#a93c2c5844539a770233379107b38c7b4ac9d338" integrity sha512-mUdIBBvdn0PLOeP3TEkMH7HHeUP3GjsXCwKarjv/kGmUFOYg1VqEemKhoQpWMu6X2I8kHeuVdGibLGkVK+/5Qw== -"semver@2 >=2.2.1 || 3.x || 4 || 5", "semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@5.6.0, "semver@^2.3.0 || 3.x || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5, semver@^5.5.0: +"semver@2 >=2.2.1 || 3.x || 4 || 5", "semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@5.6.0, "semver@^2.3.0 || 3.x || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5, semver@^5.5.0, semver@^5.5.1: version "5.6.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== @@ -7161,9 +7171,9 @@ spawn-error-forwarder@~1.0.0: integrity sha1-Gv2Uc46ZmwNG17n8NzvlXgdXcCk= spdx-correct@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.2.tgz#19bb409e91b47b1ad54159243f7312a858db3c2e" - integrity sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ== + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== dependencies: spdx-expression-parse "^3.0.0" spdx-license-ids "^3.0.0" @@ -7182,9 +7192,9 @@ spdx-expression-parse@^3.0.0: spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz#a59efc09784c2a5bada13cfeaf5c75dd214044d2" - integrity sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg== + version "3.0.3" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz#81c0ce8f21474756148bbb5f3bfc0f36bf15d76e" + integrity sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g== split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" @@ -7220,9 +7230,9 @@ sprintf-js@~1.0.2: integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= sshpk@^1.7.0: - version "1.15.2" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.15.2.tgz#c946d6bd9b1a39d0e8635763f5242d6ed6dcb629" - integrity sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA== + version "1.16.0" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.0.tgz#1d4963a2fbffe58050aa9084ca20be81741c07de" + integrity sha512-Zhev35/y7hRMcID/upReIvRse+I9SVhyVre/KTJSJQWMz3C3+G+HpO7m1wK/yckEtujKZ7dS4hkVxAnmHaIGVQ== dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" @@ -7241,7 +7251,7 @@ ssri@^5.2.4: dependencies: safe-buffer "^5.1.1" -ssri@^6.0.0: +ssri@^6.0.0, ssri@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== @@ -7421,7 +7431,7 @@ supports-color@^5.2.0, supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -symbol-observable@^1.1.0, symbol-observable@^1.2.0: +symbol-observable@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== @@ -7440,7 +7450,7 @@ tar@^2.0.0: fstream "^1.0.2" inherits "2" -tar@^4, tar@^4.4.3, tar@^4.4.6: +tar@^4, tar@^4.4.3, tar@^4.4.8: version "4.4.8" resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d" integrity sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ== @@ -7583,9 +7593,9 @@ traverse@~0.6.6: integrity sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc= travis-deploy-once@^5.0.8: - version "5.0.9" - resolved "https://registry.yarnpkg.com/travis-deploy-once/-/travis-deploy-once-5.0.9.tgz#c5a2f639e17d8fd542f66d25ade126179d5e8acf" - integrity sha512-cyHFErzq0HTEGY29RAq1clqFdt/IkCrlcOmyM1cGoGnEyukrrFi1fpy6JH3Mlf+88XsFwvluqKVWzj2bdz3k8A== + version "5.0.11" + resolved "https://registry.yarnpkg.com/travis-deploy-once/-/travis-deploy-once-5.0.11.tgz#32665480f82ee43b7936f19371f839cdc9b30202" + integrity sha512-iyctEtFvgXxin3Ur6jqqM9QdUqUKU8DShdVlRMDFwhLZ8+IGt3PnYPNZDSW45iDKCiUNJ0tGVidNpVDBG2ioKQ== dependencies: "@babel/core" "^7.0.0" "@babel/polyfill" "^7.0.0" @@ -7594,7 +7604,7 @@ travis-deploy-once@^5.0.8: chalk "^2.1.0" execa "^1.0.0" got "^9.1.0" - p-retry "^2.0.0" + p-retry "^3.0.0" semver "^5.4.1" update-notifier "^2.3.0" url-join "^4.0.0" @@ -7715,7 +7725,7 @@ union-value@^1.0.0: is-extendable "^0.1.1" set-value "^0.4.3" -unique-filename@^1.1.0, unique-filename@~1.1.0: +unique-filename@^1.1.0, unique-filename@^1.1.1, unique-filename@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== From 36d2681c19cd474ab52a568cf98e1f26efde606a Mon Sep 17 00:00:00 2001 From: James Henry Date: Fri, 28 Dec 2018 22:19:14 +0400 Subject: [PATCH 12/30] feat: add errorOnTypeScriptSyntaticAndSemanticIssues option (#57) --- src/ast-converter.ts | 15 +- src/convert.ts | 13 + src/parser.ts | 46 +- src/semantic-errors.ts | 59 + src/temp-types-based-on-js-source.ts | 2 + tests/ast-alignment/fixtures-to-test.ts | 6 +- ...ed.src.xjs => param-object-wrapped.src.js} | 0 ...s => invalid-not-final-array-empty.src.js} | 0 ...l-array.src.xjs => not-final-array.src.js} | 0 .../errorRecovery/solo-const.src.ts | 1 + tests/lib/__snapshots__/javascript.ts.snap | 3133 ++++++++++++----- .../semantic-diagnostics-enabled.ts.snap | 1929 ++++++++++ tests/lib/__snapshots__/typescript.ts.snap | 62 + tests/lib/semantic-diagnostics-enabled.ts | 52 + tests/lib/semanticInfo.ts | 2 - 15 files changed, 4369 insertions(+), 951 deletions(-) create mode 100644 src/semantic-errors.ts rename tests/fixtures/javascript/destructuring-and-defaultParams/{param-object-wrapped.src.xjs => param-object-wrapped.src.js} (100%) rename tests/fixtures/javascript/destructuring-and-spread/{invalid-not-final-array-empty.src.xjs => invalid-not-final-array-empty.src.js} (100%) rename tests/fixtures/javascript/destructuring-and-spread/{not-final-array.src.xjs => not-final-array.src.js} (100%) create mode 100644 tests/fixtures/typescript/errorRecovery/solo-const.src.ts create mode 100644 tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap create mode 100644 tests/lib/semantic-diagnostics-enabled.ts diff --git a/src/ast-converter.ts b/src/ast-converter.ts index 04df089..5ceece0 100644 --- a/src/ast-converter.ts +++ b/src/ast-converter.ts @@ -5,25 +5,12 @@ * @copyright jQuery Foundation and other contributors, https://jquery.org/ * MIT License */ -import convert, { getASTMaps, resetASTMaps } from './convert'; +import convert, { getASTMaps, resetASTMaps, convertError } from './convert'; import { convertComments } from './convert-comments'; import nodeUtils from './node-utils'; import ts from 'typescript'; import { Extra } from './temp-types-based-on-js-source'; -/** - * Extends and formats a given error object - * @param {Object} error the error object - * @returns {Object} converted error object - */ -function convertError(error: any) { - return nodeUtils.createError( - error.file, - error.start, - error.message || error.messageText - ); -} - export default ( ast: ts.SourceFile, extra: Extra, diff --git a/src/convert.ts b/src/convert.ts index 5ccc6f4..f03ae79 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -39,6 +39,19 @@ interface ConvertConfig { additionalOptions: ConvertAdditionalOptions; } +/** + * Extends and formats a given error object + * @param {Object} error the error object + * @returns {Object} converted error object + */ +export function convertError(error: any) { + return nodeUtils.createError( + error.file, + error.start, + error.message || error.messageText + ); +} + /** * Converts a TypeScript node into an ESTree node * @param {Object} config configuration options for the conversion diff --git a/src/parser.ts b/src/parser.ts index 64d6c88..b4a7eb7 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -12,14 +12,16 @@ import { import semver from 'semver'; import ts from 'typescript'; import convert from './ast-converter'; +import { convertError } from './convert'; +import { Program } from './estree/spec'; +import util from './node-utils'; import { - Extra, - ParserOptions, + ESTreeComment, ESTreeToken, - ESTreeComment + Extra, + ParserOptions } from './temp-types-based-on-js-source'; -import { Program } from './estree/spec'; -import util from './node-utils'; +import { getFirstSemanticOrSyntacticError } from './semantic-errors'; const packageJSON = require('../package.json'); @@ -59,6 +61,7 @@ function resetExtra(): void { log: console.log, projects: [], errorOnUnknownASTType: false, + errorOnTypeScriptSyntaticAndSemanticIssues: false, code: '', tsconfigRootDir: process.cwd(), extraFileExtensions: [] @@ -246,6 +249,18 @@ function generateAST( extra.errorOnUnknownASTType = true; } + /** + * Retrieve semantic and syntactic diagnostics from the underlying TypeScript Program + * and turn them into parse errors + */ + if ( + shouldGenerateServices && + typeof options.errorOnTypeScriptSyntaticAndSemanticIssues === 'boolean' && + options.errorOnTypeScriptSyntaticAndSemanticIssues + ) { + extra.errorOnTypeScriptSyntaticAndSemanticIssues = true; + } + if (typeof options.useJSXTextNode === 'boolean' && options.useJSXTextNode) { extra.useJSXTextNode = true; } @@ -304,7 +319,23 @@ function generateAST( ); extra.code = code; + + /** + * Convert the AST + */ const { estree, astMaps } = convert(ast, extra, shouldProvideParserServices); + + /** + * Even if TypeScript parsed the source code ok, and we had no problems converting the AST, + * there may be other syntactic or semantic issues in the code that we can optionally report on. + */ + if (program && extra.errorOnTypeScriptSyntaticAndSemanticIssues) { + const error = getFirstSemanticOrSyntacticError(program, ast); + if (error) { + throw convertError(error); + } + } + return { estree, program: shouldProvideParserServices ? program : undefined, @@ -327,6 +358,11 @@ export function parse( code: string, options?: T ) { + if (options && options.errorOnTypeScriptSyntaticAndSemanticIssues) { + throw new Error( + `"errorOnTypeScriptSyntaticAndSemanticIssues" is only supported for parseAndGenerateServices()` + ); + } return generateAST(code, options).estree; } diff --git a/src/semantic-errors.ts b/src/semantic-errors.ts new file mode 100644 index 0000000..e481236 --- /dev/null +++ b/src/semantic-errors.ts @@ -0,0 +1,59 @@ +import ts from 'typescript'; + +interface SemanticOrSyntacticError extends ts.Diagnostic { + message: string; +} + +/** + * By default, diagnostics from the TypeScript compiler contain all errors - regardless of whether + * they are related to generic ECMAScript standards, or TypeScript-specific constructs. + * + * Therefore, we filter out all diagnostics, except for the ones we explicitly want to consider when + * the user opts in to throwing errors on semantic issues. + */ +export function getFirstSemanticOrSyntacticError( + program: ts.Program, + ast: ts.SourceFile +): SemanticOrSyntacticError | undefined { + const supportedSyntacticDiagnostics = whitelistSupportedDiagnostics( + program.getSyntacticDiagnostics(ast) + ); + if (supportedSyntacticDiagnostics.length) { + return convertDiagnosticToSemanticOrSyntacticError( + supportedSyntacticDiagnostics[0] + ); + } + const supportedSemanticDiagnostics = whitelistSupportedDiagnostics( + program.getSemanticDiagnostics(ast) + ); + if (supportedSemanticDiagnostics.length) { + return convertDiagnosticToSemanticOrSyntacticError( + supportedSemanticDiagnostics[0] + ); + } + return undefined; +} + +function whitelistSupportedDiagnostics( + diagnostics: ReadonlyArray +): ReadonlyArray { + return diagnostics.filter(diagnostic => { + switch (diagnostic.code) { + case 1123: // ts 3.2: "Variable declaration list cannot be empty." + return true; + } + return false; + }); +} + +function convertDiagnosticToSemanticOrSyntacticError( + diagnostic: ts.Diagnostic +): SemanticOrSyntacticError { + return { + ...diagnostic, + message: ts.flattenDiagnosticMessageText( + diagnostic.messageText, + ts.sys.newLine + ) + }; +} diff --git a/src/temp-types-based-on-js-source.ts b/src/temp-types-based-on-js-source.ts index c3819ef..8ee48b9 100644 --- a/src/temp-types-based-on-js-source.ts +++ b/src/temp-types-based-on-js-source.ts @@ -58,6 +58,7 @@ export interface ESTreeNodeLoc { export interface Extra { errorOnUnknownASTType: boolean; + errorOnTypeScriptSyntaticAndSemanticIssues: boolean; useJSXTextNode: boolean; tokens: null | ESTreeToken[]; comment: boolean; @@ -80,6 +81,7 @@ export interface ParserOptions { comment?: boolean; jsx?: boolean; errorOnUnknownASTType?: boolean; + errorOnTypeScriptSyntaticAndSemanticIssues?: boolean; useJSXTextNode?: boolean; loggerFn?: Function | false; project?: string | string[]; diff --git a/tests/ast-alignment/fixtures-to-test.ts b/tests/ast-alignment/fixtures-to-test.ts index 53175a9..b0cd1f8 100644 --- a/tests/ast-alignment/fixtures-to-test.ts +++ b/tests/ast-alignment/fixtures-to-test.ts @@ -190,7 +190,8 @@ let fixturePatternConfigsToTest = [ * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree * does not actually error on them and will produce an AST. */ - 'error-complex-destructured-spread-first' // babel parse errors + 'error-complex-destructured-spread-first', // babel parse errors + 'not-final-array' // babel parse errors ] }), @@ -446,7 +447,8 @@ let fixturePatternConfigsToTest = [ 'decorator-on-enum-declaration', // babel parse errors 'decorator-on-interface-declaration', // babel parse errors 'interface-property-modifiers', // babel parse errors - 'enum-with-keywords' // babel parse errors + 'enum-with-keywords', // babel parse errors + 'solo-const' // babel parse errors ] }), diff --git a/tests/fixtures/javascript/destructuring-and-defaultParams/param-object-wrapped.src.xjs b/tests/fixtures/javascript/destructuring-and-defaultParams/param-object-wrapped.src.js similarity index 100% rename from tests/fixtures/javascript/destructuring-and-defaultParams/param-object-wrapped.src.xjs rename to tests/fixtures/javascript/destructuring-and-defaultParams/param-object-wrapped.src.js diff --git a/tests/fixtures/javascript/destructuring-and-spread/invalid-not-final-array-empty.src.xjs b/tests/fixtures/javascript/destructuring-and-spread/invalid-not-final-array-empty.src.js similarity index 100% rename from tests/fixtures/javascript/destructuring-and-spread/invalid-not-final-array-empty.src.xjs rename to tests/fixtures/javascript/destructuring-and-spread/invalid-not-final-array-empty.src.js diff --git a/tests/fixtures/javascript/destructuring-and-spread/not-final-array.src.xjs b/tests/fixtures/javascript/destructuring-and-spread/not-final-array.src.js similarity index 100% rename from tests/fixtures/javascript/destructuring-and-spread/not-final-array.src.xjs rename to tests/fixtures/javascript/destructuring-and-spread/not-final-array.src.js diff --git a/tests/fixtures/typescript/errorRecovery/solo-const.src.ts b/tests/fixtures/typescript/errorRecovery/solo-const.src.ts new file mode 100644 index 0000000..8baacf4 --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/solo-const.src.ts @@ -0,0 +1 @@ +const \ No newline at end of file diff --git a/tests/lib/__snapshots__/javascript.ts.snap b/tests/lib/__snapshots__/javascript.ts.snap index 2e5e845..809b88c 100644 --- a/tests/lib/__snapshots__/javascript.ts.snap +++ b/tests/lib/__snapshots__/javascript.ts.snap @@ -60629,68 +60629,1202 @@ Object { } `; -exports[`javascript fixtures/destructuring-and-forOf/loop.src 1`] = ` +exports[`javascript fixtures/destructuring-and-defaultParams/param-object-wrapped.src 1`] = ` Object { "body": Array [ Object { - "await": false, - "body": Object { + "expression": Object { "loc": Object { "end": Object { - "column": 17, + "column": 32, "line": 1, }, "start": Object { - "column": 16, + "column": 1, "line": 1, }, }, - "range": Array [ - 16, - 17, - ], - "type": "EmptyStatement", - }, - "left": Object { - "elements": Array [ + "properties": Array [ Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 7, + "column": 31, + "line": 1, + }, + "start": Object { + "column": 2, "line": 1, }, - "start": Object { - "column": 6, - "line": 1, + }, + "method": 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", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "params": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 15, + 16, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 14, + 17, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "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 { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "method": 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", + }, + ], + "range": Array [ + 5, + 31, + ], + "type": "FunctionExpression", + }, + }, + ], + "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", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/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 { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 12, + 15, + ], + "type": "Identifier", + }, + "type": "ForOfStatement", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/destructuring-and-spread/complex-destructured.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 3, + 4, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 3, + 4, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 3, + 4, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 6, + 7, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 1, + 9, + ], + "type": "ObjectPattern", + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, }, + "range": Array [ + 11, + 15, + ], + "type": "RestElement", + }, + ], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, - "name": "a", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", }, - ], + "range": Array [ + 0, + 16, + ], + "type": "ArrayPattern", + }, "loc": Object { "end": Object { - "column": 8, + "column": 20, "line": 1, }, "start": Object { - "column": 5, + "column": 0, "line": 1, }, }, + "operator": "=", "range": Array [ - 5, - 8, + 0, + 20, ], - "type": "ArrayPattern", + "right": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "d", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", }, "loc": Object { "end": Object { - "column": 17, + "column": 21, "line": 1, }, "start": Object { @@ -60700,33 +61834,15 @@ Object { }, "range": Array [ 0, - 17, + 21, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - }, - "type": "ForOfStatement", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { "column": 0, @@ -60735,14 +61851,14 @@ Object { }, "range": Array [ 0, - 18, + 21, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -60752,46 +61868,64 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "for", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 2, "line": 1, }, "start": Object { - "column": 4, + "column": 1, "line": 1, }, }, "range": Array [ - 4, - 5, + 1, + 2, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 6, + "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, - 6, ], "type": "Punctuator", - "value": "[", + "value": ",", }, Object { "loc": Object { @@ -60809,30 +61943,30 @@ Object { 7, ], "type": "Identifier", - "value": "a", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 9, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "range": Array [ - 7, 8, + 9, ], "type": "Punctuator", - "value": "]", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { @@ -60842,10 +61976,28 @@ Object { }, "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": "of", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { @@ -60854,16 +62006,16 @@ Object { "line": 1, }, "start": Object { - "column": 12, + "column": 14, "line": 1, }, }, "range": Array [ - 12, + 14, 15, ], "type": "Identifier", - "value": "foo", + "value": "c", }, Object { "loc": Object { @@ -60877,26 +62029,62 @@ Object { }, }, "range": Array [ - 15, - 16, + 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": ")", + "type": "Identifier", + "value": "d", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 21, "line": 1, }, "start": Object { - "column": 16, + "column": 20, "line": 1, }, }, "range": Array [ - 16, - 17, + 20, + 21, ], "type": "Punctuator", "value": ";", @@ -60906,7 +62094,7 @@ Object { } `; -exports[`javascript fixtures/destructuring-and-spread/complex-destructured.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/destructured-array-literal.src 1`] = ` Object { "body": Array [ Object { @@ -60916,7 +62104,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 2, "line": 1, }, "start": Object { @@ -60924,167 +62112,89 @@ Object { "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 3, - 4, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { + "name": "a", + "range": Array [ + 1, + 2, + ], + "type": "Identifier", + }, + Object { + "argument": Object { + "elements": Array [ + Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 1, }, "start": Object { - "column": 6, + "column": 8, "line": 1, }, }, "name": "b", "range": Array [ - 6, - 7, + 8, + 9, ], "type": "Identifier", }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 6, - 7, - ], - "shorthand": true, - "type": "Property", - "value": Object { + Object { "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 1, }, "start": Object { - "column": 6, + "column": 11, "line": 1, }, }, - "name": "b", + "name": "c", "range": Array [ - 6, - 7, + 11, + 12, ], "type": "Identifier", }, - }, - ], - "range": Array [ - 1, - 9, - ], - "type": "ObjectPattern", - }, - Object { - "argument": Object { + ], "loc": Object { "end": Object { - "column": 15, + "column": 13, "line": 1, }, "start": Object { - "column": 14, + "column": 7, "line": 1, }, }, - "name": "c", "range": Array [ - 14, - 15, + 7, + 13, ], - "type": "Identifier", + "type": "ArrayPattern", }, "loc": Object { "end": Object { - "column": 15, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 4, "line": 1, }, }, "range": Array [ - 11, - 15, + 4, + 13, ], "type": "RestElement", }, ], "loc": Object { "end": Object { - "column": 16, + "column": 14, "line": 1, }, "start": Object { @@ -61094,13 +62204,13 @@ Object { }, "range": Array [ 0, - 16, + 14, ], "type": "ArrayPattern", }, "loc": Object { "end": Object { - "column": 20, + "column": 18, "line": 1, }, "start": Object { @@ -61111,23 +62221,23 @@ Object { "operator": "=", "range": Array [ 0, - 20, + 18, ], "right": Object { "loc": Object { "end": Object { - "column": 20, + "column": 18, "line": 1, }, "start": Object { - "column": 19, + "column": 17, "line": 1, }, }, "name": "d", "range": Array [ - 19, - 20, + 17, + 18, ], "type": "Identifier", }, @@ -61135,7 +62245,7 @@ Object { }, "loc": Object { "end": Object { - "column": 21, + "column": 19, "line": 1, }, "start": Object { @@ -61145,15 +62255,15 @@ Object { }, "range": Array [ 0, - 21, + 19, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -61162,7 +62272,7 @@ Object { }, "range": Array [ 0, - 21, + 20, ], "sourceType": "script", "tokens": Array [ @@ -61199,31 +62309,31 @@ Object { 1, 2, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 3, "line": 1, }, "start": Object { - "column": 3, + "column": 2, "line": 1, }, }, "range": Array [ + 2, 3, - 4, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { @@ -61233,28 +62343,28 @@ Object { }, "range": Array [ 4, - 5, + 7, ], "type": "Punctuator", - "value": ",", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 8, "line": 1, }, "start": Object { - "column": 6, + "column": 7, "line": 1, }, }, "range": Array [ - 6, 7, + 8, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { @@ -61271,8 +62381,8 @@ Object { 8, 9, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { @@ -61295,7 +62405,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 12, "line": 1, }, "start": Object { @@ -61305,43 +62415,43 @@ Object { }, "range": Array [ 11, - 14, + 12, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 13, "line": 1, }, "start": Object { - "column": 14, + "column": 12, "line": 1, }, }, "range": Array [ - 14, - 15, + 12, + 13, ], - "type": "Identifier", - "value": "c", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 14, "line": 1, }, "start": Object { - "column": 15, + "column": 13, "line": 1, }, }, "range": Array [ - 15, - 16, + 13, + 14, ], "type": "Punctuator", "value": "]", @@ -61349,17 +62459,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 16, "line": 1, }, "start": Object { - "column": 17, + "column": 15, "line": 1, }, }, "range": Array [ - 17, - 18, + 15, + 16, ], "type": "Punctuator", "value": "=", @@ -61367,17 +62477,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 18, "line": 1, }, "start": Object { - "column": 19, + "column": 17, "line": 1, }, }, "range": Array [ - 19, - 20, + 17, + 18, ], "type": "Identifier", "value": "d", @@ -61385,17 +62495,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 19, "line": 1, }, "start": Object { - "column": 20, + "column": 18, "line": 1, }, }, "range": Array [ - 20, - 21, + 18, + 19, ], "type": "Punctuator", "value": ";", @@ -61405,28 +62515,95 @@ Object { } `; -exports[`javascript fixtures/destructuring-and-spread/destructured-array-literal.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/destructuring-param.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": 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", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { "elements": Array [ Object { "loc": Object { "end": Object { - "column": 2, + "column": 13, "line": 1, }, "start": Object { - "column": 1, + "column": 12, "line": 1, }, }, "name": "a", "range": Array [ - 1, - 2, + 12, + 13, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 15, + 16, ], "type": "Identifier", }, @@ -61436,171 +62613,180 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, + "column": 24, "line": 1, }, "start": Object { - "column": 11, + "column": 22, "line": 1, }, }, - "name": "c", + "name": "ok", "range": Array [ - 11, - 12, + 22, + 24, ], "type": "Identifier", }, ], "loc": Object { "end": Object { - "column": 13, + "column": 25, "line": 1, }, "start": Object { - "column": 7, + "column": 21, "line": 1, }, }, "range": Array [ - 7, - 13, + 21, + 25, ], "type": "ArrayPattern", }, "loc": Object { "end": Object { - "column": 13, + "column": 25, "line": 1, }, "start": Object { - "column": 4, + "column": 18, "line": 1, }, }, "range": Array [ - 4, - 13, + 18, + 25, ], "type": "RestElement", }, ], "loc": Object { "end": Object { - "column": 14, + "column": 26, "line": 1, }, "start": Object { - "column": 0, + "column": 11, "line": 1, }, }, "range": Array [ - 0, - 14, + 11, + 26, ], "type": "ArrayPattern", }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + ], + "range": Array [ + 0, + 30, + ], + "type": "FunctionDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, }, - "operator": "=", - "range": Array [ - 0, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "d", - "range": Array [ - 17, - 18, - ], - "type": "Identifier", + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "EmptyStatement", + }, + ], + "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, }, - "type": "AssignmentExpression", }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "a", + }, + Object { "loc": Object { "end": Object { - "column": 19, + "column": 11, "line": 1, }, "start": Object { - "column": 0, + "column": 10, "line": 1, }, }, "range": Array [ - 0, - 19, + 10, + 11, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "(", }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 12, "line": 1, }, "start": Object { - "column": 0, + "column": 11, "line": 1, }, }, "range": Array [ - 0, - 1, + 11, + 12, ], "type": "Punctuator", "value": "[", @@ -61608,17 +62794,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 2, + "column": 13, "line": 1, }, "start": Object { - "column": 1, + "column": 12, "line": 1, }, }, "range": Array [ - 1, - 2, + 12, + 13, ], "type": "Identifier", "value": "a", @@ -61626,17 +62812,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 3, + "column": 14, "line": 1, }, "start": Object { - "column": 2, + "column": 13, "line": 1, }, }, "range": Array [ - 2, - 3, + 13, + 14, ], "type": "Punctuator", "value": ",", @@ -61644,107 +62830,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 16, "line": 1, }, "start": Object { - "column": 4, + "column": 15, "line": 1, }, }, "range": Array [ - 4, - 7, + 15, + 16, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 17, "line": 1, }, "start": Object { - "column": 7, + "column": 16, "line": 1, }, }, "range": Array [ - 7, - 8, + 16, + 17, ], "type": "Punctuator", - "value": "[", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 21, "line": 1, }, "start": Object { - "column": 8, + "column": 18, "line": 1, }, }, "range": Array [ - 8, - 9, + 18, + 21, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 22, "line": 1, }, "start": Object { - "column": 9, + "column": 21, "line": 1, }, }, "range": Array [ - 9, - 10, + 21, + 22, ], "type": "Punctuator", - "value": ",", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 24, "line": 1, }, "start": Object { - "column": 11, + "column": 22, "line": 1, }, }, "range": Array [ - 11, - 12, + 22, + 24, ], "type": "Identifier", - "value": "c", + "value": "ok", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 25, "line": 1, }, "start": Object { - "column": 12, + "column": 24, "line": 1, }, }, "range": Array [ - 12, - 13, + 24, + 25, ], "type": "Punctuator", "value": "]", @@ -61752,17 +62938,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 26, "line": 1, }, "start": Object { - "column": 13, + "column": 25, "line": 1, }, }, "range": Array [ - 13, - 14, + 25, + 26, ], "type": "Punctuator", "value": "]", @@ -61770,266 +62956,412 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, + "column": 27, "line": 1, }, "start": Object { - "column": 15, + "column": 26, "line": 1, }, }, "range": Array [ - 15, - 16, + 26, + 27, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 29, "line": 1, }, "start": Object { - "column": 17, + "column": 28, "line": 1, }, }, "range": Array [ - 17, - 18, + 28, + 29, ], - "type": "Identifier", - "value": "d", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 30, "line": 1, }, "start": Object { - "column": 18, + "column": 29, "line": 1, }, }, "range": Array [ - 18, - 19, + 29, + 30, ], "type": "Punctuator", - "value": ";", + "value": "}", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/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", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 30, + "column": 31, "line": 1, }, "start": Object { - "column": 0, + "column": 30, "line": 1, }, }, - "params": Array [ - Object { + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-spread/error-complex-destructured-spread-first.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { "elements": Array [ Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 13, + "column": 5, "line": 1, }, "start": Object { - "column": 12, + "column": 1, "line": 1, }, }, - "name": "a", "range": Array [ - 12, - 13, + 1, + 5, ], - "type": "Identifier", + "type": "RestElement", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 15, "line": 1, }, "start": Object { - "column": 15, + "column": 7, "line": 1, }, }, - "name": "b", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - }, - Object { - "argument": Object { - "elements": Array [ - Object { + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 24, + "column": 10, "line": 1, }, "start": Object { - "column": 22, + "column": 9, "line": 1, }, }, - "name": "ok", + "name": "a", "range": Array [ - 22, - 24, + 9, + 10, ], "type": "Identifier", }, - ], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, }, - "start": Object { - "column": 21, - "line": 1, + "method": false, + "range": Array [ + 9, + 10, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", }, }, - "range": Array [ - 21, - 25, - ], - "type": "ArrayPattern", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 12, + 13, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, }, - }, + ], "range": Array [ - 18, - 25, + 7, + 15, ], - "type": "RestElement", + "type": "ObjectPattern", }, ], "loc": Object { "end": Object { - "column": 26, + "column": 16, "line": 1, }, "start": Object { - "column": 11, + "column": 0, "line": 1, }, }, "range": Array [ - 11, - 26, + 0, + 16, ], "type": "ArrayPattern", }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 20, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "d", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "type": "ExpressionStatement", + }, + ], + "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 [ - 0, - 30, + 4, + 5, ], - "type": "FunctionDeclaration", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 6, "line": 1, }, "start": Object { - "column": 30, + "column": 5, "line": 1, }, }, "range": Array [ - 30, - 31, + 5, + 6, ], - "type": "EmptyStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ",", }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { @@ -62037,16 +63369,16 @@ Object { "line": 1, }, "start": Object { - "column": 0, + "column": 7, "line": 1, }, }, "range": Array [ - 0, + 7, 8, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -62082,184 +63414,334 @@ Object { 11, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, 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": "[", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 16, "line": 1, }, "start": Object { - "column": 12, + "column": 15, "line": 1, }, }, "range": Array [ - 12, - 13, + 15, + 16, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 18, "line": 1, }, "start": Object { - "column": 13, + "column": 17, "line": 1, }, }, "range": Array [ - 13, - 14, + 17, + 18, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 20, "line": 1, }, "start": Object { - "column": 15, + "column": 19, "line": 1, }, }, "range": Array [ - 15, - 16, + 19, + 20, ], "type": "Identifier", - "value": "b", + "value": "d", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 21, "line": 1, }, "start": Object { - "column": 16, + "column": 20, "line": 1, }, }, "range": Array [ - 16, - 17, + 20, + 21, ], "type": "Punctuator", - "value": ",", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-spread/invalid-not-final-array-empty.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 5, + ], + "type": "RestElement", + }, + ], + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 12, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "type": "ExpressionStatement", + }, + ], + "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": 21, + "column": 1, "line": 1, }, "start": Object { - "column": 18, + "column": 0, "line": 1, }, }, "range": Array [ - 18, - 21, + 0, + 1, ], "type": "Punctuator", - "value": "...", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 4, "line": 1, }, "start": Object { - "column": 21, + "column": 1, "line": 1, }, }, "range": Array [ - 21, - 22, + 1, + 4, ], "type": "Punctuator", - "value": "[", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 5, "line": 1, }, "start": Object { - "column": 22, + "column": 4, "line": 1, }, }, "range": Array [ - 22, - 24, + 4, + 5, ], "type": "Identifier", - "value": "ok", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 6, "line": 1, }, "start": Object { - "column": 24, + "column": 5, "line": 1, }, }, "range": Array [ - 24, - 25, + 5, + 6, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 8, "line": 1, }, "start": Object { - "column": 25, + "column": 7, "line": 1, }, }, "range": Array [ - 25, - 26, + 7, + 8, ], "type": "Punctuator", "value": "]", @@ -62267,71 +63749,53 @@ Object { 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, + "column": 10, "line": 1, }, "start": Object { - "column": 28, + "column": 9, "line": 1, }, }, "range": Array [ - 28, - 29, + 9, + 10, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 12, "line": 1, }, "start": Object { - "column": 29, + "column": 11, "line": 1, }, }, "range": Array [ - 29, - 30, + 11, + 12, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 13, "line": 1, }, "start": Object { - "column": 30, + "column": 12, "line": 1, }, }, "range": Array [ - 30, - 31, + 12, + 13, ], "type": "Punctuator", "value": ";", @@ -62341,7 +63805,7 @@ Object { } `; -exports[`javascript fixtures/destructuring-and-spread/error-complex-destructured-spread-first.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/multi-destructured.src 1`] = ` Object { "body": Array [ Object { @@ -62349,27 +63813,9 @@ Object { "left": Object { "elements": Array [ Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 5, + "column": 2, "line": 1, }, "start": Object { @@ -62377,149 +63823,52 @@ Object { "line": 1, }, }, + "name": "a", "range": Array [ 1, - 5, + 2, ], - "type": "RestElement", + "type": "Identifier", }, Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "argument": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, }, - "method": false, - "range": Array [ - 9, - 10, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", + "start": Object { + "column": 7, + "line": 1, }, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 12, - 13, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, + "name": "b", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, }, - ], + "start": Object { + "column": 4, + "line": 1, + }, + }, "range": Array [ - 7, - 15, + 4, + 8, ], - "type": "ObjectPattern", + "type": "RestElement", }, ], "loc": Object { "end": Object { - "column": 16, + "column": 9, "line": 1, }, "start": Object { @@ -62529,13 +63878,13 @@ Object { }, "range": Array [ 0, - 16, + 9, ], "type": "ArrayPattern", }, "loc": Object { "end": Object { - "column": 20, + "column": 13, "line": 1, }, "start": Object { @@ -62546,23 +63895,23 @@ Object { "operator": "=", "range": Array [ 0, - 20, + 13, ], "right": Object { "loc": Object { "end": Object { - "column": 20, + "column": 13, "line": 1, }, "start": Object { - "column": 19, + "column": 12, "line": 1, }, }, - "name": "d", + "name": "c", "range": Array [ - 19, - 20, + 12, + 13, ], "type": "Identifier", }, @@ -62570,7 +63919,7 @@ Object { }, "loc": Object { "end": Object { - "column": 21, + "column": 14, "line": 1, }, "start": Object { @@ -62580,15 +63929,15 @@ Object { }, "range": Array [ 0, - 21, + 14, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { "column": 0, @@ -62597,7 +63946,7 @@ Object { }, "range": Array [ 0, - 22, + 14, ], "sourceType": "script", "tokens": Array [ @@ -62622,7 +63971,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 4, + "column": 2, "line": 1, }, "start": Object { @@ -62632,46 +63981,46 @@ Object { }, "range": Array [ 1, - 4, + 2, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { - "column": 4, + "column": 2, "line": 1, }, }, "range": Array [ - 4, - 5, + 2, + 3, ], - "type": "Identifier", - "value": "c", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 7, "line": 1, }, "start": Object { - "column": 5, + "column": 4, "line": 1, }, }, "range": Array [ - 5, - 6, + 4, + 7, ], "type": "Punctuator", - "value": ",", + "value": "...", }, Object { "loc": Object { @@ -62688,26 +64037,26 @@ Object { 7, 8, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 8, "line": 1, }, }, "range": Array [ + 8, 9, - 10, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { @@ -62725,7 +64074,7 @@ Object { 11, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { @@ -62743,94 +64092,22 @@ Object { 13, ], "type": "Identifier", - "value": "b", + "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": "]", - }, - 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, + "column": 13, "line": 1, }, }, "range": Array [ - 20, - 21, + 13, + 14, ], "type": "Punctuator", "value": ";", @@ -62840,7 +64117,7 @@ Object { } `; -exports[`javascript fixtures/destructuring-and-spread/multi-destructured.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/not-final-array.src 1`] = ` Object { "body": Array [ Object { @@ -62848,9 +64125,27 @@ Object { "left": Object { "elements": Array [ Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 2, + "column": 5, "line": 1, }, "start": Object { @@ -62858,47 +64153,29 @@ Object { "line": 1, }, }, - "name": "a", "range": Array [ 1, - 2, + 5, ], - "type": "Identifier", + "type": "RestElement", }, Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { "column": 8, "line": 1, }, "start": Object { - "column": 4, + "column": 7, "line": 1, }, }, + "name": "b", "range": Array [ - 4, + 7, 8, ], - "type": "RestElement", + "type": "Identifier", }, ], "loc": Object { @@ -63006,7 +64283,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 2, + "column": 4, "line": 1, }, "start": Object { @@ -63016,46 +64293,46 @@ Object { }, "range": Array [ 1, - 2, + 4, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { - "column": 2, + "column": 4, "line": 1, }, }, "range": Array [ - 2, - 3, + 4, + 5, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 6, "line": 1, }, "start": Object { - "column": 4, + "column": 5, "line": 1, }, }, "range": Array [ - 4, - 7, + 5, + 6, ], "type": "Punctuator", - "value": "...", + "value": ",", }, Object { "loc": Object { diff --git a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap new file mode 100644 index 0000000..e4efa0a --- /dev/null +++ b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap @@ -0,0 +1,1929 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/block-trailing-comment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/comment-within-condition.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/export-default-anonymous-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/jsdoc-comment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/jsx-block-comment.src.js.src 1`] = ` +Object { + "column": 10, + "index": 84, + "lineNumber": 5, + "message": "Unterminated regular expression literal.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/jsx-tag-comments.src.js.src 1`] = ` +Object { + "column": 9, + "index": 113, + "lineNumber": 7, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/line-comment-with-block-syntax.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/mix-line-and-block-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/no-comment-regex.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/no-comment-template.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/surrounding-call-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/surrounding-debugger-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/surrounding-return-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/surrounding-throw-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/surrounding-while-loop-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/switch-fallthrough-comment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/switch-fallthrough-comment-in-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/switch-no-default-comment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/switch-no-default-comment-in-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/switch-no-default-comment-in-nested-functions.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/template-string-block.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrayLiteral/array-literal-in-lhs.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrayLiteral/array-literals-in-binary-expr.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/as-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/as-param-with-params.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/basic.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/basic-in-binary-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/block-body.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/block-body-not-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-dup-params.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-missing-paren.src.js.src 1`] = ` +Object { + "column": 9, + "index": 9, + "lineNumber": 1, + "message": "';' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-not-arrow.src.js.src 1`] = ` +Object { + "column": 26, + "index": 26, + "lineNumber": 1, + "message": "Expression expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-numeric-param.src.js.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "';' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-numeric-param-multi.src.js.src 1`] = ` +Object { + "column": 9, + "index": 9, + "lineNumber": 1, + "message": "';' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-reverse-arrow.src.js.src 1`] = ` +Object { + "column": 1, + "index": 1, + "lineNumber": 1, + "message": "Expression expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-default-param-eval.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-dup-params.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-eval.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-eval-return.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-octal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-arguments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-eval.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-names.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-no-paren-arguments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-no-paren-eval.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-two-lines.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-wrapped-param.src.js.src 1`] = ` +Object { + "column": 6, + "index": 6, + "lineNumber": 1, + "message": "';' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/iife.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/multiple-params.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/no-auto-return.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-arguments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-eval.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-eval-params.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-octal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/return-arrow-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/return-sequence.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/single-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/single-param-parens.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/single-param-return-identifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/basics/delete-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/basics/do-while-statements.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/basics/identifiers-double-underscore.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/basics/instanceof.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/basics/new-with-member-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/basics/new-without-parens.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/basics/typeof-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/basics/update-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/basics/void-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/binary.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/decimal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/hex.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/octal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/invalid.src.js.src 1`] = ` +Object { + "column": 4, + "index": 4, + "lineNumber": 1, + "message": "';' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/lowercase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/uppercase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/blockBindings/const.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/blockBindings/let.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/blockBindings/let-in-switchcase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-accessor-properties.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-computed-static-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-method-named-prototype.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-method-named-static.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-method-named-with-space.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-one-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-one-method-super.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-method-named-prototype.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-method-named-static.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-methods-and-accessor-properties.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-computed-static-methods.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods-computed-constructor.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods-semi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods-three-semi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods-two-semi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-static-methods-named-constructor.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-with-constructor.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-with-constructor-parameters.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/class-with-constructor-with-space.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/derived-class-assign-to-var.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/derived-class-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/empty-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/empty-class-double-semi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/empty-class-semi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/empty-literal-derived-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-declaration.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-setter-declaration.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-two-super-classes.src.js.src 1`] = ` +Object { + "column": 18, + "index": 18, + "lineNumber": 1, + "message": "Classes can only extend a single class.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/named-class-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/classes/named-derived-class-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/defaultParams/class-constructor.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/defaultParams/class-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/defaultParams/declaration.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/defaultParams/expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/defaultParams/method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/defaultParams/not-all-params.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/array-member.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/array-to-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/array-var-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-constructor-params-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-constructor-params-defaults-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-constructor-params-defaults-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-constructor-params-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-method-params-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-method-params-defaults-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-method-params-defaults-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-method-params-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-all.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-longform-nested-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-nested-all.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-nested-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-all.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-assign.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-longform.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-longform-all.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-longform-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-mixed-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-nested-all.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-nested-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/destructured-array-catch.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/destructured-object-catch.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/invalid-defaults-object-assign.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/named-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/nested-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/nested-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/object-var-named.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/object-var-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/param-defaults-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/param-defaults-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/param-defaults-object-nested.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-array-wrapped.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-multi-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-nested-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-nested-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-object-wrapped.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring/sparse-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object-nested.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/array-const-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/array-let-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/object-const-named.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/object-const-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/object-let-named.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/object-let-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-defaultParams/param-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-defaultParams/param-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-defaultParams/param-object-short.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-defaultParams/param-object-wrapped.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-forOf/loop.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/complex-destructured.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/destructured-array-literal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/destructuring-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/invalid-not-final-array-empty.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/multi-destructured.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/not-final-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/single-destructured.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/var-complex-destructured.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/var-destructured-array-literal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/var-multi-destructured.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/var-single-destructured.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/directives/block.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/directives/directive-in-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/directives/function-non-strict.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/directives/non-directive-string.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/directives/program.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/directives/program-order.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/directives/raw.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalAsyncIteration/async-generators.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalAsyncIteration/async-iterator.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalDynamicImport/dynamic-import.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/arg-spread.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/destructuring-assign-mirror.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/function-parameter-object-spread.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/invalid-rest.src.js.src 1`] = ` +Object { + "column": 18, + "index": 18, + "lineNumber": 1, + "message": "',' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/object-rest.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/property-spread.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/shorthand-method-args.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/shorthand-methods.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/shorthand-properties.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/single-spread.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/spread-trailing-comma.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/two-spread.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding-finally.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/exponentiationOperators/exponential-operators.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-function-initializer.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-var-and-braces.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-var-and-no-braces.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/forOf/invalid-for-of-with-const-and-no-braces.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/forOf/invalid-for-of-with-let-and-no-braces.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/generators/anonymous-generator.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/generators/async-generator-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/generators/async-generator-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/generators/double-yield.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/generators/empty-generator-declaration.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/generators/generator-declaration.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/generators/yield-delegation.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/generators/yield-without-value.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/generators/yield-without-value-in-call.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/generators/yield-without-value-no-semi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/globalReturn/return-identifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/globalReturn/return-no-arg.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/globalReturn/return-true.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/importMeta/simple-import-meta.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/error-delete.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/error-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/error-strict.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-named-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-named-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-number.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-value.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-batch.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-default.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-named-as-default.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-named-as-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-named-as-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-as-default.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-as-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-as-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-empty.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-specifiers-comma.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-var.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-var-anonymous-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/export-var-number.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/import-default.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/import-default-and-named-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/import-default-and-namespace-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/import-default-as.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/import-jquery.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/import-module.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-as-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-as-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-empty.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-specifiers-comma.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/import-namespace-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/import-null-as-nil.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-await.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-batch-missing-from-clause.src.js.src 1`] = ` +Object { + "column": 0, + "index": 9, + "lineNumber": 2, + "message": "'from' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-batch-token.src.js.src 1`] = ` +Object { + "column": 9, + "index": 9, + "lineNumber": 1, + "message": "'from' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default.src.js.src 1`] = ` +Object { + "column": 20, + "index": 20, + "lineNumber": 1, + "message": "';' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default-equal.src.js.src 1`] = ` +Object { + "column": 15, + "index": 15, + "lineNumber": 1, + "message": "Expression expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default-token.src.js.src 1`] = ` +Object { + "column": 17, + "index": 17, + "lineNumber": 1, + "message": "';' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-default.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-extra-comma.src.js.src 1`] = ` +Object { + "column": 16, + "index": 16, + "lineNumber": 1, + "message": "Identifier expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-middle-comma.src.js.src 1`] = ` +Object { + "column": 12, + "index": 12, + "lineNumber": 1, + "message": "Identifier expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default.src.js.src 1`] = ` +Object { + "column": 7, + "index": 7, + "lineNumber": 1, + "message": "Expression expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-after-named.src.js.src 1`] = ` +Object { + "column": 12, + "index": 12, + "lineNumber": 1, + "message": "'from' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-after-named-after-default.src.js.src 1`] = ` +Object { + "column": 17, + "index": 17, + "lineNumber": 1, + "message": "'from' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-missing-module-specifier.src.js.src 1`] = ` +Object { + "column": 0, + "index": 11, + "lineNumber": 2, + "message": "'=' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-module-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-missing-module-specifier.src.js.src 1`] = ` +Object { + "column": 0, + "index": 20, + "lineNumber": 2, + "message": "'from' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-module-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-after-named.src.js.src 1`] = ` +Object { + "column": 12, + "index": 12, + "lineNumber": 1, + "message": "'from' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-after-namespace.src.js.src 1`] = ` +Object { + "column": 15, + "index": 15, + "lineNumber": 1, + "message": "'from' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-as-missing-from.src.js.src 1`] = ` +Object { + "column": 0, + "index": 24, + "lineNumber": 2, + "message": "'from' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-extra-comma.src.js.src 1`] = ` +Object { + "column": 16, + "index": 16, + "lineNumber": 1, + "message": "Identifier expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-middle-comma.src.js.src 1`] = ` +Object { + "column": 12, + "index": 12, + "lineNumber": 1, + "message": "Identifier expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-namespace-after-named.src.js.src 1`] = ` +Object { + "column": 12, + "index": 12, + "lineNumber": 1, + "message": "'from' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-namespace-missing-as.src.js.src 1`] = ` +Object { + "column": 9, + "index": 9, + "lineNumber": 1, + "message": "'as' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/newTarget/invalid-new-target.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/newTarget/invalid-unknown-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/newTarget/simple-new-target.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteral/object-literal-in-lhs.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-addition-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-and-identifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-getter-and-setter.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-string-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-variable-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/invalid-computed-variable-property.src.js.src 1`] = ` +Object { + "column": 0, + "index": 20, + "lineNumber": 3, + "message": "':' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src.js.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "':' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/standalone-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-addition.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/error-proto-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/error-proto-string-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/invalid-method-no-braces.src.js.src 1`] = ` +Object { + "column": 13, + "index": 19, + "lineNumber": 2, + "message": "'{' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/method-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-get.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-set.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-argument.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-string-name.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/string-name-method-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandProperties/shorthand-properties.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/invalid.src.js.src 1`] = ` +Object { + "column": 4, + "index": 4, + "lineNumber": 1, + "message": "';' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/lowercase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/strict-uppercase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/uppercase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/regex/regexp-simple.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/regexUFlag/regex-u-extended-escape.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/regexUFlag/regex-u-invalid-extended-escape.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/regexUFlag/regex-u-simple.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/regexYFlag/regexp-y-simple.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/restParams/basic-rest.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/restParams/class-constructor.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/restParams/class-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/restParams/error-no-default.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/restParams/error-not-last.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/restParams/func-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/restParams/func-expression-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/restParams/invalid-rest-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/restParams/single-rest.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-float.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-float-negative.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-null.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-number.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-number-negative.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-string.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/spread/error-invalid-if.src.js.src 1`] = ` +Object { + "column": 6, + "index": 6, + "lineNumber": 1, + "message": "Expression expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/spread/error-invalid-sequence.src.js.src 1`] = ` +Object { + "column": 4, + "index": 4, + "lineNumber": 1, + "message": "Expression expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/spread/multi-function-call.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/spread/not-final-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/spread/simple-function-call.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/templateStrings/deeply-nested.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/templateStrings/error-octal-literal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/templateStrings/escape-characters.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/templateStrings/expressions.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/templateStrings/multi-line-template-string.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/templateStrings/simple-template-string.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/templateStrings/single-dollar-sign.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/templateStrings/tagged-no-placeholders.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/templateStrings/tagged-template-string.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/basic-string-literal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/complex-string-literal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/invalid-empty-escape.src.js.src 1`] = ` +Object { + "column": 4, + "index": 4, + "lineNumber": 1, + "message": "Hexadecimal digit expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src.js.src 1`] = ` +Object { + "column": 10, + "index": 10, + "lineNumber": 1, + "message": "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/attributes.src.js.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/element-keyword-name.src.js.src 1`] = ` +Object { + "column": 12, + "index": 18, + "lineNumber": 2, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/embedded-comment.src.js.src 1`] = ` +Object { + "column": 30, + "index": 30, + "lineNumber": 1, + "message": "Unterminated regular expression literal.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/embedded-conditional.src.js.src 1`] = ` +Object { + "column": 3, + "index": 3, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/embedded-invalid-js-identifier.src.js.src 1`] = ` +Object { + "column": 9, + "index": 9, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/embedded-tags.src.js.src 1`] = ` +Object { + "column": 11, + "index": 11, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/empty-placeholder.src.js.src 1`] = ` +Object { + "column": 7, + "index": 7, + "lineNumber": 1, + "message": "Unterminated regular expression literal.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/escape-patterns.src.js.src 1`] = ` +Object { + "column": 3, + "index": 3, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-attribute.src.js.src 1`] = ` +Object { + "column": 3, + "index": 3, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-attribute-missing-equals.src.js.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-broken-tag.src.js.src 1`] = ` +Object { + "column": 3, + "index": 3, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-computed-end-tag-name.src.js.src 1`] = ` +Object { + "column": 9, + "index": 9, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-computed-string-end-tag-name.src.js.src 1`] = ` +Object { + "column": 11, + "index": 11, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-embedded-expression.src.js.src 1`] = ` +Object { + "column": 9, + "index": 9, + "lineNumber": 1, + "message": "':' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-leading-dot-tag-name.src.js.src 1`] = ` +Object { + "column": 1, + "index": 1, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-matching-placeholder-in-closing-tag.src.js.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-closing-tag.src.js.src 1`] = ` +Object { + "column": 4, + "index": 4, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-closing-tags.src.js.src 1`] = ` +Object { + "column": 6, + "index": 6, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-dot-tag-name.src.js.src 1`] = ` +Object { + "column": 8, + "index": 8, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-namespace-tag.src.js.src 1`] = ` +Object { + "column": 2, + "index": 2, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-closing-tag.src.js.src 1`] = ` +Object { + "column": 3, + "index": 3, + "lineNumber": 1, + "message": "Expression expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-closing-tag-attribute-placeholder.src.js.src 1`] = ` +Object { + "column": 3, + "index": 3, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-namespace-name.src.js.src 1`] = ` +Object { + "column": 1, + "index": 1, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-namespace-value.src.js.src 1`] = ` +Object { + "column": 2, + "index": 2, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-spread-operator.src.js.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-namespace-name-with-docts.src.js.src 1`] = ` +Object { + "column": 4, + "index": 4, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-namespace-value-with-dots.src.js.src 1`] = ` +Object { + "column": 2, + "index": 2, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-no-common-parent.src.js.src 1`] = ` +Object { + "column": 36, + "index": 36, + "lineNumber": 1, + "message": "Expression expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-no-common-parent-with-comment.src.js.src 1`] = ` +Object { + "column": 38, + "index": 38, + "lineNumber": 1, + "message": "',' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-no-tag-name.src.js.src 1`] = ` +Object { + "column": 1, + "index": 1, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-placeholder-in-closing-tag.src.js.src 1`] = ` +Object { + "column": 12, + "index": 12, + "lineNumber": 1, + "message": "Unterminated regular expression literal.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-shorthand-fragment-no-closing.src.js.src 1`] = ` +Object { + "column": 1, + "index": 1, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-trailing-dot-tag-name.src.js.src 1`] = ` +Object { + "column": 3, + "index": 3, + "lineNumber": 1, + "message": "Identifier expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/invalid-unexpected-comma.src.js.src 1`] = ` +Object { + "column": 6, + "index": 6, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/japanese-characters.src.js.src 1`] = ` +Object { + "column": 6, + "index": 6, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/less-than-operator.src.js.src 1`] = ` +Object { + "column": 6, + "index": 6, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/member-expression.src.js.src 1`] = ` +Object { + "column": 6, + "index": 6, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/member-expression-this.src.js.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/multiple-blank-spaces.src.js.src 1`] = ` +Object { + "column": 8, + "index": 8, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/namespaced-attribute-and-value-inserted.src.js.src 1`] = ` +Object { + "column": 3, + "index": 3, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/namespaced-name-and-attribute.src.js.src 1`] = ` +Object { + "column": 2, + "index": 2, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/newslines-and-entities.src.js.src 1`] = ` +Object { + "column": 4, + "index": 4, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/self-closing-tag.src.js.src 1`] = ` +Object { + "column": 3, + "index": 3, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/self-closing-tag-inside-tag.src.js.src 1`] = ` +Object { + "column": 9, + "index": 15, + "lineNumber": 2, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/self-closing-tag-with-newline.src.js.src 1`] = ` +Object { + "column": 2, + "index": 2, + "lineNumber": 1, + "message": "Invalid character.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/shorthand-fragment.src.js.src 1`] = ` +Object { + "column": 1, + "index": 1, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/shorthand-fragment-with-child.src.js.src 1`] = ` +Object { + "column": 1, + "index": 1, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/spread-child.src.js.src 1`] = ` +Object { + "column": 15, + "index": 15, + "lineNumber": 1, + "message": "Unterminated regular expression literal.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/spread-operator-attribute-and-regular-attribute.src.js.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/spread-operator-attributes.src.js.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/tag-names-with-dots.src.js.src 1`] = ` +Object { + "column": 6, + "index": 6, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/tag-names-with-multi-dots.src.js.src 1`] = ` +Object { + "column": 8, + "index": 8, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/test-content.src.js.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "Expression expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/trailing-spread-operator-attribute.src.js.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx/unknown-escape-pattern.src.js.src 1`] = ` +Object { + "column": 3, + "index": 3, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx-useJSXTextNode/self-closing-tag-inside-tag.src.js.src 1`] = ` +Object { + "column": 9, + "index": 15, + "lineNumber": 2, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/jsx-useJSXTextNode/test-content.src.js.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "Expression expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/semanticInfo/export-file.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/semanticInfo/import-file.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/semanticInfo/isolated-file.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/tsx/generic-jsx-element.src.tsx.src 1`] = ` +Object { + "column": 21, + "index": 21, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/tsx/react-typed-props.src.tsx.src 1`] = ` +Object { + "column": 12, + "index": 141, + "lineNumber": 9, + "message": "',' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/babylon-convergence/type-parameter-whitespace-loc.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/babylon-convergence/type-parameters.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-constructor.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-method.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-readonly-property.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-optional-method.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-interface.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/arrow-function-with-type-parameters.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/async-function-expression.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/async-function-with-var-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-accessibility-modifiers.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-definite-assignment.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-export-parameter-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-extends-and-implements.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-extends-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-extends-generic-multiple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-generic-method.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-generic-method-default.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements-and-extends.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements-generic-multiple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-mixin.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-mixin-reference.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-computed-property.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-methods.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-property-undefined.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-private-parameter-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-protected-parameter-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-public-parameter-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-readonly-parameter-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-readonly-property.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-static-parameter-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-type-parameter.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-type-parameter-default.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-type-parameter-underscore.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/const-enum.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/declare-class-with-optional-method.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/declare-function.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment-nested.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment-object.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment-property.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/directive-in-module.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/directive-in-namespace.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/export-assignment.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/export-default-class-with-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/export-default-class-with-multiple-generics.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-class-with-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-class-with-multiple-generics.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-enum.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/export-type-alias-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/export-type-class-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/export-type-function-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-await.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-object-type-with-optional-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-object-type-without-annotation.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-type-parameters.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-type-parameters-that-have-comments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-type-parameters-with-constraint.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-types.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-types-assignation.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/import-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/import-type-with-type-parameters-in-type-reference.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/interface-extends.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/interface-extends-multiple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/interface-type-parameters.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-all-property-types.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-extends-type-parameters.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-jsdoc.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-optional-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/interface-without-type-annotation.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/keyof-operator.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/nested-type-arguments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/never-type-param.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/non-null-assertion-operator.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/null-and-undefined-type-annotations.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/object-with-escaped-properties.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/symbol-type-param.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-declaration-with-constrained-type-parameter.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-object-without-annotation.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/type-parameters-comments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/type-reference-comments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-bigint.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-boolean.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-false.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-never.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-null.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-number.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-object.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-string.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-symbol.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-true.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-undefined.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-unknown.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-void.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/typed-this.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/unique-symbol.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/unknown-type-annotation.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/var-with-definite-assignment.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/var-with-dotted-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/var-with-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/variable-declaration-type-annotation-spacing.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/declare/abstract-class.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/declare/class.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/declare/enum.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/declare/function.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/declare/interface.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/declare/module.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/declare/namespace.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/declare/type-alias.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/declare/variable.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/class-decorators/class-decorator.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/class-decorators/class-decorator-factory.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/method-decorators/method-decorator-factory-static-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/method-decorators/method-decorator-instance-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/method-decorators/method-decorator-static-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-factory-static-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-instance-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-static-member.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-empty-extends.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-empty-extends-implements.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-extends-empty-implements.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-enum-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-interface-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-arguments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/enum-with-keywords.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-empty-extends.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-modifiers.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/solo-const.src.ts.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "Variable declaration list cannot be empty.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/expressions/call-expression-type-arguments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/expressions/new-expression-type-arguments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/expressions/tagged-template-expression-type-arguments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/global-module-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/module-with-default-exports.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/nested-internal-module.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/array-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/conditional.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/conditional-with-null.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/indexed.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/intersection-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/mapped.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/mapped-readonly.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/mapped-readonly-minus.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/mapped-readonly-plus.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/nested-types.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/parenthesized-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/reference.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/reference-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/reference-generic-nested.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/tuple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/tuple-empty.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/tuple-optional.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/tuple-rest.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/tuple-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/type-literal.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/type-operator.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/typeof.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/union-intersection.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/union-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/tests/lib/__snapshots__/typescript.ts.snap b/tests/lib/__snapshots__/typescript.ts.snap index 6197566..41a5132 100644 --- a/tests/lib/__snapshots__/typescript.ts.snap +++ b/tests/lib/__snapshots__/typescript.ts.snap @@ -72629,6 +72629,68 @@ Object { } `; +exports[`typescript fixtures/errorRecovery/solo-const.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [], + "kind": "const", + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "VariableDeclaration", + }, + ], + "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", +} +`; + exports[`typescript fixtures/expressions/call-expression-type-arguments.src 1`] = ` Object { "body": Array [ diff --git a/tests/lib/semantic-diagnostics-enabled.ts b/tests/lib/semantic-diagnostics-enabled.ts new file mode 100644 index 0000000..498acd0 --- /dev/null +++ b/tests/lib/semantic-diagnostics-enabled.ts @@ -0,0 +1,52 @@ +/** + * @fileoverview Tests for optional semantic diagnostics + * @author James Henry + * @copyright jQuery Foundation and other contributors, https://jquery.org/ + * MIT License + */ +import path from 'path'; +import shelljs from 'shelljs'; +import * as parser from '../../src/parser'; + +//------------------------------------------------------------------------------ +// Setup +//------------------------------------------------------------------------------ + +/** + * Process all fixtures, we will only snapshot the ones that have semantic errors + * which are ignored by default parsing logic. + */ +const FIXTURES_DIR = './tests/fixtures/'; + +const testFiles = shelljs + .find(FIXTURES_DIR) + .filter(filename => filename.includes('.src.')) + .map(filename => filename.substring(FIXTURES_DIR.length - 2)); + +//------------------------------------------------------------------------------ +// Tests +//------------------------------------------------------------------------------ + +describe('Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled', () => { + testFiles.forEach(filename => { + const code = shelljs.cat(`${path.resolve(FIXTURES_DIR, filename)}`); + const config = { + loc: true, + range: true, + tokens: true, + errorOnUnknownASTType: true, + errorOnTypeScriptSyntaticAndSemanticIssues: true + }; + it(`fixtures/${filename}.src`, () => { + expect.assertions(1); + try { + parser.parseAndGenerateServices(code, config); + expect( + 'TEST OUTPUT: No semantic or syntactic issues found' + ).toMatchSnapshot(); + } catch (err) { + expect(err).toMatchSnapshot(); + } + }); + }); +}); diff --git a/tests/lib/semanticInfo.ts b/tests/lib/semanticInfo.ts index 6abda98..96ae842 100644 --- a/tests/lib/semanticInfo.ts +++ b/tests/lib/semanticInfo.ts @@ -55,8 +55,6 @@ function createOptions(fileName: string): ParserOptions & { cwd?: string } { describe('semanticInfo', () => { // test all AST snapshots testFiles.forEach(filename => { - // Uncomment and fill in filename to focus on a single file - // var filename = "jsx/invalid-matching-placeholder-in-closing-tag"; const fullFileName = `${path.resolve(FIXTURES_DIR, filename)}.src.ts`; const code = shelljs.cat(fullFileName); test( From 5a1a5ca7b9223aefd153295625edc66eef8465cd Mon Sep 17 00:00:00 2001 From: Armano Date: Tue, 1 Jan 2019 20:10:57 +0100 Subject: [PATCH 13/30] fix: add missing TSInferType node (#68) --- src/ast-node-types.ts | 1 + src/convert.ts | 8 +- .../types/conditional-infer-nested.src.ts | 5 + .../types/conditional-infer-simple.src.ts | 1 + .../typescript/types/conditional-infer.src.ts | 1 + .../semantic-diagnostics-enabled.ts.snap | 6 + tests/lib/__snapshots__/typescript.ts.snap | 2692 +++++++++++++++++ 7 files changed, 2713 insertions(+), 1 deletion(-) create mode 100644 tests/fixtures/typescript/types/conditional-infer-nested.src.ts create mode 100644 tests/fixtures/typescript/types/conditional-infer-simple.src.ts create mode 100644 tests/fixtures/typescript/types/conditional-infer.src.ts diff --git a/src/ast-node-types.ts b/src/ast-node-types.ts index 59b684f..592dc43 100644 --- a/src/ast-node-types.ts +++ b/src/ast-node-types.ts @@ -115,6 +115,7 @@ export const AST_NODE_TYPES: { [key: string]: string } = { TSExportAssignment: 'TSExportAssignment', TSExportKeyword: 'TSExportKeyword', TSImportType: 'TSImportType', + TSInferType: 'TSInferType', TSLiteralType: 'TSLiteralType', TSIndexedAccessType: 'TSIndexedAccessType', TSIndexSignature: 'TSIndexSignature', diff --git a/src/convert.ts b/src/convert.ts index f03ae79..15f939a 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -2690,7 +2690,13 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { }); break; } - + case SyntaxKind.InferType: { + Object.assign(result, { + type: AST_NODE_TYPES.TSInferType, + typeParameter: convertChildType(node.typeParameter) + }); + break; + } default: deeplyCopy(); } diff --git a/tests/fixtures/typescript/types/conditional-infer-nested.src.ts b/tests/fixtures/typescript/types/conditional-infer-nested.src.ts new file mode 100644 index 0000000..be2b566 --- /dev/null +++ b/tests/fixtures/typescript/types/conditional-infer-nested.src.ts @@ -0,0 +1,5 @@ +type Unpacked = + T extends (infer U)[] ? U : + T extends infer U ? U : + T extends Promise ? U : + T; diff --git a/tests/fixtures/typescript/types/conditional-infer-simple.src.ts b/tests/fixtures/typescript/types/conditional-infer-simple.src.ts new file mode 100644 index 0000000..5da4248 --- /dev/null +++ b/tests/fixtures/typescript/types/conditional-infer-simple.src.ts @@ -0,0 +1 @@ +type Foo = T extends { a: infer U, b: infer U } ? U : never; diff --git a/tests/fixtures/typescript/types/conditional-infer.src.ts b/tests/fixtures/typescript/types/conditional-infer.src.ts new file mode 100644 index 0000000..fc9bc48 --- /dev/null +++ b/tests/fixtures/typescript/types/conditional-infer.src.ts @@ -0,0 +1 @@ +type Element = T extends (infer U)[] ? U : T; diff --git a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap index e4efa0a..367a390 100644 --- a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap +++ b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap @@ -1884,6 +1884,12 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" en exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/conditional.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/conditional-infer.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/conditional-infer-nested.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/conditional-infer-simple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/conditional-with-null.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/indexed.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/tests/lib/__snapshots__/typescript.ts.snap b/tests/lib/__snapshots__/typescript.ts.snap index 41a5132..a0ad01b 100644 --- a/tests/lib/__snapshots__/typescript.ts.snap +++ b/tests/lib/__snapshots__/typescript.ts.snap @@ -78188,6 +78188,2698 @@ Object { } `; +exports[`typescript fixtures/types/conditional-infer.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Element", + "range": Array [ + 5, + 12, + ], + "type": "Identifier", + }, + "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 { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + }, + "extendsType": Object { + "elementType": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 37, + ], + "type": "TSParenthesizedType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 36, + ], + "type": "TSInferType", + "typeParameter": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "U", + "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 { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 46, + 47, + ], + "type": "Identifier", + }, + }, + "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 { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 42, + 43, + ], + "type": "Identifier", + }, + }, + "type": "TSConditionalType", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 13, + 14, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 12, + 15, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "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", +} +`; + +exports[`typescript fixtures/types/conditional-infer-nested.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Unpacked", + "range": Array [ + 5, + 13, + ], + "type": "Identifier", + }, + "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 { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "T", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + }, + "extendsType": Object { + "elementType": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 31, + 40, + ], + "type": "TSParenthesizedType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 32, + 39, + ], + "type": "TSInferType", + "typeParameter": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "name": "U", + "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 { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "T", + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + }, + }, + "extendsType": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 63, + 70, + ], + "type": "TSInferType", + "typeParameter": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "name": "U", + "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 { + "loc": Object { + "end": Object { + "column": 7, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "name": "T", + "range": Array [ + 83, + 84, + ], + "type": "Identifier", + }, + }, + "extendsType": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "range": Array [ + 93, + 109, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "name": "Promise", + "range": Array [ + 93, + 100, + ], + "type": "Identifier", + }, + "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 { + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 30, + "line": 4, + }, + }, + "name": "U", + "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 { + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "name": "T", + "range": Array [ + 124, + 125, + ], + "type": "Identifier", + }, + }, + "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 { + "loc": Object { + "end": Object { + "column": 36, + "line": 4, + }, + "start": Object { + "column": 35, + "line": 4, + }, + }, + "name": "U", + "range": Array [ + 112, + 113, + ], + "type": "Identifier", + }, + }, + "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 { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "name": "U", + "range": Array [ + 73, + 74, + ], + "type": "Identifier", + }, + }, + "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 { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "name": "U", + "range": Array [ + 45, + 46, + ], + "type": "Identifier", + }, + }, + "type": "TSConditionalType", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 14, + 15, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 13, + 16, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "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", +} +`; + +exports[`typescript fixtures/types/conditional-infer-simple.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 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 { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + }, + "extendsType": Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 37, + ], + "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 { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 35, + 36, + ], + "type": "TSTypeParameter", + }, + }, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 38, + 39, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 48, + ], + "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 { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "name": "U", + "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 { + "loc": Object { + "end": Object { + "column": 54, + "line": 1, + }, + "start": Object { + "column": 53, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + }, + }, + "type": "TSConditionalType", + }, + "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, + }, + }, + "name": "T", + "range": Array [ + 9, + 10, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 8, + 11, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "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", +} +`; + exports[`typescript fixtures/types/conditional-with-null.src 1`] = ` Object { "body": Array [ From 4b889703015b3e718b5caf507fc5f388d1d2ee07 Mon Sep 17 00:00:00 2001 From: Armano Date: Tue, 1 Jan 2019 20:21:31 +0100 Subject: [PATCH 14/30] test: refactor omitDeep function to support name changes (#70) --- tests/ast-alignment/fixtures-to-test.ts | 12 - tests/ast-alignment/utils.ts | 187 ++++---- .../typescript/types/literal-number.src.ts | 1 + .../typescript/types/literal-string.src.ts | 1 + .../semantic-diagnostics-enabled.ts.snap | 4 + tests/lib/__snapshots__/typescript.ts.snap | 448 ++++++++++++++++++ yarn.lock | 38 +- 7 files changed, 559 insertions(+), 132 deletions(-) create mode 100644 tests/fixtures/typescript/types/literal-number.src.ts create mode 100644 tests/fixtures/typescript/types/literal-string.src.ts diff --git a/tests/ast-alignment/fixtures-to-test.ts b/tests/ast-alignment/fixtures-to-test.ts index b0cd1f8..01525c4 100644 --- a/tests/ast-alignment/fixtures-to-test.ts +++ b/tests/ast-alignment/fixtures-to-test.ts @@ -377,18 +377,6 @@ let fixturePatternConfigsToTest = [ * tsep: TSBigIntKeyword */ 'typed-keyword-bigint', - /** - * Awaiting feedback on Babel issue https://github.com/babel/babel/issues/9228 - * Babel: BooleanLiteral - * tsep: Literal - */ - 'typed-keyword-true', - /** - * Not yet supported in Babel https://github.com/babel/babel/issues/9228 - * Babel: BooleanLiteral - * tsep: Literal - */ - 'typed-keyword-false', /** * Not yet supported in Babel https://github.com/babel/babel/issues/9228 * Directive field is not added to module and namespace diff --git a/tests/ast-alignment/utils.ts b/tests/ast-alignment/utils.ts index 8dbf441..0345ab5 100644 --- a/tests/ast-alignment/utils.ts +++ b/tests/ast-alignment/utils.ts @@ -14,59 +14,56 @@ export function normalizeNodeTypes(ast: any): any { /** * Removes the given keys from the given AST object recursively - * @param {Object} obj A JavaScript object to remove keys from - * @param {Object[]} keysToOmit Names and predicate functions use to determine what keys to omit from the final object + * @param root A JavaScript object to remove keys from + * @param keysToOmit Names and predicate functions use to determine what keys to omit from the final object + * @param nodes advance ast modifications * @returns {Object} formatted object */ export function omitDeep( - obj: any, - keysToOmit: { key: string; predicate: Function }[] -): any { - keysToOmit = keysToOmit || []; - function shouldOmit(keyName: string, val: any) { - if (!keysToOmit || !keysToOmit.length) { - return false; - } - for (const keyConfig of keysToOmit) { - if (keyConfig.key !== keyName) { - continue; - } - return keyConfig.predicate(val); + root: any, + keysToOmit: { key: string; predicate: Function }[], + nodes: Record void> = {} +) { + function shouldOmit(keyName: string, val: any): boolean { + if (keysToOmit && keysToOmit.length) { + return keysToOmit.some( + keyConfig => keyConfig.key === keyName && keyConfig.predicate(val) + ); } return false; } - for (const key in obj) { - if (!obj.hasOwnProperty(key)) { - continue; + function visit(node: any, parent: any) { + if (!node) { + return; } - const val = (obj as any)[key]; - if (isPlainObject(val)) { - if (shouldOmit(key, val)) { - delete (obj as any)[key]; - // re-run with the same arguments - // in case the object has multiple keys to omit - return omitDeep(obj, keysToOmit); - } - omitDeep(val, keysToOmit); - } else if (Array.isArray(val)) { - if (shouldOmit(key, val)) { - delete (obj as any)[key]; - // re-run with the same arguments - // in case the object has multiple keys to omit - return omitDeep(obj, keysToOmit); - } - for (const i of val) { - omitDeep(i, keysToOmit); + + for (const prop in node) { + if (node.hasOwnProperty(prop)) { + if (shouldOmit(prop, node[prop])) { + delete node[prop]; + continue; + } + + const child = node[prop]; + + if (Array.isArray(child)) { + for (const el of child) { + visit(el, node); + } + } else if (isPlainObject(child)) { + visit(child, node); + } } - } else if (shouldOmit(key, val)) { - delete (obj as any)[key]; - // re-run with the same arguments - // in case the object has multiple keys to omit - return omitDeep(obj, keysToOmit); + } + + if (typeof node.type === 'string' && node.type in nodes) { + nodes[node.type](node, parent); } } - return obj; + + visit(root, null); + return root; } /** @@ -84,50 +81,70 @@ const ifNumber = (val: any) => typeof val === 'number'; * @returns {Object} processed babylon AST */ export function preprocessBabylonAST(ast: any): any { - return omitDeep(ast.program, [ - { - key: 'start', - // only remove the "start" number (not the "start" object within loc) - predicate: ifNumber - }, - { - key: 'end', - // only remove the "end" number (not the "end" object within loc) - predicate: ifNumber - }, - { - key: 'identifierName', - predicate: always - }, - { - key: 'extra', - predicate: always - }, - { - key: 'directives', - predicate: always - }, - { - key: 'innerComments', - predicate: always - }, - { - key: 'leadingComments', - predicate: always - }, - { - key: 'trailingComments', - predicate: always - }, - { - key: 'guardedHandlers', - predicate: always - }, + return omitDeep( + ast.program, + [ + { + key: 'start', + // only remove the "start" number (not the "start" object within loc) + predicate: ifNumber + }, + { + key: 'end', + // only remove the "end" number (not the "end" object within loc) + predicate: ifNumber + }, + { + key: 'identifierName', + predicate: always + }, + { + key: 'extra', + predicate: always + }, + { + key: 'innerComments', + predicate: always + }, + { + key: 'leadingComments', + predicate: always + }, + { + key: 'trailingComments', + predicate: always + }, + { + key: 'guardedHandlers', + predicate: always + }, + { + key: 'interpreter', + predicate: always + } + ], { - key: 'interpreter', - predicate: always + /** + * Not yet supported in Babel https://github.com/babel/babel/issues/9228 + */ + StringLiteral(node: any) { + node.type = 'Literal'; + }, + /** + * Not yet supported in Babel https://github.com/babel/babel/issues/9228 + */ + NumericLiteral(node: any) { + node.type = 'Literal'; + }, + /** + * Not yet supported in Babel https://github.com/babel/babel/issues/9228 + */ + BooleanLiteral(node: any) { + node.type = 'Literal'; + node.raw = String(node.value); + } } - ]); + ); } /** @@ -135,7 +152,7 @@ export function preprocessBabylonAST(ast: any): any { * between different parsers in the ecosystem. Hack around this by removing the data * before comparing the ASTs. * - * See: https://github.com/babel/babylon/issues/673 + * See: https://github.com/babel/babel/issues/6681 * * @param {Object} ast the raw AST with a Program node at its top level * @param {boolean} ignoreSourceType fix for issues with unambiguous type detection diff --git a/tests/fixtures/typescript/types/literal-number.src.ts b/tests/fixtures/typescript/types/literal-number.src.ts new file mode 100644 index 0000000..1e234e3 --- /dev/null +++ b/tests/fixtures/typescript/types/literal-number.src.ts @@ -0,0 +1 @@ +let x: 0; diff --git a/tests/fixtures/typescript/types/literal-string.src.ts b/tests/fixtures/typescript/types/literal-string.src.ts new file mode 100644 index 0000000..926a42a --- /dev/null +++ b/tests/fixtures/typescript/types/literal-string.src.ts @@ -0,0 +1 @@ +let x: "foo"; diff --git a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap index 367a390..c83f274 100644 --- a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap +++ b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap @@ -1896,6 +1896,10 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" en exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/intersection-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/literal-number.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/literal-string.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/mapped.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/mapped-readonly.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/tests/lib/__snapshots__/typescript.ts.snap b/tests/lib/__snapshots__/typescript.ts.snap index a0ad01b..6058064 100644 --- a/tests/lib/__snapshots__/typescript.ts.snap +++ b/tests/lib/__snapshots__/typescript.ts.snap @@ -82208,6 +82208,454 @@ Object { } `; +exports[`typescript fixtures/types/literal-number.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "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", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "VariableDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/types/literal-string.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "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", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "type": "VariableDeclaration", + }, + ], + "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", +} +`; + exports[`typescript fixtures/types/mapped.src 1`] = ` Object { "body": Array [ diff --git a/yarn.lock b/yarn.lock index 9333764..65a041d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2279,7 +2279,7 @@ debug@^4.0.0, debug@^4.1.0: dependencies: ms "^2.1.1" -debuglog@*, debuglog@^1.0.1: +debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= @@ -3470,7 +3470,7 @@ import-local@^1.0.0: pkg-dir "^2.0.0" resolve-cwd "^2.0.0" -imurmurhash@*, imurmurhash@^0.1.4: +imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= @@ -4677,11 +4677,6 @@ lockfile@^1.0.4: dependencies: signal-exit "^3.0.2" -lodash._baseindexof@*: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c" - integrity sha1-/lK1OhxnYeQmGNZU5KJXie1hgiw= - lodash._baseuniq@~4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz#0ebb44e456814af7905c6212fa2c9b2d51b841e8" @@ -4690,33 +4685,11 @@ lodash._baseuniq@~4.6.0: lodash._createset "~4.0.0" lodash._root "~3.0.0" -lodash._bindcallback@*: - version "3.0.1" - resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" - integrity sha1-5THCdkTPi1epnhftlbNcdIeJOS4= - -lodash._cacheindexof@*: - version "3.0.2" - resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92" - integrity sha1-PcaayCSY0u5ePOVgkbr9Ktx73pI= - -lodash._createcache@*: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093" - integrity sha1-VtagZAF2JeeevKa4AY4XRAvc8JM= - dependencies: - lodash._getnative "^3.0.0" - lodash._createset@~4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" integrity sha1-D0ZZ+7CddRlPqeK4imZE02PJ/iY= -lodash._getnative@*, lodash._getnative@^3.0.0: - version "3.9.1" - resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" - integrity sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U= - lodash._reinterpolate@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" @@ -4797,11 +4770,6 @@ lodash.pick@4.4.0, lodash.pick@^4.4.0: resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM= -lodash.restparam@*: - version "3.6.1" - resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" - integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU= - lodash.set@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" @@ -6523,7 +6491,7 @@ readable-stream@~1.1.10: isarray "0.0.1" string_decoder "~0.10.x" -readdir-scoped-modules@*, readdir-scoped-modules@^1.0.0: +readdir-scoped-modules@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747" integrity sha1-n6+jfShr5dksuuve4DDcm19AZ0c= From 492328d648241f8c60044f4e062074da5e517d58 Mon Sep 17 00:00:00 2001 From: Armano Date: Tue, 1 Jan 2019 20:34:38 +0100 Subject: [PATCH 15/30] fix: add missing TSThisType no known nodes (#73) --- src/ast-node-types.ts | 1 + src/convert.ts | 3 +- .../types/this-type-expanded.src.ts | 29 + .../typescript/types/this-type.src.ts | 5 + .../semantic-diagnostics-enabled.ts.snap | 4 + tests/lib/__snapshots__/typescript.ts.snap | 4565 +++++++++++++++++ 6 files changed, 4606 insertions(+), 1 deletion(-) create mode 100644 tests/fixtures/typescript/types/this-type-expanded.src.ts create mode 100644 tests/fixtures/typescript/types/this-type.src.ts diff --git a/src/ast-node-types.ts b/src/ast-node-types.ts index 592dc43..bb01437 100644 --- a/src/ast-node-types.ts +++ b/src/ast-node-types.ts @@ -145,6 +145,7 @@ export const AST_NODE_TYPES: { [key: string]: string } = { TSStaticKeyword: 'TSStaticKeyword', TSStringKeyword: 'TSStringKeyword', TSSymbolKeyword: 'TSSymbolKeyword', + TSThisType: 'TSThisType', TSTypeAnnotation: 'TSTypeAnnotation', TSTypeAliasDeclaration: 'TSTypeAliasDeclaration', TSTypeLiteral: 'TSTypeLiteral', diff --git a/src/convert.ts b/src/convert.ts index 15f939a..d72b5c8 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -2268,6 +2268,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { break; } + case SyntaxKind.ThisType: case SyntaxKind.AnyKeyword: case SyntaxKind.BigIntKeyword: case SyntaxKind.BooleanKeyword: @@ -2280,7 +2281,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.VoidKeyword: case SyntaxKind.UndefinedKeyword: { Object.assign(result, { - type: `TS${SyntaxKind[node.kind]}` + type: AST_NODE_TYPES[`TS${SyntaxKind[node.kind]}`] }); break; } diff --git a/tests/fixtures/typescript/types/this-type-expanded.src.ts b/tests/fixtures/typescript/types/this-type-expanded.src.ts new file mode 100644 index 0000000..0c44217 --- /dev/null +++ b/tests/fixtures/typescript/types/this-type-expanded.src.ts @@ -0,0 +1,29 @@ +class A { + public a: number; + + public method(this: this): number { + return this.a; + } + + public method2(this: A): this { + return this.a; + } + + public method3(this: this): number { + var fn = () => this.a; + return fn(); + } + + public method4(this: A): number { + var fn = () => this.a; + return fn(); + } + + static staticMethod(this: A): number { + return this.a; + } + + static typeof(this: A): this { + return typeof this; + } +} diff --git a/tests/fixtures/typescript/types/this-type.src.ts b/tests/fixtures/typescript/types/this-type.src.ts new file mode 100644 index 0000000..d5f87a9 --- /dev/null +++ b/tests/fixtures/typescript/types/this-type.src.ts @@ -0,0 +1,5 @@ +class Message { + clone(): this { + return this; + } +} diff --git a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap index c83f274..13dd7f9 100644 --- a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap +++ b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap @@ -1918,6 +1918,10 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" en exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/reference-generic-nested.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/this-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/this-type-expanded.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/tuple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/types/tuple-empty.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/tests/lib/__snapshots__/typescript.ts.snap b/tests/lib/__snapshots__/typescript.ts.snap index 6058064..43338f2 100644 --- a/tests/lib/__snapshots__/typescript.ts.snap +++ b/tests/lib/__snapshots__/typescript.ts.snap @@ -86688,6 +86688,4571 @@ Object { } `; +exports[`typescript fixtures/types/this-type.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "clone", + "range": Array [ + 18, + 23, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 54, + ], + "static": false, + "type": "MethodDefinition", + "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", + }, + "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", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 56, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Message", + "range": Array [ + 6, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 56, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/types/this-type-expanded.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "public", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 12, + 29, + ], + "static": false, + "type": "ClassProperty", + "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, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "name": "method", + "range": Array [ + 40, + 46, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 33, + 91, + ], + "static": false, + "type": "MethodDefinition", + "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", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 5, + }, + "start": Object { + "column": 16, + "line": 5, + }, + }, + "name": "a", + "range": Array [ + 85, + 86, + ], + "type": "Identifier", + }, + "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", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 15, + "line": 4, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "name": "this", + "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", + }, + }, + Object { + "accessibility": "public", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 8, + }, + "start": Object { + "column": 9, + "line": 8, + }, + }, + "name": "method2", + "range": Array [ + 102, + 109, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 10, + }, + "start": Object { + "column": 2, + "line": 8, + }, + }, + "range": Array [ + 95, + 149, + ], + "static": false, + "type": "MethodDefinition", + "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", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 9, + }, + "start": Object { + "column": 16, + "line": 9, + }, + }, + "name": "a", + "range": Array [ + 143, + 144, + ], + "type": "Identifier", + }, + "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", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 10, + }, + "start": Object { + "column": 16, + "line": 8, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 8, + }, + "start": Object { + "column": 17, + "line": 8, + }, + }, + "name": "this", + "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 { + "loc": Object { + "end": Object { + "column": 24, + "line": 8, + }, + "start": Object { + "column": 23, + "line": 8, + }, + }, + "name": "A", + "range": Array [ + 116, + 117, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "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", + }, + }, + Object { + "accessibility": "public", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 12, + }, + "start": Object { + "column": 9, + "line": 12, + }, + }, + "name": "method3", + "range": Array [ + 160, + 167, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 15, + }, + "start": Object { + "column": 2, + "line": 12, + }, + }, + "range": Array [ + 153, + 237, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 13, + }, + "start": Object { + "column": 8, + "line": 13, + }, + }, + "name": "fn", + "range": Array [ + 198, + 200, + ], + "type": "Identifier", + }, + "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", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 13, + }, + "start": Object { + "column": 24, + "line": 13, + }, + }, + "name": "a", + "range": Array [ + 214, + 215, + ], + "type": "Identifier", + }, + "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, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 13, + }, + "start": Object { + "column": 8, + "line": 13, + }, + }, + "range": Array [ + 198, + 215, + ], + "type": "VariableDeclarator", + }, + ], + "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 { + "loc": Object { + "end": Object { + "column": 13, + "line": 14, + }, + "start": Object { + "column": 11, + "line": 14, + }, + }, + "name": "fn", + "range": Array [ + 228, + 230, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 14, + }, + "start": Object { + "column": 11, + "line": 14, + }, + }, + "range": Array [ + 228, + 232, + ], + "type": "CallExpression", + }, + "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", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 15, + }, + "start": Object { + "column": 16, + "line": 12, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 12, + }, + "start": Object { + "column": 17, + "line": 12, + }, + }, + "name": "this", + "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", + }, + }, + Object { + "accessibility": "public", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 17, + }, + "start": Object { + "column": 9, + "line": 17, + }, + }, + "name": "method4", + "range": Array [ + 248, + 255, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 20, + }, + "start": Object { + "column": 2, + "line": 17, + }, + }, + "range": Array [ + 241, + 322, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 18, + }, + "start": Object { + "column": 8, + "line": 18, + }, + }, + "name": "fn", + "range": Array [ + 283, + 285, + ], + "type": "Identifier", + }, + "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", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 18, + }, + "start": Object { + "column": 24, + "line": 18, + }, + }, + "name": "a", + "range": Array [ + 299, + 300, + ], + "type": "Identifier", + }, + "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, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 18, + }, + "start": Object { + "column": 8, + "line": 18, + }, + }, + "range": Array [ + 283, + 300, + ], + "type": "VariableDeclarator", + }, + ], + "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 { + "loc": Object { + "end": Object { + "column": 13, + "line": 19, + }, + "start": Object { + "column": 11, + "line": 19, + }, + }, + "name": "fn", + "range": Array [ + 313, + 315, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 19, + }, + "start": Object { + "column": 11, + "line": 19, + }, + }, + "range": Array [ + 313, + 317, + ], + "type": "CallExpression", + }, + "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", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 20, + }, + "start": Object { + "column": 16, + "line": 17, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 17, + }, + "start": Object { + "column": 17, + "line": 17, + }, + }, + "name": "this", + "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 { + "loc": Object { + "end": Object { + "column": 24, + "line": 17, + }, + "start": Object { + "column": 23, + "line": 17, + }, + }, + "name": "A", + "range": Array [ + 262, + 263, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "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", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 22, + }, + "start": Object { + "column": 9, + "line": 22, + }, + }, + "name": "staticMethod", + "range": Array [ + 333, + 345, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 24, + }, + "start": Object { + "column": 2, + "line": 22, + }, + }, + "range": Array [ + 326, + 387, + ], + "static": true, + "type": "MethodDefinition", + "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", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 23, + }, + "start": Object { + "column": 16, + "line": 23, + }, + }, + "name": "a", + "range": Array [ + 381, + 382, + ], + "type": "Identifier", + }, + "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", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 24, + }, + "start": Object { + "column": 21, + "line": 22, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 22, + }, + "start": Object { + "column": 22, + "line": 22, + }, + }, + "name": "this", + "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 { + "loc": Object { + "end": Object { + "column": 29, + "line": 22, + }, + "start": Object { + "column": 28, + "line": 22, + }, + }, + "name": "A", + "range": Array [ + 352, + 353, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "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", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 26, + }, + "start": Object { + "column": 9, + "line": 26, + }, + }, + "name": "typeof", + "range": Array [ + 398, + 404, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 28, + }, + "start": Object { + "column": 2, + "line": 26, + }, + }, + "range": Array [ + 391, + 449, + ], + "static": true, + "type": "MethodDefinition", + "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", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 28, + }, + "start": Object { + "column": 15, + "line": 26, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 26, + }, + "start": Object { + "column": 16, + "line": 26, + }, + }, + "name": "this", + "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 { + "loc": Object { + "end": Object { + "column": 23, + "line": 26, + }, + "start": Object { + "column": 22, + "line": 26, + }, + }, + "name": "A", + "range": Array [ + 411, + 412, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "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", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 29, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 451, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 29, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 451, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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", +} +`; + exports[`typescript fixtures/types/tuple.src 1`] = ` Object { "body": Array [ From 6690f0bc5c0f1c50c7aed37249bbeed29cec3137 Mon Sep 17 00:00:00 2001 From: Armano Date: Tue, 1 Jan 2019 20:42:40 +0100 Subject: [PATCH 16/30] fix: change incorrect FirstNode to QualifiedName (#76) --- src/convert.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/convert.ts b/src/convert.ts index d72b5c8..36cb26e 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -2230,16 +2230,14 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { type: AST_NODE_TYPES.JSXSpreadAttribute, argument: convertChild(node.expression) }); - break; - case SyntaxKind.FirstNode: { + case SyntaxKind.QualifiedName: { Object.assign(result, { type: AST_NODE_TYPES.TSQualifiedName, left: convertChild(node.left), right: convertChild(node.right) }); - break; } From edf2727369b5b7a82e7eb087266a9bf5d856adc0 Mon Sep 17 00:00:00 2001 From: Armano Date: Tue, 1 Jan 2019 20:53:28 +0100 Subject: [PATCH 17/30] refactor: remove convertDecorators helper (#75) --- src/convert.ts | 47 ++++++++++++++++------------------------------- 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/src/convert.ts b/src/convert.ts index 36cb26e..e144010 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -282,28 +282,6 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { return classImplementsNode; } - /** - * Converts a ts.NodeArray of ts.Decorators into an array of ESTreeNode decorators - * @param {ts.NodeArray} decorators A ts.NodeArray of ts.Decorators to be converted - * @returns {ESTreeNode[]} an array of converted ESTreeNode decorators - */ - function convertDecorators( - decorators: ts.NodeArray - ): ESTreeNode[] { - if (!decorators || !decorators.length) { - return []; - } - return decorators.map(decorator => { - const expression = convertChild(decorator.expression); - return { - type: AST_NODE_TYPES.Decorator, - range: [decorator.getStart(ast), decorator.end], - loc: nodeUtils.getLoc(decorator, ast), - expression - }; - }); - } - /** * Converts an array of ts.Node parameters into an array of ESTreeNode params * @param {ts.Node[]} parameters An array of ts.Node params to be converted @@ -319,7 +297,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { return convertedParam; } return Object.assign(convertedParam, { - decorators: convertDecorators(param.decorators) + decorators: param.decorators.map(convertChild) }); }); } @@ -366,9 +344,8 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { ) : null; } else if (key === 'decorators') { - const decorators = convertDecorators((node as any).decorators); - if (decorators && decorators.length) { - result.decorators = decorators; + if (node.decorators && node.decorators.length) { + result.decorators = node.decorators.map(convertChild); } } else { if (Array.isArray((node as any)[key])) { @@ -966,7 +943,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { } if (node.decorators) { - result.decorators = convertDecorators(node.decorators); + result.decorators = node.decorators.map(convertChild); } const accessibility = nodeUtils.getTSNodeAccessibility(node); @@ -1071,7 +1048,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { }); if (node.decorators) { - result.decorators = convertDecorators(node.decorators); + result.decorators = node.decorators.map(convertChild); } const accessibility = nodeUtils.getTSNodeAccessibility(node); @@ -1631,7 +1608,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { } if (node.decorators) { - result.decorators = convertDecorators(node.decorators); + result.decorators = node.decorators.map(convertChild); } const filteredMembers = node.members.filter( @@ -1979,6 +1956,14 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { break; } + case SyntaxKind.Decorator: { + Object.assign(result, { + type: AST_NODE_TYPES.Decorator, + expression: convertChild(node.expression) + }); + break; + } + // Literals case SyntaxKind.StringLiteral: @@ -2550,7 +2535,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { * so we handle them here too. */ if (node.decorators) { - result.decorators = convertDecorators(node.decorators); + result.decorators = node.decorators.map(convertChild); } if (nodeUtils.hasModifier(SyntaxKind.AbstractKeyword, node)) { result.abstract = true; @@ -2605,7 +2590,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { * so we handle them here too. */ if (node.decorators) { - result.decorators = convertDecorators(node.decorators); + result.decorators = node.decorators.map(convertChild); } break; } From 99470365e96ed91d87d77a53e89ebcab27d60a31 Mon Sep 17 00:00:00 2001 From: Armano Date: Tue, 1 Jan 2019 21:15:57 +0100 Subject: [PATCH 18/30] feat: add support and tests for TSAsExpression (#69) --- src/ast-node-types.ts | 1 + src/convert.ts | 8 + .../basics/cast-as-expression.src.ts | 1 + .../basics/cast-as-multi-assign.src.ts | 1 + .../typescript/basics/cast-as-multi.src.ts | 1 + .../typescript/basics/cast-as-operator.src.ts | 1 + .../typescript/basics/cast-as-simple.src.ts | 1 + .../semantic-diagnostics-enabled.ts.snap | 10 + tests/lib/__snapshots__/typescript.ts.snap | 1334 +++++++++++++++++ 9 files changed, 1358 insertions(+) create mode 100644 tests/fixtures/typescript/basics/cast-as-expression.src.ts create mode 100644 tests/fixtures/typescript/basics/cast-as-multi-assign.src.ts create mode 100644 tests/fixtures/typescript/basics/cast-as-multi.src.ts create mode 100644 tests/fixtures/typescript/basics/cast-as-operator.src.ts create mode 100644 tests/fixtures/typescript/basics/cast-as-simple.src.ts diff --git a/src/ast-node-types.ts b/src/ast-node-types.ts index bb01437..d4b9455 100644 --- a/src/ast-node-types.ts +++ b/src/ast-node-types.ts @@ -102,6 +102,7 @@ export const AST_NODE_TYPES: { [key: string]: string } = { TSAbstractMethodDefinition: 'TSAbstractMethodDefinition', TSAnyKeyword: 'TSAnyKeyword', TSArrayType: 'TSArrayType', + TSAsExpression: 'TSAsExpression', TSAsyncKeyword: 'TSAsyncKeyword', TSBooleanKeyword: 'TSBooleanKeyword', TSBigIntKeyword: 'TSBigIntKeyword', diff --git a/src/convert.ts b/src/convert.ts index e144010..438331b 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -2674,6 +2674,14 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { }); break; } + case SyntaxKind.AsExpression: { + Object.assign(result, { + type: AST_NODE_TYPES.TSAsExpression, + expression: convertChild(node.expression), + typeAnnotation: convertChildType(node.type) + }); + break; + } case SyntaxKind.InferType: { Object.assign(result, { type: AST_NODE_TYPES.TSInferType, diff --git a/tests/fixtures/typescript/basics/cast-as-expression.src.ts b/tests/fixtures/typescript/basics/cast-as-expression.src.ts new file mode 100644 index 0000000..20f5214 --- /dev/null +++ b/tests/fixtures/typescript/basics/cast-as-expression.src.ts @@ -0,0 +1 @@ +x < y as boolean; diff --git a/tests/fixtures/typescript/basics/cast-as-multi-assign.src.ts b/tests/fixtures/typescript/basics/cast-as-multi-assign.src.ts new file mode 100644 index 0000000..952b959 --- /dev/null +++ b/tests/fixtures/typescript/basics/cast-as-multi-assign.src.ts @@ -0,0 +1 @@ +(a as number as any) = 42; diff --git a/tests/fixtures/typescript/basics/cast-as-multi.src.ts b/tests/fixtures/typescript/basics/cast-as-multi.src.ts new file mode 100644 index 0000000..38764dd --- /dev/null +++ b/tests/fixtures/typescript/basics/cast-as-multi.src.ts @@ -0,0 +1 @@ +x as any as T; diff --git a/tests/fixtures/typescript/basics/cast-as-operator.src.ts b/tests/fixtures/typescript/basics/cast-as-operator.src.ts new file mode 100644 index 0000000..cc057ed --- /dev/null +++ b/tests/fixtures/typescript/basics/cast-as-operator.src.ts @@ -0,0 +1 @@ +x === 1 as number; diff --git a/tests/fixtures/typescript/basics/cast-as-simple.src.ts b/tests/fixtures/typescript/basics/cast-as-simple.src.ts new file mode 100644 index 0000000..64a82f8 --- /dev/null +++ b/tests/fixtures/typescript/basics/cast-as-simple.src.ts @@ -0,0 +1 @@ +const foo = x as any; diff --git a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap index 13dd7f9..450f0df 100644 --- a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap +++ b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap @@ -1583,6 +1583,16 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" en exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/async-function-with-var-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-expression.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-multi.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-multi-assign.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-operator.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-simple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-accessibility-modifiers.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-definite-assignment.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/tests/lib/__snapshots__/typescript.ts.snap b/tests/lib/__snapshots__/typescript.ts.snap index 43338f2..5884298 100644 --- a/tests/lib/__snapshots__/typescript.ts.snap +++ b/tests/lib/__snapshots__/typescript.ts.snap @@ -4668,6 +4668,1340 @@ Object { } `; +exports[`typescript fixtures/basics/cast-as-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "<", + "range": Array [ + 0, + 5, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/basics/cast-as-multi.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "expression": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, + "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 { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 14, + ], + "type": "ExpressionStatement", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/basics/cast-as-multi-assign.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "expression": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 1, + 2, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/basics/cast-as-operator.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/basics/cast-as-simple.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "init": Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "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", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "type": "VariableDeclaration", + }, + ], + "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", +} +`; + exports[`typescript fixtures/basics/class-with-accessibility-modifiers.src 1`] = ` Object { "body": Array [ From 782766661071c5e026d057f57b67bb15500aeb2d Mon Sep 17 00:00:00 2001 From: Armano Date: Tue, 1 Jan 2019 21:36:52 +0100 Subject: [PATCH 19/30] feat: add support for export equal declaration (#71) BREAKING CHANGE: This changes the AST --- src/ast-node-types.ts | 2 + src/convert.ts | 17 + tests/ast-alignment/fixtures-to-test.ts | 4 +- .../basics/import-equal-declaration.src.ts | 1 + .../import-export-equal-declaration.src.ts | 1 + .../semantic-diagnostics-enabled.ts.snap | 4 + tests/lib/__snapshots__/typescript.ts.snap | 500 ++++++++++++++++++ 7 files changed, 528 insertions(+), 1 deletion(-) create mode 100644 tests/fixtures/typescript/basics/import-equal-declaration.src.ts create mode 100644 tests/fixtures/typescript/basics/import-export-equal-declaration.src.ts diff --git a/src/ast-node-types.ts b/src/ast-node-types.ts index d4b9455..fbe848e 100644 --- a/src/ast-node-types.ts +++ b/src/ast-node-types.ts @@ -115,6 +115,7 @@ export const AST_NODE_TYPES: { [key: string]: string } = { TSEnumMember: 'TSEnumMember', TSExportAssignment: 'TSExportAssignment', TSExportKeyword: 'TSExportKeyword', + TSExternalModuleReference: 'TSExternalModuleReference', TSImportType: 'TSImportType', TSInferType: 'TSInferType', TSLiteralType: 'TSLiteralType', @@ -123,6 +124,7 @@ export const AST_NODE_TYPES: { [key: string]: string } = { TSInterfaceBody: 'TSInterfaceBody', TSInterfaceDeclaration: 'TSInterfaceDeclaration', TSInterfaceHeritage: 'TSInterfaceHeritage', + TSImportEqualsDeclaration: 'TSImportEqualsDeclaration', TSFunctionType: 'TSFunctionType', TSMethodSignature: 'TSMethodSignature', TSModuleBlock: 'TSModuleBlock', diff --git a/src/convert.ts b/src/convert.ts index 438331b..0857be5 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -2689,6 +2689,23 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { }); break; } + case SyntaxKind.ImportEqualsDeclaration: { + Object.assign(result, { + type: AST_NODE_TYPES.TSImportEqualsDeclaration, + id: convertChild(node.name), + moduleReference: convertChild(node.moduleReference), + isExport: nodeUtils.hasModifier(SyntaxKind.ExportKeyword, node) + }); + break; + } + case SyntaxKind.ExternalModuleReference: { + Object.assign(result, { + type: AST_NODE_TYPES.TSExternalModuleReference, + expression: convertChild(node.expression) + }); + break; + } + default: deeplyCopy(); } diff --git a/tests/ast-alignment/fixtures-to-test.ts b/tests/ast-alignment/fixtures-to-test.ts index 01525c4..7ab5572 100644 --- a/tests/ast-alignment/fixtures-to-test.ts +++ b/tests/ast-alignment/fixtures-to-test.ts @@ -390,7 +390,9 @@ let fixturePatternConfigsToTest = [ ], ignoreSourceType: [ // https://github.com/babel/babel/issues/9213 - 'export-assignment' + 'export-assignment', + 'import-equal-declaration', + 'import-export-equal-declaration' ] }), diff --git a/tests/fixtures/typescript/basics/import-equal-declaration.src.ts b/tests/fixtures/typescript/basics/import-equal-declaration.src.ts new file mode 100644 index 0000000..8cb5940 --- /dev/null +++ b/tests/fixtures/typescript/basics/import-equal-declaration.src.ts @@ -0,0 +1 @@ +import foo = require('bar'); diff --git a/tests/fixtures/typescript/basics/import-export-equal-declaration.src.ts b/tests/fixtures/typescript/basics/import-export-equal-declaration.src.ts new file mode 100644 index 0000000..0b50a96 --- /dev/null +++ b/tests/fixtures/typescript/basics/import-export-equal-declaration.src.ts @@ -0,0 +1 @@ +export import foo = require('bar'); diff --git a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap index 450f0df..5fd15a3 100644 --- a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap +++ b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap @@ -1699,6 +1699,10 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" en exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-types-assignation.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/import-equal-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/import-export-equal-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/import-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/import-type-with-type-parameters-in-type-reference.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/tests/lib/__snapshots__/typescript.ts.snap b/tests/lib/__snapshots__/typescript.ts.snap index 5884298..a41f38c 100644 --- a/tests/lib/__snapshots__/typescript.ts.snap +++ b/tests/lib/__snapshots__/typescript.ts.snap @@ -34609,6 +34609,506 @@ Object { } `; +exports[`typescript fixtures/basics/import-equal-declaration.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 7, + 10, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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", +} +`; + +exports[`typescript fixtures/basics/import-export-equal-declaration.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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", +} +`; + exports[`typescript fixtures/basics/import-type.src 1`] = ` Object { "body": Array [ From 315a97999c98cc7b27d470ddf801cfbbb935b8bf Mon Sep 17 00:00:00 2001 From: Armano Date: Fri, 4 Jan 2019 16:48:12 +0100 Subject: [PATCH 20/30] refactor: improve typing (#83) --- src/convert.ts | 93 +++++++++++++--------------- src/node-utils.ts | 33 +++++----- src/temp-types-based-on-js-source.ts | 4 +- 3 files changed, 59 insertions(+), 71 deletions(-) diff --git a/src/convert.ts b/src/convert.ts index 0857be5..96b7715 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -494,10 +494,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { convertBodyExpressionsToDirectives(); - (result as any).range[1] = node.endOfFileToken.end; + result.range[1] = node.endOfFileToken.end; result.loc = nodeUtils.getLocFor( node.getStart(ast), - (result as any).range[1], + result.range[1], ast ); break; @@ -702,7 +702,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { } // check for exports - result = nodeUtils.fixExports(node, result as any, ast); + result = nodeUtils.fixExports(node, result, ast); break; } @@ -737,7 +737,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { } // check for exports - result = nodeUtils.fixExports(node, result as any, ast); + result = nodeUtils.fixExports(node, result, ast); break; // mostly for for-of, for-in @@ -948,7 +948,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { const accessibility = nodeUtils.getTSNodeAccessibility(node); if (accessibility) { - (result as any).accessibility = accessibility; + result.accessibility = accessibility; } if (node.name.kind === SyntaxKind.Identifier && node.questionToken) { @@ -994,13 +994,13 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { expression: false, async: nodeUtils.hasModifier(SyntaxKind.AsyncKeyword, node), body: convertChild(node.body), - range: [node.parameters.pos - 1, (result as any).range[1]], + range: [node.parameters.pos - 1, result.range[1]], loc: { start: { line: methodLoc.line + 1, column: methodLoc.character }, - end: (result as any).loc.end + end: result.loc.end } }; @@ -1053,7 +1053,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { const accessibility = nodeUtils.getTSNodeAccessibility(node); if (accessibility) { - (result as any).accessibility = accessibility; + result.accessibility = accessibility; } } @@ -1110,13 +1110,13 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { expression: false, async: false, body: convertChild(node.body), - range: [node.parameters.pos - 1, (result as any).range[1]], + range: [node.parameters.pos - 1, result.range[1]], loc: { start: { line: constructorLoc.line + 1, column: constructorLoc.character }, - end: (result as any).loc.end + end: result.loc.end } }; @@ -1188,7 +1188,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { const accessibility = nodeUtils.getTSNodeAccessibility(node); if (accessibility) { - (result as any).accessibility = accessibility; + result.accessibility = accessibility; } break; @@ -1588,7 +1588,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { body: [], // TODO: Fix location info - range: [openBrace.getStart(ast), (result as any).range[1]], + range: [openBrace.getStart(ast), result.range[1]], loc: nodeUtils.getLocFor(openBrace.getStart(ast), node.end, ast) }, superClass: @@ -1620,7 +1620,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { } // check for exports - result = nodeUtils.fixExports(node, result as any, ast); + result = nodeUtils.fixExports(node, result, ast); break; } @@ -1644,18 +1644,18 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { if (node.importClause) { if (node.importClause.name) { - (result as any).specifiers.push(convertChild(node.importClause)); + result.specifiers!.push(convertChild(node.importClause)); } if (node.importClause.namedBindings) { if ( node.importClause.namedBindings.kind === SyntaxKind.NamespaceImport ) { - (result as any).specifiers.push( + result.specifiers!.push( convertChild(node.importClause.namedBindings) ); } else { - result.specifiers = (result as any).specifiers.concat( + result.specifiers = result.specifiers!.concat( node.importClause.namedBindings.elements.map(convertChild) ); } @@ -1686,12 +1686,8 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { }); // have to adjust location information due to tree differences - (result as any).range[1] = node.name!.end; - result.loc = nodeUtils.getLocFor( - (result as any).range[0], - (result as any).range[1], - ast - ); + result.range[1] = node.name!.end; + result.loc = nodeUtils.getLocFor(result.range[0], result.range[1], ast); break; case SyntaxKind.NamedImports: @@ -1804,10 +1800,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { expressions: [] }); - const left = convertChild(node.left), - right = convertChild(node.right); + const left = convertChild(node.left)!, + right = convertChild(node.right)!; - if ((left as any).type === AST_NODE_TYPES.SequenceExpression) { + if (left.type === AST_NODE_TYPES.SequenceExpression) { (result as any).expressions = (result as any).expressions.concat( (left as any).expressions ); @@ -1815,7 +1811,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { (result as any).expressions.push(left); } - if ((right as any).type === AST_NODE_TYPES.SequenceExpression) { + if (right.type === AST_NODE_TYPES.SequenceExpression) { (result as any).expressions = (result as any).expressions.concat( (right as any).expressions ); @@ -1969,7 +1965,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.StringLiteral: Object.assign(result, { type: AST_NODE_TYPES.Literal, - raw: ast.text.slice((result as any).range[0], (result as any).range[1]) + raw: ast.text.slice(result.range[0], result.range[1]) }); if ((parent as any).name && (parent as any).name === node) { (result as any).value = node.text; @@ -1982,15 +1978,12 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { Object.assign(result, { type: AST_NODE_TYPES.Literal, value: Number(node.text), - raw: ast.text.slice((result as any).range[0], (result as any).range[1]) + raw: ast.text.slice(result.range[0], result.range[1]) }); break; case SyntaxKind.BigIntLiteral: { - const raw = ast.text.slice( - (result as any).range[0], - (result as any).range[1] - ); + const raw = ast.text.slice(result.range[0], result.range[1]); const value = raw.slice(0, -1); // remove suffix `n` Object.assign(result, { type: AST_NODE_TYPES.BigIntLiteral, @@ -2139,9 +2132,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { break; case SyntaxKind.JsxExpression: { - const eloc = ast.getLineAndCharacterOfPosition( - (result as any).range[0] + 1 - ); + const eloc = ast.getLineAndCharacterOfPosition(result.range[0] + 1); const expression = node.expression ? convertChild(node.expression) : { @@ -2152,11 +2143,11 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { column: eloc.character }, end: { - line: (result as any).loc.end.line, - column: (result as any).loc.end.column - 1 + line: result.loc.end.line, + column: result.loc.end.column - 1 } }, - range: [(result as any).range[0] + 1, (result as any).range[1] - 1] + range: [result.range[0] + 1, result.range[1] - 1] }; Object.assign(result, { @@ -2374,13 +2365,13 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { // Process typeParameters if (node.typeParameters && node.typeParameters.length) { - (result as any).typeParameters = convertTSTypeParametersToTypeParametersDeclaration( + result.typeParameters = convertTSTypeParametersToTypeParametersDeclaration( node.typeParameters ); } // check for exports - result = nodeUtils.fixExports(node, result as any, ast); + result = nodeUtils.fixExports(node, result, ast); break; } @@ -2401,11 +2392,11 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { const accessibility = nodeUtils.getTSNodeAccessibility(node); if (accessibility) { - (result as any).accessibility = accessibility; + result.accessibility = accessibility; } if (node.typeParameters) { - (result as any).typeParameters = convertTSTypeParametersToTypeParametersDeclaration( + result.typeParameters = convertTSTypeParametersToTypeParametersDeclaration( node.typeParameters ); } @@ -2433,7 +2424,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { const accessibility = nodeUtils.getTSNodeAccessibility(node); if (accessibility) { - (result as any).accessibility = accessibility; + result.accessibility = accessibility; } break; @@ -2453,7 +2444,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { const accessibility = nodeUtils.getTSNodeAccessibility(node); if (accessibility) { - (result as any).accessibility = accessibility; + result.accessibility = accessibility; } break; @@ -2511,7 +2502,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { const interfaceBody = { type: AST_NODE_TYPES.TSInterfaceBody, body: node.members.map((member: any) => convertChild(member)), - range: [interfaceOpenBrace.getStart(ast), (result as any).range[1]], + range: [interfaceOpenBrace.getStart(ast), result.range[1]], loc: nodeUtils.getLocFor( interfaceOpenBrace.getStart(ast), node.end, @@ -2544,7 +2535,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { result.declare = true; } // check for exports - result = nodeUtils.fixExports(node, result as any, ast); + result = nodeUtils.fixExports(node, result, ast); break; } @@ -2558,8 +2549,8 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { /** * Specific fix for type-guard location data */ - (result as any).typeAnnotation.loc = (result as any).typeAnnotation.typeAnnotation.loc; - (result as any).typeAnnotation.range = (result as any).typeAnnotation.typeAnnotation.range; + result.typeAnnotation!.loc = result.typeAnnotation!.typeAnnotation!.loc; + result.typeAnnotation!.range = result.typeAnnotation!.typeAnnotation!.range; break; case SyntaxKind.ImportType: @@ -2583,7 +2574,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { // apply modifiers first... applyModifiersToResult(node.modifiers); // ...then check for exports - result = nodeUtils.fixExports(node, result as any, ast); + result = nodeUtils.fixExports(node, result, ast); /** * Semantically, decorators are not allowed on enum declarations, * but the TypeScript compiler will parse them and produce a valid AST, @@ -2627,7 +2618,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { result.global = true; } // ...then check for exports - result = nodeUtils.fixExports(node, result as any, ast); + result = nodeUtils.fixExports(node, result, ast); break; } @@ -2715,5 +2706,5 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { esTreeNodeToTSNodeMap.set(result, node); } - return result as any; + return result; } diff --git a/src/node-utils.ts b/src/node-utils.ts index 4b016cd..81564e9 100644 --- a/src/node-utils.ts +++ b/src/node-utils.ts @@ -357,22 +357,19 @@ function isJSXToken(node: ts.Node): boolean { /** * Returns the declaration kind of the given ts.Node - * @param {ts.Node} node TypeScript AST node + * @param {ts.VariableDeclarationList} node TypeScript AST node * @returns {string} declaration kind */ -function getDeclarationKind(node: ts.Node): 'let' | 'const' | 'var' { - switch (node.kind) { - case SyntaxKind.VariableDeclarationList: - if (node.flags & ts.NodeFlags.Let) { - return 'let'; - } - if (node.flags & ts.NodeFlags.Const) { - return 'const'; - } - return 'var'; - default: - throw 'Unable to determine declaration kind.'; +function getDeclarationKind( + node: ts.VariableDeclarationList +): 'let' | 'const' | 'var' { + if (node.flags & ts.NodeFlags.Let) { + return 'let'; + } + if (node.flags & ts.NodeFlags.Const) { + return 'const'; } + return 'var'; } /** @@ -758,18 +755,18 @@ function convertTokens(ast: ts.SourceFile): ESTreeToken[] { /** * Get container token node between range - * @param {ts.SourceFile} ast the AST object + * @param {ts.SourceFile} ast the AST object * @param {number} start The index at which the comment starts. * @param {number} end The index at which the comment ends. - * @returns {ts.Token} typescript container token + * @returns {ts.Node} typescript container token * @private */ function getNodeContainer( ast: ts.SourceFile, start: number, end: number -): ts.Token { - let container = null; +): ts.Node { + let container: ts.Node | null = null; /** * @param {ts.Node} node the ts.Node @@ -789,7 +786,7 @@ function getNodeContainer( } walk(ast); - return (container as unknown) as ts.Token; + return container!; } /** diff --git a/src/temp-types-based-on-js-source.ts b/src/temp-types-based-on-js-source.ts index 8ee48b9..ac4692c 100644 --- a/src/temp-types-based-on-js-source.ts +++ b/src/temp-types-based-on-js-source.ts @@ -21,7 +21,7 @@ export interface ESTreeToken { export interface ESTreeNode { type: string; loc: ESTreeNodeLoc; - range: number[]; + range: [number, number]; declaration?: ESTreeNode; specifiers?: any[]; source?: any; @@ -36,7 +36,7 @@ export interface ESTreeNode { modifiers?: any; body?: any; params?: any; - accessibility?: any; + accessibility?: 'public' | 'protected' | 'private'; readonly?: boolean; static?: boolean; export?: boolean; From 89d814f8d66ce3bd350c65a618027de68e11e522 Mon Sep 17 00:00:00 2001 From: Armano Date: Fri, 4 Jan 2019 16:50:56 +0100 Subject: [PATCH 21/30] test: fix issues with collecting coverage from tests (#84) --- jest.config.js | 13 +++++++++++++ package.json | 27 ++++----------------------- tests/ast-alignment/jest.config.js | 10 ---------- yarn.lock | 12 ++++++------ 4 files changed, 23 insertions(+), 39 deletions(-) create mode 100644 jest.config.js delete mode 100644 tests/ast-alignment/jest.config.js diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 0000000..f9aa158 --- /dev/null +++ b/jest.config.js @@ -0,0 +1,13 @@ +'use strict'; + +module.exports = { + testEnvironment: 'node', + transform: { + '^.+\\.tsx?$': 'ts-jest' + }, + testRegex: './tests/(lib/.*\\.(jsx?|tsx?)|ast-alignment/spec\\.ts)$', + collectCoverage: true, + collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'], + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], + coverageReporters: ['text-summary'] +}; diff --git a/package.json b/package.json index 49b519e..3286b6e 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "cz-conventional-changelog": "2.1.0", "glob": "7.1.2", "husky": "0.14.3", - "jest": "23.1.0", + "jest": "23.6.0", "lint-staged": "7.3.0", "lodash.isplainobject": "4.0.6", "prettier": "^1.14.3", @@ -54,9 +54,9 @@ ], "scripts": { "build": "tsc", - "test": "npm run unit-tests && npm run ast-alignment-tests", - "unit-tests": "jest", - "ast-alignment-tests": "jest --config=./tests/ast-alignment/jest.config.js", + "test": "jest", + "unit-tests": "jest \"./tests/lib/.*\"", + "ast-alignment-tests": "jest spec.ts", "precommit": "npm test && lint-staged", "cz": "git-cz", "commitmsg": "commitlint -E GIT_PARAMS", @@ -86,24 +86,5 @@ "extends": [ "@commitlint/config-conventional" ] - }, - "jest": { - "testEnvironment": "node", - "transform": { - "^.+\\.tsx?$": "ts-jest" - }, - "testRegex": "(/tests/lib/.*)\\.(jsx?|tsx?)$", - "moduleFileExtensions": [ - "ts", - "tsx", - "js", - "jsx", - "json", - "node" - ], - "collectCoverage": true, - "coverageReporters": [ - "text-summary" - ] } } diff --git a/tests/ast-alignment/jest.config.js b/tests/ast-alignment/jest.config.js deleted file mode 100644 index b8b2780..0000000 --- a/tests/ast-alignment/jest.config.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -module.exports = { - testEnvironment: 'node', - transform: { - '.+\\.tsx?$': 'ts-jest' - }, - testRegex: 'spec\\.ts$', - moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'] -}; diff --git a/yarn.lock b/yarn.lock index 65a041d..8924e5c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3987,7 +3987,7 @@ jest-changed-files@^23.4.2: dependencies: throat "^4.0.0" -jest-cli@^23.1.0: +jest-cli@^23.6.0: version "23.6.0" resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.6.0.tgz#61ab917744338f443ef2baa282ddffdd658a5da4" integrity sha512-hgeD1zRUp1E1zsiyOXjEn4LzRLWdJBV//ukAHGlx6s5mfCNJTbhbHjgxnDUXA8fsKWN/HqFFF6X5XcCwC/IvYQ== @@ -4289,13 +4289,13 @@ jest-worker@^23.2.0: dependencies: merge-stream "^1.0.1" -jest@23.1.0: - version "23.1.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-23.1.0.tgz#bbb7f893100a11a742dd8bd0d047a54b0968ad1a" - integrity sha1-u7f4kxAKEadC3YvQ0EelSwlorRo= +jest@23.6.0: + version "23.6.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-23.6.0.tgz#ad5835e923ebf6e19e7a1d7529a432edfee7813d" + integrity sha512-lWzcd+HSiqeuxyhG+EnZds6iO3Y3ZEnMrfZq/OTGvF/C+Z4fPMCdhWTGSAiO2Oym9rbEXfwddHhh6jqrTF3+Lw== dependencies: import-local "^1.0.0" - jest-cli "^23.1.0" + jest-cli "^23.6.0" js-levenshtein@^1.1.3: version "1.1.4" From f93a9bb2410025d4868adcc73effae6d1478257f Mon Sep 17 00:00:00 2001 From: Armano Date: Fri, 4 Jan 2019 17:02:21 +0100 Subject: [PATCH 22/30] test: add missing test cases for in and for loop (#85) --- tests/ast-alignment/fixtures-to-test.ts | 17 + .../fixtures/javascript/for/for-empty.src.js | 1 + tests/fixtures/javascript/for/for-loop.src.js | 1 + .../javascript/for/for-with-coma.src.js | 4 + .../javascript/for/for-with-const.src.js | 3 + .../javascript/for/for-with-function.src.js | 1 + .../javascript/for/for-with-let.src.js | 3 + .../forIn/for-in-bare-nonstrict.src.js | 6 + .../forIn/for-in-destruction.src.js | 1 + .../javascript/forIn/for-in-object.src.js | 1 + .../forIn/for-in-with-assigment.src.js | 1 + .../forIn/for-in-with-bare-assigment.src.js | 1 + .../javascript/forIn/for-in-with-const.src.js | 1 + .../forIn/for-in-with-milti-asigment.src.js | 1 + .../javascript/forIn/for-in-with-var.src.js | 1 + tests/lib/__snapshots__/javascript.ts.snap | 6919 +++++++++++++++++ .../semantic-diagnostics-enabled.ts.snap | 35 + 17 files changed, 6997 insertions(+) create mode 100644 tests/fixtures/javascript/for/for-empty.src.js create mode 100644 tests/fixtures/javascript/for/for-loop.src.js create mode 100644 tests/fixtures/javascript/for/for-with-coma.src.js create mode 100644 tests/fixtures/javascript/for/for-with-const.src.js create mode 100644 tests/fixtures/javascript/for/for-with-function.src.js create mode 100644 tests/fixtures/javascript/for/for-with-let.src.js create mode 100644 tests/fixtures/javascript/forIn/for-in-bare-nonstrict.src.js create mode 100644 tests/fixtures/javascript/forIn/for-in-destruction.src.js create mode 100644 tests/fixtures/javascript/forIn/for-in-object.src.js create mode 100644 tests/fixtures/javascript/forIn/for-in-with-assigment.src.js create mode 100644 tests/fixtures/javascript/forIn/for-in-with-bare-assigment.src.js create mode 100644 tests/fixtures/javascript/forIn/for-in-with-const.src.js create mode 100644 tests/fixtures/javascript/forIn/for-in-with-milti-asigment.src.js create mode 100644 tests/fixtures/javascript/forIn/for-in-with-var.src.js diff --git a/tests/ast-alignment/fixtures-to-test.ts b/tests/ast-alignment/fixtures-to-test.ts index 7ab5572..7bdf2a8 100644 --- a/tests/ast-alignment/fixtures-to-test.ts +++ b/tests/ast-alignment/fixtures-to-test.ts @@ -200,6 +200,23 @@ let fixturePatternConfigsToTest = [ createFixturePatternConfigFor('javascript/exponentiationOperators'), createFixturePatternConfigFor('javascript/experimentalOptionalCatchBinding'), + createFixturePatternConfigFor('javascript/for'), + createFixturePatternConfigFor('javascript/forIn', { + ignore: [ + /** + * Error: AST difference + * tsep: AssignmentExpression + * babel: AssignmentPattern + */ + 'for-in-with-bare-assigment', + /** + * Expected babel parse errors - all of these files below produce parse errors in espree + * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree + * does not actually error on them and will produce an AST. + */ + 'for-in-with-assigment' // babel parse errors + ] + }), createFixturePatternConfigFor('javascript/forOf', { ignore: [ /** diff --git a/tests/fixtures/javascript/for/for-empty.src.js b/tests/fixtures/javascript/for/for-empty.src.js new file mode 100644 index 0000000..845fc90 --- /dev/null +++ b/tests/fixtures/javascript/for/for-empty.src.js @@ -0,0 +1 @@ +for (;;); diff --git a/tests/fixtures/javascript/for/for-loop.src.js b/tests/fixtures/javascript/for/for-loop.src.js new file mode 100644 index 0000000..4f97f6f --- /dev/null +++ b/tests/fixtures/javascript/for/for-loop.src.js @@ -0,0 +1 @@ +for(var i = 0; i < 10; i++) {} diff --git a/tests/fixtures/javascript/for/for-with-coma.src.js b/tests/fixtures/javascript/for/for-with-coma.src.js new file mode 100644 index 0000000..25e3805 --- /dev/null +++ b/tests/fixtures/javascript/for/for-with-coma.src.js @@ -0,0 +1,4 @@ +for (var i = 0, j = 10; i < j; i++, j--) +{ +} + diff --git a/tests/fixtures/javascript/for/for-with-const.src.js b/tests/fixtures/javascript/for/for-with-const.src.js new file mode 100644 index 0000000..ef32a71 --- /dev/null +++ b/tests/fixtures/javascript/for/for-with-const.src.js @@ -0,0 +1,3 @@ +for (const i = 0; i < j;) +{ +} diff --git a/tests/fixtures/javascript/for/for-with-function.src.js b/tests/fixtures/javascript/for/for-with-function.src.js new file mode 100644 index 0000000..7734dba --- /dev/null +++ b/tests/fixtures/javascript/for/for-with-function.src.js @@ -0,0 +1 @@ +for (x = 5; x = x.toExponential(); x = 5); diff --git a/tests/fixtures/javascript/for/for-with-let.src.js b/tests/fixtures/javascript/for/for-with-let.src.js new file mode 100644 index 0000000..ef32a71 --- /dev/null +++ b/tests/fixtures/javascript/for/for-with-let.src.js @@ -0,0 +1,3 @@ +for (const i = 0; i < j;) +{ +} diff --git a/tests/fixtures/javascript/forIn/for-in-bare-nonstrict.src.js b/tests/fixtures/javascript/forIn/for-in-bare-nonstrict.src.js new file mode 100644 index 0000000..6780cbb --- /dev/null +++ b/tests/fixtures/javascript/forIn/for-in-bare-nonstrict.src.js @@ -0,0 +1,6 @@ +var effects = 0; +var iterations = 0; +var stored; +for (var a = (++effects, -1) in stored = a, {a: 0, b: 1, c: 2}) { + ++iterations; +} diff --git a/tests/fixtures/javascript/forIn/for-in-destruction.src.js b/tests/fixtures/javascript/forIn/for-in-destruction.src.js new file mode 100644 index 0000000..0e07e5c --- /dev/null +++ b/tests/fixtures/javascript/forIn/for-in-destruction.src.js @@ -0,0 +1 @@ +for (var [name, value] in obj) {} diff --git a/tests/fixtures/javascript/forIn/for-in-object.src.js b/tests/fixtures/javascript/forIn/for-in-object.src.js new file mode 100644 index 0000000..8a28bcd --- /dev/null +++ b/tests/fixtures/javascript/forIn/for-in-object.src.js @@ -0,0 +1 @@ +for ((i in {})); diff --git a/tests/fixtures/javascript/forIn/for-in-with-assigment.src.js b/tests/fixtures/javascript/forIn/for-in-with-assigment.src.js new file mode 100644 index 0000000..672072d --- /dev/null +++ b/tests/fixtures/javascript/forIn/for-in-with-assigment.src.js @@ -0,0 +1 @@ +for (let x = 42 in list) process(x); diff --git a/tests/fixtures/javascript/forIn/for-in-with-bare-assigment.src.js b/tests/fixtures/javascript/forIn/for-in-with-bare-assigment.src.js new file mode 100644 index 0000000..cd2e1aa --- /dev/null +++ b/tests/fixtures/javascript/forIn/for-in-with-bare-assigment.src.js @@ -0,0 +1 @@ +for (x = 0 in arr); diff --git a/tests/fixtures/javascript/forIn/for-in-with-const.src.js b/tests/fixtures/javascript/forIn/for-in-with-const.src.js new file mode 100644 index 0000000..48da176 --- /dev/null +++ b/tests/fixtures/javascript/forIn/for-in-with-const.src.js @@ -0,0 +1 @@ +for (const x in list) process(x); diff --git a/tests/fixtures/javascript/forIn/for-in-with-milti-asigment.src.js b/tests/fixtures/javascript/forIn/for-in-with-milti-asigment.src.js new file mode 100644 index 0000000..01e8d69 --- /dev/null +++ b/tests/fixtures/javascript/forIn/for-in-with-milti-asigment.src.js @@ -0,0 +1 @@ +for (var x = y = z in q); diff --git a/tests/fixtures/javascript/forIn/for-in-with-var.src.js b/tests/fixtures/javascript/forIn/for-in-with-var.src.js new file mode 100644 index 0000000..f3649e9 --- /dev/null +++ b/tests/fixtures/javascript/forIn/for-in-with-var.src.js @@ -0,0 +1 @@ +for (var x in list) process(x); diff --git a/tests/lib/__snapshots__/javascript.ts.snap b/tests/lib/__snapshots__/javascript.ts.snap index 809b88c..019314f 100644 --- a/tests/lib/__snapshots__/javascript.ts.snap +++ b/tests/lib/__snapshots__/javascript.ts.snap @@ -79659,6 +79659,6925 @@ Object { } `; +exports[`javascript fixtures/for/for-empty.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "EmptyStatement", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "test": null, + "type": "ForStatement", + "update": null, + }, + ], + "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": "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": "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", +} +`; + +exports[`javascript fixtures/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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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 { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "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 { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "operator": "++", + "prefix": false, + "range": Array [ + 23, + 26, + ], + "type": "UpdateExpression", + }, + }, + ], + "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", +} +`; + +exports[`javascript fixtures/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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "j", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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 { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 24, + 25, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "operator": "<", + "range": Array [ + 24, + 29, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "name": "j", + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + }, + "type": "BinaryExpression", + }, + "type": "ForStatement", + "update": Object { + "expressions": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 31, + 32, + ], + "type": "Identifier", + }, + "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 { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "name": "j", + "range": Array [ + 36, + 37, + ], + "type": "Identifier", + }, + "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", + }, + }, + ], + "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", +} +`; + +exports[`javascript fixtures/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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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 { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "operator": "<", + "range": Array [ + 18, + 23, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "j", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "type": "BinaryExpression", + }, + "type": "ForStatement", + "update": null, + }, + ], + "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", +} +`; + +exports[`javascript fixtures/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 { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 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 { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "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 { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "toExponential", + "range": Array [ + 18, + 31, + ], + "type": "Identifier", + }, + "range": Array [ + 16, + 31, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 33, + ], + "type": "CallExpression", + }, + "type": "AssignmentExpression", + }, + "type": "ForStatement", + "update": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + "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", + }, + }, + ], + "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", +} +`; + +exports[`javascript fixtures/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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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 { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "operator": "<", + "range": Array [ + 18, + 23, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "j", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "type": "BinaryExpression", + }, + "type": "ForStatement", + "update": null, + }, + ], + "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", +} +`; + +exports[`javascript fixtures/forIn/for-in-bare-nonstrict.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "effects", + "range": Array [ + 4, + 11, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "iterations", + "range": Array [ + 21, + 31, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "stored", + "range": Array [ + 41, + 47, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 41, + 47, + ], + "type": "VariableDeclarator", + }, + ], + "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 { + "expression": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "name": "iterations", + "range": Array [ + 119, + 129, + ], + "type": "Identifier", + }, + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "name": "a", + "range": Array [ + 58, + 59, + ], + "type": "Identifier", + }, + "init": Object { + "expressions": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "name": "effects", + "range": Array [ + 65, + 72, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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 { + "loc": Object { + "end": Object { + "column": 38, + "line": 4, + }, + "start": Object { + "column": 32, + "line": 4, + }, + }, + "name": "stored", + "range": Array [ + 81, + 87, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 4, + }, + "start": Object { + "column": 32, + "line": 4, + }, + }, + "operator": "=", + "range": Array [ + 81, + 91, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 4, + }, + "start": Object { + "column": 41, + "line": 4, + }, + }, + "name": "a", + "range": Array [ + 90, + 91, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, + Object { + "loc": Object { + "end": Object { + "column": 62, + "line": 4, + }, + "start": Object { + "column": 44, + "line": 4, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 4, + }, + "start": Object { + "column": 45, + "line": 4, + }, + }, + "name": "a", + "range": Array [ + 94, + 95, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 49, + "line": 4, + }, + "start": Object { + "column": 45, + "line": 4, + }, + }, + "method": 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 { + "loc": Object { + "end": Object { + "column": 52, + "line": 4, + }, + "start": Object { + "column": 51, + "line": 4, + }, + }, + "name": "b", + "range": Array [ + 100, + 101, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 55, + "line": 4, + }, + "start": Object { + "column": 51, + "line": 4, + }, + }, + "method": 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 { + "loc": Object { + "end": Object { + "column": 58, + "line": 4, + }, + "start": Object { + "column": 57, + "line": 4, + }, + }, + "name": "c", + "range": Array [ + 106, + 107, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 61, + "line": 4, + }, + "start": Object { + "column": 57, + "line": 4, + }, + }, + "method": 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", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/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 { + "id": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "name", + "range": Array [ + 10, + 14, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "value", + "range": Array [ + 16, + 21, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 22, + ], + "type": "ArrayPattern", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 22, + ], + "type": "VariableDeclarator", + }, + ], + "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 { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "obj", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, + "type": "ForInStatement", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/forIn/for-in-object.src 1`] = `"';' expected."`; + +exports[`javascript fixtures/forIn/for-in-with-assigment.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 33, + 34, + ], + "type": "Identifier", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "process", + "range": Array [ + 25, + 32, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 35, + ], + "type": "CallExpression", + }, + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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 { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "list", + "range": Array [ + 19, + 23, + ], + "type": "Identifier", + }, + "type": "ForInStatement", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/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 { + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 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": "0", + "type": "Literal", + "value": 0, + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 19, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "arr", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "type": "ForInStatement", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/forIn/for-in-with-const.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "process", + "range": Array [ + 22, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 32, + ], + "type": "CallExpression", + }, + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "VariableDeclarator", + }, + ], + "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 { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "list", + "range": Array [ + 16, + 20, + ], + "type": "Identifier", + }, + "type": "ForInStatement", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "init": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 13, + 18, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 18, + ], + "type": "VariableDeclarator", + }, + ], + "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 { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "q", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "type": "ForInStatement", + }, + ], + "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", +} +`; + +exports[`javascript fixtures/forIn/for-in-with-var.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "process", + "range": Array [ + 20, + 27, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 30, + ], + "type": "CallExpression", + }, + "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 { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "VariableDeclarator", + }, + ], + "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 { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "list", + "range": Array [ + 14, + 18, + ], + "type": "Identifier", + }, + "type": "ForInStatement", + }, + ], + "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", +} +`; + exports[`javascript fixtures/forOf/for-of-with-function-initializer.src 1`] = ` Object { "body": Array [ diff --git a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap index 5fd15a3..0d2ea6a 100644 --- a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap +++ b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap @@ -519,6 +519,41 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" en exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/exponentiationOperators/exponential-operators.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/for/for-empty.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/for/for-loop.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/for/for-with-coma.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/for/for-with-const.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/for/for-with-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/for/for-with-let.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-bare-nonstrict.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-destruction.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-object.src.js.src 1`] = ` +Object { + "column": 14, + "index": 14, + "lineNumber": 1, + "message": "';' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-assigment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-bare-assigment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-const.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-milti-asigment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-var.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-function-initializer.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-var-and-braces.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; From 1b5dfb73246defce3aaabc5f80fb1357253c8a3d Mon Sep 17 00:00:00 2001 From: Armano Date: Fri, 4 Jan 2019 17:13:02 +0100 Subject: [PATCH 23/30] fix: set parent nodes correctly for virtual files (#78) --- src/tsconfig-parser.ts | 2 +- tests/lib/semanticInfo.ts | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/tsconfig-parser.ts b/src/tsconfig-parser.ts index 9995327..2212c4d 100644 --- a/src/tsconfig-parser.ts +++ b/src/tsconfig-parser.ts @@ -213,7 +213,7 @@ export function createProgram(code: string, filePath: string, extra: Extra) { return undefined; } - const compilerHost = ts.createCompilerHost(commandLine.options); + const compilerHost = ts.createCompilerHost(commandLine.options, true); const oldReadFile = compilerHost.readFile; compilerHost.readFile = (fileName: string) => path.normalize(fileName) === path.normalize(filePath) diff --git a/tests/lib/semanticInfo.ts b/tests/lib/semanticInfo.ts index 96ae842..db1671c 100644 --- a/tests/lib/semanticInfo.ts +++ b/tests/lib/semanticInfo.ts @@ -143,6 +143,23 @@ describe('semanticInfo', () => { ); }); + test('non-existent file should provide parents nodes', () => { + const parseResult = parseCodeAndGenerateServices( + `function M() { return Base }`, + createOptions('') + ); + + // https://github.com/JamesHenry/typescript-estree/issues/77 + expect(parseResult.services.program).toBeDefined(); + expect( + parseResult.services.program!.getSourceFile('') + ).toBeDefined(); + expect( + parseResult.services.program!.getSourceFile('')!.statements[0] + .parent + ).toBeDefined(); + }); + test('non-existent project file', () => { const fileName = path.resolve(FIXTURES_DIR, 'isolated-file.src.ts'); const badConfig = createOptions(fileName); From 18408b5c1ce2b193c770b7f220bfe55ade22b2e1 Mon Sep 17 00:00:00 2001 From: Armano Date: Fri, 4 Jan 2019 17:16:36 +0100 Subject: [PATCH 24/30] refactor: remove duplicated type ConstructorTypeNode (#81) --- src/temp-types-based-on-js-source.ts | 6 ++++-- src/ts-nodes.ts | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/temp-types-based-on-js-source.ts b/src/temp-types-based-on-js-source.ts index ac4692c..7def7f3 100644 --- a/src/temp-types-based-on-js-source.ts +++ b/src/temp-types-based-on-js-source.ts @@ -23,13 +23,13 @@ export interface ESTreeNode { loc: ESTreeNodeLoc; range: [number, number]; declaration?: ESTreeNode; - specifiers?: any[]; + specifiers?: (ESTreeNode | null)[]; source?: any; typeAnnotation?: ESTreeNode | null; typeParameters?: ESTreeNode | null; id?: ESTreeNode | null; expression?: ESTreeNode | null; - decorators?: any; + decorators?: (ESTreeNode | null)[]; const?: boolean; declare?: boolean; global?: boolean; @@ -42,6 +42,8 @@ export interface ESTreeNode { export?: boolean; parameter?: any; abstract?: boolean; + typeName?: ESTreeNode | null; + directive?: string; } export interface ESTreeComment extends ESTreeNode {} diff --git a/src/ts-nodes.ts b/src/ts-nodes.ts index 69682cb..b917584 100644 --- a/src/ts-nodes.ts +++ b/src/ts-nodes.ts @@ -35,6 +35,7 @@ export type TSNode = ts.Node & | ts.ThisTypeNode // | ts.FunctionOrConstructorTypeNodeBase -> FunctionTypeNode, ConstructorTypeNode | ts.ConstructorTypeNode + | ts.FunctionTypeNode | ts.TypeReferenceNode | ts.TypePredicateNode | ts.TypeQueryNode @@ -50,8 +51,6 @@ export type TSNode = ts.Node & | ts.ParenthesizedTypeNode | ts.TypeOperatorNode | ts.IndexedAccessTypeNode - | ts.FunctionTypeNode - | ts.ConstructorTypeNode | ts.MappedTypeNode | ts.LiteralTypeNode | ts.StringLiteral From c1a75eb354f7bcf030fe49764d40d1b07683db5d Mon Sep 17 00:00:00 2001 From: Armano Date: Fri, 4 Jan 2019 17:26:36 +0100 Subject: [PATCH 25/30] BREAKING: add missing TSTypeAssertion node (#79) BREAKING CHANGE: This changes the AST - node `TSTypeAssertionExpression` got renamed to `TSTypeAssertion` --- src/ast-node-types.ts | 1 + src/convert.ts | 8 + tests/ast-alignment/fixtures-to-test.ts | 22 +- tests/ast-alignment/parse.ts | 87 +++--- tests/ast-alignment/spec.ts | 6 +- .../typescript/basics/type-assertion.src.ts | 1 + .../semantic-diagnostics-enabled.ts.snap | 2 + tests/lib/__snapshots__/typescript.ts.snap | 277 ++++++++++++++++++ 8 files changed, 347 insertions(+), 57 deletions(-) create mode 100644 tests/fixtures/typescript/basics/type-assertion.src.ts diff --git a/src/ast-node-types.ts b/src/ast-node-types.ts index fbe848e..41ee3fb 100644 --- a/src/ast-node-types.ts +++ b/src/ast-node-types.ts @@ -151,6 +151,7 @@ export const AST_NODE_TYPES: { [key: string]: string } = { TSThisType: 'TSThisType', TSTypeAnnotation: 'TSTypeAnnotation', TSTypeAliasDeclaration: 'TSTypeAliasDeclaration', + TSTypeAssertion: 'TSTypeAssertion', TSTypeLiteral: 'TSTypeLiteral', TSTypeOperator: 'TSTypeOperator', TSTypeParameter: 'TSTypeParameter', diff --git a/src/convert.ts b/src/convert.ts index 96b7715..098c3df 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -2680,6 +2680,14 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { }); break; } + case SyntaxKind.TypeAssertionExpression: { + Object.assign(result, { + type: AST_NODE_TYPES.TSTypeAssertion, + typeAnnotation: convertChildType(node.type), + expression: convertChild(node.expression) + }); + break; + } case SyntaxKind.ImportEqualsDeclaration: { Object.assign(result, { type: AST_NODE_TYPES.TSImportEqualsDeclaration, diff --git a/tests/ast-alignment/fixtures-to-test.ts b/tests/ast-alignment/fixtures-to-test.ts index 7bdf2a8..5fc0962 100644 --- a/tests/ast-alignment/fixtures-to-test.ts +++ b/tests/ast-alignment/fixtures-to-test.ts @@ -6,11 +6,13 @@ import jsxKnownIssues from '../jsx-known-issues'; interface Fixture { filename: string; + jsx: boolean; ignoreSourceType: boolean; } interface FixturePatternConfig { pattern: string; + jsx: boolean; ignoreSourceType: boolean; } @@ -69,6 +71,11 @@ function createFixturePatternConfigFor( config.ignore = config.ignore || []; config.fileType = config.fileType || 'js'; config.ignoreSourceType = config.ignoreSourceType || []; + const jsx = + config.fileType === 'js' || + config.fileType === 'jsx' || + config.fileType === 'tsx'; + /** * The TypeScript compiler gives us the "externalModuleIndicator" to allow typescript-estree do dynamically detect the "sourceType". * Babel has similar feature sourceType='unambiguous' but its not perfect, and in some specific cases we sill have to enforce it. @@ -85,7 +92,8 @@ function createFixturePatternConfigFor( fixturesRequiringSourceTypeModule.push({ // It needs to be the full path from within fixtures/ for the pattern pattern: `${fixturesSubPath}/${fixture}.src.${config.fileType}`, - ignoreSourceType: true + ignoreSourceType: true, + jsx }); } } @@ -93,7 +101,8 @@ function createFixturePatternConfigFor( pattern: `${fixturesSubPath}/!(${config.ignore.join('|')}).src.${ config.fileType }`, - ignoreSourceType: false + ignoreSourceType: false, + jsx }; } @@ -403,7 +412,11 @@ let fixturePatternConfigsToTest = [ * Not yet supported in Babel https://github.com/babel/babel/issues/9228 * Directive field is not added to module and namespace */ - 'directive-in-namespace' + 'directive-in-namespace', + /** + * there is difference in range between babel and tsep + */ + 'type-assertion' ], ignoreSourceType: [ // https://github.com/babel/babel/issues/9213 @@ -525,7 +538,8 @@ fixturePatternConfigsToTest.forEach(fixturePatternConfig => { matchingFixtures.forEach(filename => { fixturesToTest.push({ filename, - ignoreSourceType: fixturePatternConfig.ignoreSourceType + ignoreSourceType: fixturePatternConfig.ignoreSourceType, + jsx: fixturePatternConfig.jsx }); }); }); diff --git a/tests/ast-alignment/parse.ts b/tests/ast-alignment/parse.ts index c5df123..c37f5dc 100644 --- a/tests/ast-alignment/parse.ts +++ b/tests/ast-alignment/parse.ts @@ -1,8 +1,7 @@ import codeFrame from 'babel-code-frame'; import * as parser from '../../src/parser'; import * as parseUtils from './utils'; -import { ParserOptions as BabelParserOptions } from '@babel/parser'; -import { ParserOptions } from '../../src/temp-types-based-on-js-source'; +import { ParserPlugin } from '@babel/parser'; function createError(message: string, line: number, column: number) { // Construct an error similar to the ones thrown by Babylon. @@ -14,55 +13,42 @@ function createError(message: string, line: number, column: number) { return error; } -function parseWithBabelParser( - text: string, - parserOptions?: BabelParserOptions -) { - parserOptions = parserOptions || {}; +function parseWithBabelParser(text: string, jsx: boolean = true) { const babel = require('@babel/parser'); - return babel.parse( - text, - Object.assign( - { - sourceType: 'unambiguous', - allowImportExportEverywhere: true, - allowReturnOutsideFunction: true, - ranges: true, - plugins: [ - 'jsx', - 'typescript', - 'objectRestSpread', - 'decorators-legacy', - 'classProperties', - 'asyncGenerators', - 'dynamicImport', - 'estree', - 'bigInt' - ] - }, - parserOptions - ) - ); + const plugins: ParserPlugin[] = [ + 'typescript', + 'objectRestSpread', + 'decorators-legacy', + 'classProperties', + 'asyncGenerators', + 'dynamicImport', + 'estree', + 'bigInt' + ]; + if (jsx) { + plugins.push('jsx'); + } + + return babel.parse(text, { + sourceType: 'unambiguous', + allowImportExportEverywhere: true, + allowReturnOutsideFunction: true, + ranges: true, + plugins + }); } -function parseWithTypeScriptESTree( - text: string, - parserOptions?: ParserOptions -) { - parserOptions = parserOptions || ({} as ParserOptions); +function parseWithTypeScriptESTree(text: string, jsx: boolean = true) { try { - return parser.parse(text, Object.assign( - { - loc: true, - range: true, - tokens: false, - comment: false, - useJSXTextNode: true, - errorOnUnknownASTType: true, - jsx: true - }, - parserOptions - ) as any); + return parser.parse(text, { + loc: true, + range: true, + tokens: false, + comment: false, + useJSXTextNode: true, + errorOnUnknownASTType: true, + jsx + }); } catch (e) { throw createError(e.message, e.lineNumber, e.column); } @@ -70,8 +56,7 @@ function parseWithTypeScriptESTree( interface ASTComparisonParseOptions { parser: string; - typeScriptESTreeOptions?: ParserOptions; - babelParserOptions?: BabelParserOptions; + jsx?: boolean; } export function parse(text: string, opts: ASTComparisonParseOptions) { @@ -88,12 +73,12 @@ export function parse(text: string, opts: ASTComparisonParseOptions) { switch (opts.parser) { case 'typescript-estree': result.ast = parseUtils.normalizeNodeTypes( - parseWithTypeScriptESTree(text, opts.typeScriptESTreeOptions) + parseWithTypeScriptESTree(text, opts.jsx) ); break; case '@babel/parser': result.ast = parseUtils.normalizeNodeTypes( - parseWithBabelParser(text, opts.babelParserOptions) + parseWithBabelParser(text, opts.jsx) ); break; default: diff --git a/tests/ast-alignment/spec.ts b/tests/ast-alignment/spec.ts index 31814b9..2f27fb2 100644 --- a/tests/ast-alignment/spec.ts +++ b/tests/ast-alignment/spec.ts @@ -11,14 +11,16 @@ fixturesToTest.forEach(fixture => { * Parse with typescript-estree */ const typeScriptESTreeResult = parse(source, { - parser: 'typescript-estree' + parser: 'typescript-estree', + jsx: fixture.jsx }); /** * Parse the source with @babel/parser typescript-plugin */ const babelParserResult = parse(source, { - parser: '@babel/parser' + parser: '@babel/parser', + jsx: fixture.jsx }); /** diff --git a/tests/fixtures/typescript/basics/type-assertion.src.ts b/tests/fixtures/typescript/basics/type-assertion.src.ts new file mode 100644 index 0000000..67e0d69 --- /dev/null +++ b/tests/fixtures/typescript/basics/type-assertion.src.ts @@ -0,0 +1 @@ +const foo = 2; diff --git a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap index 0d2ea6a..504efbb 100644 --- a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap +++ b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap @@ -1782,6 +1782,8 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" en exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-object-without-annotation.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/type-assertion.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/type-parameters-comments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/tests/lib/__snapshots__/typescript.ts.snap b/tests/lib/__snapshots__/typescript.ts.snap index a41f38c..bec36dc 100644 --- a/tests/lib/__snapshots__/typescript.ts.snap +++ b/tests/lib/__snapshots__/typescript.ts.snap @@ -48113,6 +48113,283 @@ Object { } `; +exports[`typescript fixtures/basics/type-assertion.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "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", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "type": "VariableDeclaration", + }, + ], + "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", +} +`; + exports[`typescript fixtures/basics/type-guard.src 1`] = ` Object { "body": Array [ From 6097361f39391f6781f49f54ebade6d57bd8a666 Mon Sep 17 00:00:00 2001 From: James Henry Date: Fri, 4 Jan 2019 11:34:39 -0500 Subject: [PATCH 26/30] fix: commit message for add missing TSTypeAssertion node (#79) BREAKING CHANGE: This changes the AST - node `TSTypeAssertionExpression` got renamed to `TSTypeAssertion` --- .prettierignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.prettierignore b/.prettierignore index 9da7aa6..206eb24 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1 @@ -tests/fixtures/**/* \ No newline at end of file +tests/fixtures/**/* From 15b20218391d589acae41dd7fd077f4322afb993 Mon Sep 17 00:00:00 2001 From: Armano Date: Fri, 4 Jan 2019 18:47:31 +0100 Subject: [PATCH 27/30] test: add FixturesTester (#67) --- tests/ast-alignment/fixtures-to-test.ts | 952 ++++++++++++------------ 1 file changed, 464 insertions(+), 488 deletions(-) diff --git a/tests/ast-alignment/fixtures-to-test.ts b/tests/ast-alignment/fixtures-to-test.ts index 5fc0962..17858b4 100644 --- a/tests/ast-alignment/fixtures-to-test.ts +++ b/tests/ast-alignment/fixtures-to-test.ts @@ -24,6 +24,81 @@ interface CreateFixturePatternConfig { const fixturesDirPath = path.join(__dirname, '../fixtures'); +class FixturesTester { + protected fixtures: FixturePatternConfig[] = []; + + constructor() {} + + /** + * Utility to generate a FixturePatternConfig object containing the glob pattern for specific subsections of the fixtures/ directory, + * including the capability to ignore specific nested patterns. + * + * @param {string} fixturesSubPath the sub-path within the fixtures/ directory + * @param {CreateFixturePatternConfig?} config an optional configuration object with optional sub-paths to ignore and/or parse with sourceType: module + */ + public addFixturePatternConfig( + fixturesSubPath: string, + config: CreateFixturePatternConfig = {} + ) { + if (!fs.existsSync(path.join(fixturesDirPath, fixturesSubPath))) { + throw new Error( + `Registered path '${path.join( + __dirname, + fixturesSubPath + )}' was not found` + ); + } + + const ignore = config.ignore || []; + const fileType = config.fileType || 'js'; + const ignoreSourceType = config.ignoreSourceType || []; + const jsx = fileType === 'js' || fileType === 'jsx' || fileType === 'tsx'; + + /** + * The TypeScript compiler gives us the "externalModuleIndicator" to allow typescript-estree do dynamically detect the "sourceType". + * Babel has similar feature sourceType='unambiguous' but its not perfect, and in some specific cases we sill have to enforce it. + * Known issues: + * - https://github.com/babel/babel/issues/9213 + */ + if (ignoreSourceType.length) { + ignore.push(...ignoreSourceType); + for (const fixture of ignoreSourceType) { + this.fixtures.push({ + // It needs to be the full path from within fixtures/ for the pattern + pattern: `${fixturesSubPath}/${fixture}.src.${fileType}`, + ignoreSourceType: true, + jsx + }); + } + } + + this.fixtures.push({ + pattern: `${fixturesSubPath}/!(${ignore.join('|')}).src.${fileType}`, + ignoreSourceType: false, + jsx + }); + } + + public getFixtures(): Fixture[] { + return this.fixtures + .map(fixture => + glob + .sync(`${fixturesDirPath}/${fixture.pattern}`, {}) + .map(filename => ({ + filename, + ignoreSourceType: fixture.ignoreSourceType, + jsx: fixture.jsx + })) + ) + .reduce((acc, x) => acc.concat(x), []); + } +} + +/** + * An class with FixturePatternConfigs + */ +const tester = new FixturesTester(); + /** * JSX fixtures which have known issues for typescript-estree */ @@ -38,510 +113,411 @@ const jsxFilesWithKnownIssues = jsxKnownIssues.map(f => f.replace('jsx/', '')); */ jsxFilesWithKnownIssues.push('invalid-no-tag-name'); -/** - * Globally track which fixtures need to be parsed with sourceType: "module" - * so that they can be added with the correct FixturePatternConfig - */ -let fixturesRequiringSourceTypeModule: FixturePatternConfig[] = []; +tester.addFixturePatternConfig('javascript/basics'); + +tester.addFixturePatternConfig('comments', { + ignore: [ + /** + * Template strings seem to also be affected by the difference in opinion between different parsers in: + * https://github.com/babel/babel/issues/6681 + */ + 'no-comment-template', // Purely AST diffs + 'template-string-block' // Purely AST diffs + ] +}); -/** - * Utility to generate a FixturePatternConfig object containing the glob pattern for specific subsections of the fixtures/ directory, - * including the capability to ignore specific nested patterns. - * - * @param {string} fixturesSubPath the sub-path within the fixtures/ directory - * @param {CreateFixturePatternConfig?} config an optional configuration object with optional sub-paths to ignore and/or parse with sourceType: module - * @returns {FixturePatternConfig} an object containing the glob pattern and optional additional config - */ -function createFixturePatternConfigFor( - fixturesSubPath: string, - config?: CreateFixturePatternConfig -): FixturePatternConfig { - if (!fixturesSubPath) { - throw new Error( - 'fixtureSubPath was not provided for the current fixture pattern' - ); - } - if (!fs.existsSync(path.join(fixturesDirPath, fixturesSubPath))) { - throw new Error( - `Registered path '${path.join(__dirname, fixturesSubPath)}' was not found` - ); - } +tester.addFixturePatternConfig('javascript/templateStrings', { + ignore: ['**/*'] +}); - config = config || ({} as CreateFixturePatternConfig); - config.ignore = config.ignore || []; - config.fileType = config.fileType || 'js'; - config.ignoreSourceType = config.ignoreSourceType || []; - const jsx = - config.fileType === 'js' || - config.fileType === 'jsx' || - config.fileType === 'tsx'; +tester.addFixturePatternConfig('javascript/arrayLiteral'); - /** - * The TypeScript compiler gives us the "externalModuleIndicator" to allow typescript-estree do dynamically detect the "sourceType". - * Babel has similar feature sourceType='unambiguous' but its not perfect, and in some specific cases we sill have to enforce it. - * - * First merge the fixtures which need to be parsed with sourceType: "module" into the - * ignore list, and then add their full config into the global array. - */ - if (config.ignoreSourceType.length) { - config.ignore = ([] as string[]).concat( - config.ignore, - config.ignoreSourceType - ); - for (const fixture of config.ignoreSourceType) { - fixturesRequiringSourceTypeModule.push({ - // It needs to be the full path from within fixtures/ for the pattern - pattern: `${fixturesSubPath}/${fixture}.src.${config.fileType}`, - ignoreSourceType: true, - jsx - }); - } - } - return { - pattern: `${fixturesSubPath}/!(${config.ignore.join('|')}).src.${ - config.fileType - }`, - ignoreSourceType: false, - jsx - }; -} +tester.addFixturePatternConfig('javascript/simple-literals'); -/** - * An array of FixturePatternConfigs - */ -let fixturePatternConfigsToTest = [ - createFixturePatternConfigFor('javascript/basics'), - - createFixturePatternConfigFor('comments', { - ignore: [ - /** - * Template strings seem to also be affected by the difference in opinion between different parsers in: - * https://github.com/babel/babel/issues/6681 - */ - 'no-comment-template', // Purely AST diffs - 'template-string-block' // Purely AST diffs - ] - }), - - createFixturePatternConfigFor('javascript/templateStrings', { - ignore: ['**/*'] - }), - - createFixturePatternConfigFor('javascript/simple-literals'), - - createFixturePatternConfigFor('javascript/directives'), - - createFixturePatternConfigFor('javascript/experimentalObjectRestSpread', { - ignore: [ - /** - * Trailing comma is not permitted after a "RestElement" in Babel - */ - 'invalid-rest-trailing-comma' - ] - }), - - createFixturePatternConfigFor('javascript/arrowFunctions', { - ignore: [ - /** - * Expected babel parse errors - all of these files below produce parse errors in espree - * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree - * does not actually error on them and will produce an AST. - */ - 'error-dup-params', // babel parse errors - 'error-strict-dup-params', // babel parse errors - 'error-strict-octal', // babel parse errors - 'error-two-lines' // babel parse errors - ] - }), - - createFixturePatternConfigFor('javascript/bigIntLiterals'), - createFixturePatternConfigFor('javascript/binaryLiterals'), - createFixturePatternConfigFor('javascript/blockBindings'), - - createFixturePatternConfigFor('javascript/classes', { - ignore: [ - /** - * super() is being used outside of constructor. Other parsers (e.g. espree, acorn) do not error on this. - */ - 'class-one-method-super', // babel parse errors - /** - * Expected babel parse errors - all of these files below produce parse errors in espree - * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree - * does not actually error on them and will produce an AST. - */ - 'invalid-class-declaration', // babel parse errors - 'invalid-class-setter-declaration' // babel parse errors - ] - }), - - createFixturePatternConfigFor('javascript/defaultParams'), - - createFixturePatternConfigFor('javascript/destructuring', { - ignore: [ - /** - * Expected babel parse errors - all of these files below produce parse errors in espree - * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree - * does not actually error on them and will produce an AST. - */ - 'invalid-defaults-object-assign' // babel parse errors - ] - }), - - createFixturePatternConfigFor('javascript/destructuring-and-arrowFunctions'), - createFixturePatternConfigFor('javascript/destructuring-and-blockBindings'), - createFixturePatternConfigFor('javascript/destructuring-and-defaultParams'), - createFixturePatternConfigFor('javascript/destructuring-and-forOf'), - - createFixturePatternConfigFor('javascript/destructuring-and-spread', { - ignore: [ - /** - * Expected babel parse errors - all of these files below produce parse errors in espree - * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree - * does not actually error on them and will produce an AST. - */ - 'error-complex-destructured-spread-first', // babel parse errors - 'not-final-array' // babel parse errors - ] - }), - - createFixturePatternConfigFor('javascript/experimentalAsyncIteration'), - createFixturePatternConfigFor('javascript/experimentalDynamicImport'), - createFixturePatternConfigFor('javascript/exponentiationOperators'), - createFixturePatternConfigFor('javascript/experimentalOptionalCatchBinding'), - - createFixturePatternConfigFor('javascript/for'), - createFixturePatternConfigFor('javascript/forIn', { - ignore: [ - /** - * Error: AST difference - * tsep: AssignmentExpression - * babel: AssignmentPattern - */ - 'for-in-with-bare-assigment', - /** - * Expected babel parse errors - all of these files below produce parse errors in espree - * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree - * does not actually error on them and will produce an AST. - */ - 'for-in-with-assigment' // babel parse errors - ] - }), - createFixturePatternConfigFor('javascript/forOf', { - ignore: [ - /** - * TypeScript, espree and acorn parse this fine - esprima, flow and babel do not... - */ - 'for-of-with-function-initializer' // babel parse errors - ] - }), - - createFixturePatternConfigFor('javascript/generators'), - createFixturePatternConfigFor('javascript/globalReturn'), - - createFixturePatternConfigFor('javascript/modules', { - ignore: [ - /** - * Expected babel parse errors - all of these files below produce parse errors in espree - * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree - * does not actually error on them and will produce an AST. - */ - 'invalid-export-named-default', // babel parse errors - 'invalid-import-default-module-specifier', // babel parse errors - 'invalid-import-module-specifier' // babel parse errors - ], - ignoreSourceType: ['error-function', 'error-strict', 'error-delete'] - }), - - createFixturePatternConfigFor('javascript/newTarget', { - ignore: [ - /** - * Expected babel parse errors - all of these files below produce parse errors in espree - * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree - * does not actually error on them and will produce an AST. - */ - 'invalid-new-target', // babel parse errors - 'invalid-unknown-property' // babel parse errors - ] - }), - - createFixturePatternConfigFor('javascript/objectLiteral'), - createFixturePatternConfigFor('javascript/objectLiteralComputedProperties'), - - createFixturePatternConfigFor('javascript/objectLiteralDuplicateProperties', { - ignore: [ - /** - * Expected babel parse errors - all of these files below produce parse errors in espree - * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree - * does not actually error on them and will produce an AST. - */ - 'error-proto-property', // babel parse errors - 'error-proto-string-property' // babel parse errors - ] - }), - - createFixturePatternConfigFor('javascript/objectLiteralShorthandMethods'), - createFixturePatternConfigFor('javascript/objectLiteralShorthandProperties'), - createFixturePatternConfigFor('javascript/octalLiterals'), - createFixturePatternConfigFor('javascript/regex'), - createFixturePatternConfigFor('javascript/regexUFlag'), - createFixturePatternConfigFor('javascript/regexYFlag'), - - createFixturePatternConfigFor('javascript/restParams', { - ignore: [ - /** - * Expected babel parse errors - all of these files below produce parse errors in espree - * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree - * does not actually error on them and will produce an AST. - */ - 'error-no-default', // babel parse errors - 'error-not-last' // babel parse errors - ] - }), - - createFixturePatternConfigFor('javascript/spread'), - createFixturePatternConfigFor('javascript/unicodeCodePointEscapes'), - - /* ================================================== */ - - createFixturePatternConfigFor('jsx', { - ignore: jsxFilesWithKnownIssues - }), - createFixturePatternConfigFor('jsx-useJSXTextNode'), - - /* ================================================== */ +tester.addFixturePatternConfig('javascript/directives'); - /** - * TSX-SPECIFIC FILES - */ +tester.addFixturePatternConfig('javascript/experimentalObjectRestSpread', { + ignore: [ + /** + * Trailing comma is not permitted after a "RestElement" in Babel + */ + 'invalid-rest-trailing-comma' + ] +}); - createFixturePatternConfigFor('tsx', { - fileType: 'tsx' - }), +tester.addFixturePatternConfig('javascript/arrowFunctions', { + ignore: [ + /** + * Expected babel parse errors - all of these files below produce parse errors in espree + * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree + * does not actually error on them and will produce an AST. + */ + 'error-dup-params', // babel parse errors + 'error-strict-dup-params', // babel parse errors + 'error-strict-octal', // babel parse errors + 'error-two-lines' // babel parse errors + ] +}); - /* ================================================== */ +tester.addFixturePatternConfig('javascript/bigIntLiterals'); +tester.addFixturePatternConfig('javascript/binaryLiterals'); +tester.addFixturePatternConfig('javascript/blockBindings'); + +tester.addFixturePatternConfig('javascript/classes', { + ignore: [ + /** + * super() is being used outside of constructor. Other parsers (e.g. espree, acorn) do not error on this. + */ + 'class-one-method-super', // babel parse errors + /** + * Expected babel parse errors - all of these files below produce parse errors in espree + * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree + * does not actually error on them and will produce an AST. + */ + 'invalid-class-declaration', // babel parse errors + 'invalid-class-setter-declaration' // babel parse errors + ] +}); - /** - * TYPESCRIPT-SPECIFIC FILES - */ +tester.addFixturePatternConfig('javascript/defaultParams'); + +tester.addFixturePatternConfig('javascript/destructuring', { + ignore: [ + /** + * Expected babel parse errors - all of these files below produce parse errors in espree + * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree + * does not actually error on them and will produce an AST. + */ + 'invalid-defaults-object-assign' // babel parse errors + ] +}); - createFixturePatternConfigFor('typescript/babylon-convergence', { - fileType: 'ts' - }), - - createFixturePatternConfigFor('typescript/basics', { - fileType: 'ts', - ignore: [ - /** - * Other babel parse errors relating to invalid syntax. - */ - 'abstract-class-with-abstract-constructor', // babel parse errors - 'class-with-export-parameter-properties', // babel parse errors - 'class-with-implements-and-extends', // babel parse errors - 'class-with-optional-methods', // babel parse errors - 'class-with-static-parameter-properties', // babel parse errors - 'interface-with-all-property-types', // babel parse errors - 'interface-with-construct-signature-with-parameter-accessibility', // babel parse errors - /** - * typescript-estree erroring, but babel not. - */ - 'arrow-function-with-type-parameters', // typescript-estree parse errors - /** - * Babel: ClassDeclaration + abstract: true - * tsep: TSAbstractClassDeclaration - */ - 'abstract-class-with-abstract-properties', - /** - * Babel: ClassProperty + abstract: true - * tsep: TSAbstractClassProperty - */ - 'abstract-class-with-abstract-readonly-property', - /** - * Babel: TSExpressionWithTypeArguments - * tsep: ClassImplements - */ - 'class-with-implements-generic-multiple', - 'class-with-implements-generic', - 'class-with-implements', - 'class-with-extends-and-implements', - /** - * Other major AST differences (e.g. fundamentally different node types) - */ - 'class-with-mixin', - 'function-with-types-assignation', - 'interface-extends-multiple', - 'interface-extends', - 'interface-type-parameters', - 'interface-with-extends-type-parameters', - 'interface-with-generic', - 'interface-with-jsdoc', - 'interface-with-optional-properties', - 'interface-without-type-annotation', - 'typed-this', - 'export-type-function-declaration', - 'abstract-interface', - /** - * Babel bug for optional or abstract methods? - */ - 'abstract-class-with-abstract-method', // babel parse errors - 'abstract-class-with-optional-method', // babel parse errors - 'declare-class-with-optional-method', // babel parse errors - /** - * Awaiting feedback on Babel issue https://github.com/babel/babel/issues/6679 - */ - 'class-with-private-parameter-properties', - 'class-with-protected-parameter-properties', - 'class-with-public-parameter-properties', - 'class-with-readonly-parameter-properties', - /** - * Not yet supported in Babel https://github.com/babel/babel/issues/7749 - */ - 'import-type', - 'import-type-with-type-parameters-in-type-reference', - /** - * babel is not supporting it yet https://github.com/babel/babel/pull/9230 - * Babel: TSTypeReference -> Identifier - * tsep: TSBigIntKeyword - */ - 'typed-keyword-bigint', - /** - * Not yet supported in Babel https://github.com/babel/babel/issues/9228 - * Directive field is not added to module and namespace - */ - 'directive-in-module', - /** - * Not yet supported in Babel https://github.com/babel/babel/issues/9228 - * Directive field is not added to module and namespace - */ - 'directive-in-namespace', - /** - * there is difference in range between babel and tsep - */ - 'type-assertion' - ], - ignoreSourceType: [ - // https://github.com/babel/babel/issues/9213 - 'export-assignment', - 'import-equal-declaration', - 'import-export-equal-declaration' - ] - }), - - createFixturePatternConfigFor('typescript/decorators/accessor-decorators', { - fileType: 'ts' - }), - createFixturePatternConfigFor('typescript/decorators/class-decorators', { - fileType: 'ts' - }), - createFixturePatternConfigFor('typescript/decorators/method-decorators', { - fileType: 'ts' - }), - createFixturePatternConfigFor('typescript/decorators/parameter-decorators', { - fileType: 'ts' - }), - createFixturePatternConfigFor('typescript/decorators/property-decorators', { - fileType: 'ts' - }), - - createFixturePatternConfigFor('typescript/expressions', { - fileType: 'ts', - ignore: [ - /** - * there is difference in range between babel and tsep - */ - 'tagged-template-expression-type-arguments' - ] - }), - - createFixturePatternConfigFor('typescript/errorRecovery', { - fileType: 'ts', - ignore: [ - /** - * AST difference - */ - 'interface-empty-extends', - /** - * TypeScript-specific tests taken from "errorRecovery". Babel is not being as forgiving as the TypeScript compiler here. - */ - 'class-empty-extends-implements', // babel parse errors - 'class-empty-extends', // babel parse errors - 'decorator-on-enum-declaration', // babel parse errors - 'decorator-on-interface-declaration', // babel parse errors - 'interface-property-modifiers', // babel parse errors - 'enum-with-keywords', // babel parse errors - 'solo-const' // babel parse errors - ] - }), - - createFixturePatternConfigFor('typescript/types', { - fileType: 'ts' - }), - - createFixturePatternConfigFor('typescript/declare', { - fileType: 'ts', - ignore: [ - /** - * AST difference - * tsep: heritage = [] - * babel: heritage = undefined - */ - 'interface', - /** - * AST difference - * tsep: TSAbstractClassDeclaration - * babel: ClassDeclaration[abstract=true] - */ - 'abstract-class' - ] - }), - - createFixturePatternConfigFor('typescript/namespaces-and-modules', { - fileType: 'ts', - ignore: [ - /** - * Minor AST difference - */ - 'nested-internal-module', - /** - * Babel: TSDeclareFunction - * tsep: TSNamespaceFunctionDeclaration - */ - 'declare-namespace-with-exported-function' - ], - ignoreSourceType: [ - 'module-with-default-exports', - 'ambient-module-declaration-with-import' - ] - }) -]; +tester.addFixturePatternConfig('javascript/destructuring-and-arrowFunctions'); +tester.addFixturePatternConfig('javascript/destructuring-and-blockBindings'); +tester.addFixturePatternConfig('javascript/destructuring-and-defaultParams'); +tester.addFixturePatternConfig('javascript/destructuring-and-forOf'); + +tester.addFixturePatternConfig('javascript/destructuring-and-spread', { + ignore: [ + /** + * Expected babel parse errors - all of these files below produce parse errors in espree + * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree + * does not actually error on them and will produce an AST. + */ + 'error-complex-destructured-spread-first', // babel parse errors + 'not-final-array' // babel parse errors + ] +}); + +tester.addFixturePatternConfig('javascript/experimentalAsyncIteration'); +tester.addFixturePatternConfig('javascript/experimentalDynamicImport'); +tester.addFixturePatternConfig('javascript/exponentiationOperators'); +tester.addFixturePatternConfig('javascript/experimentalOptionalCatchBinding'); + +tester.addFixturePatternConfig('javascript/for'); +tester.addFixturePatternConfig('javascript/forIn', { + ignore: [ + /** + * Error: AST difference + * tsep: AssignmentExpression + * babel: AssignmentPattern + */ + 'for-in-with-bare-assigment', + /** + * Expected babel parse errors - all of these files below produce parse errors in espree + * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree + * does not actually error on them and will produce an AST. + */ + 'for-in-with-assigment' // babel parse errors + ] +}); +tester.addFixturePatternConfig('javascript/forOf', { + ignore: [ + /** + * TypeScript, espree and acorn parse this fine - esprima, flow and babel do not... + */ + 'for-of-with-function-initializer' // babel parse errors + ] +}); + +tester.addFixturePatternConfig('javascript/generators'); +tester.addFixturePatternConfig('javascript/globalReturn'); + +tester.addFixturePatternConfig('javascript/modules', { + ignore: [ + /** + * Expected babel parse errors - all of these files below produce parse errors in espree + * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree + * does not actually error on them and will produce an AST. + */ + 'invalid-export-named-default', // babel parse errors + 'invalid-import-default-module-specifier', // babel parse errors + 'invalid-import-module-specifier' // babel parse errors + ], + ignoreSourceType: ['error-function', 'error-strict', 'error-delete'] +}); + +tester.addFixturePatternConfig('javascript/newTarget', { + ignore: [ + /** + * Expected babel parse errors - all of these files below produce parse errors in espree + * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree + * does not actually error on them and will produce an AST. + */ + 'invalid-new-target', // babel parse errors + 'invalid-unknown-property' // babel parse errors + ] +}); + +tester.addFixturePatternConfig('javascript/objectLiteral'); +tester.addFixturePatternConfig('javascript/objectLiteralComputedProperties'); + +tester.addFixturePatternConfig('javascript/objectLiteralDuplicateProperties', { + ignore: [ + /** + * Expected babel parse errors - all of these files below produce parse errors in espree + * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree + * does not actually error on them and will produce an AST. + */ + 'error-proto-property', // babel parse errors + 'error-proto-string-property' // babel parse errors + ] +}); + +tester.addFixturePatternConfig('javascript/objectLiteralShorthandMethods'); +tester.addFixturePatternConfig('javascript/objectLiteralShorthandProperties'); +tester.addFixturePatternConfig('javascript/octalLiterals'); +tester.addFixturePatternConfig('javascript/regex'); +tester.addFixturePatternConfig('javascript/regexUFlag'); +tester.addFixturePatternConfig('javascript/regexYFlag'); + +tester.addFixturePatternConfig('javascript/restParams', { + ignore: [ + /** + * Expected babel parse errors - all of these files below produce parse errors in espree + * as well, but the TypeScript compiler is so forgiving during parsing that typescript-estree + * does not actually error on them and will produce an AST. + */ + 'error-no-default', // babel parse errors + 'error-not-last' // babel parse errors + ] +}); + +tester.addFixturePatternConfig('javascript/spread'); +tester.addFixturePatternConfig('javascript/unicodeCodePointEscapes'); + +/* ================================================== */ + +tester.addFixturePatternConfig('jsx', { + ignore: jsxFilesWithKnownIssues +}); +tester.addFixturePatternConfig('jsx-useJSXTextNode'); + +/* ================================================== */ /** - * Add in all the fixtures which need to be parsed with sourceType: "module" + * TSX-SPECIFIC FILES */ -fixturePatternConfigsToTest = ([] as FixturePatternConfig[]).concat( - fixturePatternConfigsToTest, - fixturesRequiringSourceTypeModule -); -const fixturesToTest: Fixture[] = []; +tester.addFixturePatternConfig('tsx', { + fileType: 'tsx' +}); + +/* ================================================== */ /** - * Resolve the glob patterns into actual Fixture files that we can run assertions for... + * TYPESCRIPT-SPECIFIC FILES */ -fixturePatternConfigsToTest.forEach(fixturePatternConfig => { - /** - * Find the fixture files which match the given pattern - */ - const matchingFixtures = glob.sync( - `${fixturesDirPath}/${fixturePatternConfig.pattern}`, - {} - ); - matchingFixtures.forEach(filename => { - fixturesToTest.push({ - filename, - ignoreSourceType: fixturePatternConfig.ignoreSourceType, - jsx: fixturePatternConfig.jsx - }); - }); + +tester.addFixturePatternConfig('typescript/babylon-convergence', { + fileType: 'ts' +}); + +tester.addFixturePatternConfig('typescript/basics', { + fileType: 'ts', + ignore: [ + /** + * Other babel parse errors relating to invalid syntax. + */ + 'abstract-class-with-abstract-constructor', // babel parse errors + 'class-with-export-parameter-properties', // babel parse errors + 'class-with-implements-and-extends', // babel parse errors + 'class-with-optional-methods', // babel parse errors + 'class-with-static-parameter-properties', // babel parse errors + 'interface-with-all-property-types', // babel parse errors + 'interface-with-construct-signature-with-parameter-accessibility', // babel parse errors + /** + * there is difference in range between babel and tsep + */ + 'arrow-function-with-type-parameters', // typescript-estree parse errors + /** + * Babel: ClassDeclaration + abstract: true + * tsep: TSAbstractClassDeclaration + */ + 'abstract-class-with-abstract-properties', + /** + * Babel: ClassProperty + abstract: true + * tsep: TSAbstractClassProperty + */ + 'abstract-class-with-abstract-readonly-property', + /** + * Babel: TSExpressionWithTypeArguments + * tsep: ClassImplements + */ + 'class-with-implements-generic-multiple', + 'class-with-implements-generic', + 'class-with-implements', + 'class-with-extends-and-implements', + /** + * Other major AST differences (e.g. fundamentally different node types) + */ + 'class-with-mixin', + 'function-with-types-assignation', + 'interface-extends-multiple', + 'interface-extends', + 'interface-type-parameters', + 'interface-with-extends-type-parameters', + 'interface-with-generic', + 'interface-with-jsdoc', + 'interface-with-optional-properties', + 'interface-without-type-annotation', + 'typed-this', + 'export-type-function-declaration', + 'abstract-interface', + /** + * Babel bug for optional or abstract methods? + */ + 'abstract-class-with-abstract-method', // babel parse errors + 'abstract-class-with-optional-method', // babel parse errors + 'declare-class-with-optional-method', // babel parse errors + /** + * Awaiting feedback on Babel issue https://github.com/babel/babel/issues/6679 + */ + 'class-with-private-parameter-properties', + 'class-with-protected-parameter-properties', + 'class-with-public-parameter-properties', + 'class-with-readonly-parameter-properties', + /** + * Not yet supported in Babel https://github.com/babel/babel/issues/7749 + */ + 'import-type', + 'import-type-with-type-parameters-in-type-reference', + /** + * babel is not supporting it yet https://github.com/babel/babel/pull/9230 + * Babel: TSTypeReference -> Identifier + * tsep: TSBigIntKeyword + */ + 'typed-keyword-bigint', + /** + * Not yet supported in Babel https://github.com/babel/babel/issues/9228 + * Directive field is not added to module and namespace + */ + 'directive-in-module', + /** + * Not yet supported in Babel https://github.com/babel/babel/issues/9228 + * Directive field is not added to module and namespace + */ + 'directive-in-namespace', + /** + * there is difference in range between babel and tsep + */ + 'type-assertion' + ], + ignoreSourceType: [ + // https://github.com/babel/babel/issues/9213 + 'export-assignment', + 'import-equal-declaration', + 'import-export-equal-declaration' + ] +}); + +tester.addFixturePatternConfig('typescript/decorators/accessor-decorators', { + fileType: 'ts' }); +tester.addFixturePatternConfig('typescript/decorators/class-decorators', { + fileType: 'ts' +}); +tester.addFixturePatternConfig('typescript/decorators/method-decorators', { + fileType: 'ts' +}); +tester.addFixturePatternConfig('typescript/decorators/parameter-decorators', { + fileType: 'ts' +}); +tester.addFixturePatternConfig('typescript/decorators/property-decorators', { + fileType: 'ts' +}); + +tester.addFixturePatternConfig('typescript/expressions', { + fileType: 'ts', + ignore: [ + /** + * there is difference in range between babel and tsep + */ + 'tagged-template-expression-type-arguments' + ] +}); + +tester.addFixturePatternConfig('typescript/errorRecovery', { + fileType: 'ts', + ignore: [ + /** + * AST difference + */ + 'interface-empty-extends', + /** + * TypeScript-specific tests taken from "errorRecovery". Babel is not being as forgiving as the TypeScript compiler here. + */ + 'class-empty-extends-implements', // babel parse errors + 'class-empty-extends', // babel parse errors + 'decorator-on-enum-declaration', // babel parse errors + 'decorator-on-interface-declaration', // babel parse errors + 'interface-property-modifiers', // babel parse errors + 'enum-with-keywords', // babel parse errors + 'solo-const' // babel parse errors + ] +}); + +tester.addFixturePatternConfig('typescript/types', { + fileType: 'ts' +}); + +tester.addFixturePatternConfig('typescript/declare', { + fileType: 'ts', + ignore: [ + /** + * AST difference + * tsep: heritage = [] + * babel: heritage = undefined + */ + 'interface', + /** + * AST difference + * tsep: TSAbstractClassDeclaration + * babel: ClassDeclaration[abstract=true] + */ + 'abstract-class' + ] +}); + +tester.addFixturePatternConfig('typescript/namespaces-and-modules', { + fileType: 'ts', + ignore: [ + /** + * Minor AST difference + */ + 'nested-internal-module', + /** + * Babel: TSDeclareFunction + * tsep: TSNamespaceFunctionDeclaration + */ + 'declare-namespace-with-exported-function' + ], + ignoreSourceType: [ + 'module-with-default-exports', + 'ambient-module-declaration-with-import' + ] +}); + +const fixturesToTest = tester.getFixtures(); export { fixturesToTest }; From af73af23872a47c3db308fe329b51e2c5588945f Mon Sep 17 00:00:00 2001 From: Armano Date: Fri, 4 Jan 2019 18:58:56 +0100 Subject: [PATCH 28/30] fix: parsing comments in jsx (#82) --- src/convert-comments.ts | 22 +- .../comments/jsx-comment-after-jsx.src.js | 5 + .../jsx-comment-after-self-closing-jsx.src.js | 5 + ...jsx-text-with-multiline-non-comment.src.js | 9 + .../comments/jsx-text-with-url.src.js | 1 + .../comments/jsx-with-greather-than.src.js | 4 + .../comments/jsx-with-operators.src.js | 4 + .../type-assertion-regression-test.src.ts | 2 + tests/lib/__snapshots__/comments.ts.snap | 5873 ++++++++++++++--- .../semantic-diagnostics-enabled.ts.snap | 56 + tests/lib/comments.ts | 21 +- 11 files changed, 5224 insertions(+), 778 deletions(-) create mode 100644 tests/fixtures/comments/jsx-comment-after-jsx.src.js create mode 100644 tests/fixtures/comments/jsx-comment-after-self-closing-jsx.src.js create mode 100644 tests/fixtures/comments/jsx-text-with-multiline-non-comment.src.js create mode 100644 tests/fixtures/comments/jsx-text-with-url.src.js create mode 100644 tests/fixtures/comments/jsx-with-greather-than.src.js create mode 100644 tests/fixtures/comments/jsx-with-operators.src.js create mode 100644 tests/fixtures/comments/type-assertion-regression-test.src.ts diff --git a/src/convert-comments.ts b/src/convert-comments.ts index 25d4287..dda9ceb 100644 --- a/src/convert-comments.ts +++ b/src/convert-comments.ts @@ -107,7 +107,12 @@ export function convertComments( * Create a TypeScript Scanner, with skipTrivia set to false so that * we can parse the comments */ - const triviaScanner = ts.createScanner(ast.languageVersion, false, 0, code); + const triviaScanner = ts.createScanner( + ast.languageVersion, + false, + ast.languageVariant, + code + ); let kind = triviaScanner.scan(); while (kind !== ts.SyntaxKind.EndOfFileToken) { @@ -123,8 +128,21 @@ export function convertComments( comments.push(comment); break; } + case ts.SyntaxKind.GreaterThanToken: + container = nodeUtils.getNodeContainer(ast, start, end); + if ( + container && + container.parent && + container.parent.kind === ts.SyntaxKind.JsxOpeningElement && + container.parent.parent && + container.parent.parent.kind === ts.SyntaxKind.JsxElement + ) { + kind = triviaScanner.reScanJsxToken(); + continue; + } + break; case ts.SyntaxKind.CloseBraceToken: - container = nodeUtils.getNodeContainer(ast, start, end) as ts.Node; + container = nodeUtils.getNodeContainer(ast, start, end); if ( container.kind === ts.SyntaxKind.TemplateMiddle || diff --git a/tests/fixtures/comments/jsx-comment-after-jsx.src.js b/tests/fixtures/comments/jsx-comment-after-jsx.src.js new file mode 100644 index 0000000..32c4c53 --- /dev/null +++ b/tests/fixtures/comments/jsx-comment-after-jsx.src.js @@ -0,0 +1,5 @@ +const pure = () => { + return ( + // Foo + ); +} diff --git a/tests/fixtures/comments/jsx-comment-after-self-closing-jsx.src.js b/tests/fixtures/comments/jsx-comment-after-self-closing-jsx.src.js new file mode 100644 index 0000000..ef446a5 --- /dev/null +++ b/tests/fixtures/comments/jsx-comment-after-self-closing-jsx.src.js @@ -0,0 +1,5 @@ +const pure = () => { + return ( + // Foo + ); +} diff --git a/tests/fixtures/comments/jsx-text-with-multiline-non-comment.src.js b/tests/fixtures/comments/jsx-text-with-multiline-non-comment.src.js new file mode 100644 index 0000000..c14b0ae --- /dev/null +++ b/tests/fixtures/comments/jsx-text-with-multiline-non-comment.src.js @@ -0,0 +1,9 @@ +const pure = () => { + return ( + + /** + * test + */ + + ); +} diff --git a/tests/fixtures/comments/jsx-text-with-url.src.js b/tests/fixtures/comments/jsx-text-with-url.src.js new file mode 100644 index 0000000..ab57e8d --- /dev/null +++ b/tests/fixtures/comments/jsx-text-with-url.src.js @@ -0,0 +1 @@ +const link = (http://example.com); diff --git a/tests/fixtures/comments/jsx-with-greather-than.src.js b/tests/fixtures/comments/jsx-with-greather-than.src.js new file mode 100644 index 0000000..6294ad6 --- /dev/null +++ b/tests/fixtures/comments/jsx-with-greather-than.src.js @@ -0,0 +1,4 @@ +if (1 >/* Test */2) { + test( 2 >> 3); + const foo = // +} diff --git a/tests/fixtures/comments/jsx-with-operators.src.js b/tests/fixtures/comments/jsx-with-operators.src.js new file mode 100644 index 0000000..f14ac69 --- /dev/null +++ b/tests/fixtures/comments/jsx-with-operators.src.js @@ -0,0 +1,4 @@ +if (1 > 3); + const foo = // +} diff --git a/tests/fixtures/comments/type-assertion-regression-test.src.ts b/tests/fixtures/comments/type-assertion-regression-test.src.ts new file mode 100644 index 0000000..5b14e97 --- /dev/null +++ b/tests/fixtures/comments/type-assertion-regression-test.src.ts @@ -0,0 +1,2 @@ +const foo = // test + bar; diff --git a/tests/lib/__snapshots__/comments.ts.snap b/tests/lib/__snapshots__/comments.ts.snap index 41309c3..7c05def 100644 --- a/tests/lib/__snapshots__/comments.ts.snap +++ b/tests/lib/__snapshots__/comments.ts.snap @@ -1912,7 +1912,7 @@ Object { } `; -exports[`Comments fixtures/jsx-tag-comments.src 1`] = ` +exports[`Comments fixtures/jsx-comment-after-jsx.src 1`] = ` Object { "body": Array [ Object { @@ -1942,68 +1942,46 @@ 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": "Literal", - "value": " - ", - }, - ], + "children": Array [], "closingElement": Object { "loc": Object { "end": Object { - "column": 14, - "line": 7, + "column": 19, + "line": 3, }, "start": Object { - "column": 8, - "line": 7, + "column": 13, + "line": 3, }, }, "name": Object { "loc": Object { "end": Object { - "column": 13, - "line": 7, + "column": 18, + "line": 3, }, "start": Object { - "column": 10, - "line": 7, + "column": 15, + "line": 3, }, }, "name": "Foo", "range": Array [ - 114, - 117, + 49, + 52, ], "type": "JSXIdentifier", }, "range": Array [ - 112, - 118, + 47, + 53, ], "type": "JSXClosingElement", }, "loc": Object { "end": Object { - "column": 14, - "line": 7, + "column": 19, + "line": 3, }, "start": Object { "column": 8, @@ -2014,8 +1992,8 @@ Object { "attributes": Array [], "loc": Object { "end": Object { - "column": 9, - "line": 6, + "column": 13, + "line": 3, }, "start": Object { "column": 8, @@ -2042,21 +2020,21 @@ Object { }, "range": Array [ 42, - 103, + 47, ], "selfClosing": false, "type": "JSXOpeningElement", }, "range": Array [ 42, - 118, + 53, ], "type": "JSXElement", }, "loc": Object { "end": Object { "column": 6, - "line": 8, + "line": 4, }, "start": Object { "column": 4, @@ -2065,7 +2043,7 @@ Object { }, "range": Array [ 25, - 125, + 67, ], "type": "ReturnStatement", }, @@ -2073,7 +2051,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 9, + "line": 5, }, "start": Object { "column": 19, @@ -2082,7 +2060,7 @@ Object { }, "range": Array [ 19, - 127, + 69, ], "type": "BlockStatement", }, @@ -2092,7 +2070,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 9, + "line": 5, }, "start": Object { "column": 13, @@ -2102,14 +2080,14 @@ Object { "params": Array [], "range": Array [ 13, - 127, + 69, ], "type": "ArrowFunctionExpression", }, "loc": Object { "end": Object { "column": 1, - "line": 9, + "line": 5, }, "start": Object { "column": 6, @@ -2118,7 +2096,7 @@ Object { }, "range": Array [ 6, - 127, + 69, ], "type": "VariableDeclarator", }, @@ -2127,7 +2105,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 9, + "line": 5, }, "start": Object { "column": 0, @@ -2136,7 +2114,7 @@ Object { }, "range": Array [ 0, - 127, + 69, ], "type": "VariableDeclaration", }, @@ -2145,44 +2123,26 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 4, + "column": 26, + "line": 3, }, "start": Object { - "column": 12, - "line": 4, + "column": 20, + "line": 3, }, }, "range": Array [ - 59, - 68, + 54, + 60, ], "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 ", + "value": " Foo", }, ], "loc": Object { "end": Object { "column": 0, - "line": 11, + "line": 6, }, "start": Object { "column": 0, @@ -2191,7 +2151,7 @@ Object { }, "range": Array [ 0, - 129, + 70, ], "sourceType": "script", "tokens": Array [ @@ -2396,17 +2356,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, - "line": 6, + "column": 13, + "line": 3, }, "start": Object { - "column": 8, - "line": 6, + "column": 12, + "line": 3, }, }, "range": Array [ - 102, - 103, + 46, + 47, ], "type": "Punctuator", "value": ">", @@ -2414,36 +2374,17 @@ Object { 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, + "column": 14, + "line": 3, }, "start": Object { - "column": 8, - "line": 7, + "column": 13, + "line": 3, }, }, "range": Array [ - 112, - 113, + 47, + 48, ], "type": "Punctuator", "value": "<", @@ -2451,17 +2392,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, - "line": 7, + "column": 15, + "line": 3, }, "start": Object { - "column": 9, - "line": 7, + "column": 14, + "line": 3, }, }, "range": Array [ - 113, - 114, + 48, + 49, ], "type": "Punctuator", "value": "/", @@ -2469,17 +2410,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, - "line": 7, + "column": 18, + "line": 3, }, "start": Object { - "column": 10, - "line": 7, + "column": 15, + "line": 3, }, }, "range": Array [ - 114, - 117, + 49, + 52, ], "type": "JSXIdentifier", "value": "Foo", @@ -2487,17 +2428,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, - "line": 7, + "column": 19, + "line": 3, }, "start": Object { - "column": 13, - "line": 7, + "column": 18, + "line": 3, }, }, "range": Array [ - 117, - 118, + 52, + 53, ], "type": "Punctuator", "value": ">", @@ -2506,16 +2447,16 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 8, + "line": 4, }, "start": Object { "column": 4, - "line": 8, + "line": 4, }, }, "range": Array [ - 123, - 124, + 65, + 66, ], "type": "Punctuator", "value": ")", @@ -2524,16 +2465,16 @@ Object { "loc": Object { "end": Object { "column": 6, - "line": 8, + "line": 4, }, "start": Object { "column": 5, - "line": 8, + "line": 4, }, }, "range": Array [ - 124, - 125, + 66, + 67, ], "type": "Punctuator", "value": ";", @@ -2542,16 +2483,16 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 9, + "line": 5, }, "start": Object { "column": 0, - "line": 9, + "line": 5, }, }, "range": Array [ - 126, - 127, + 68, + 69, ], "type": "Punctuator", "value": "}", @@ -2561,50 +2502,7 @@ Object { } `; -exports[`Comments fixtures/line-comment-with-block-syntax.src 1`] = ` -Object { - "body": Array [], - "comments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "type": "Line", - "value": " /*test*/", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 12, - 12, - ], - "sourceType": "script", - "tokens": Array [], - "type": "Program", -} -`; - -exports[`Comments fixtures/mix-line-and-block-comments.src 1`] = ` +exports[`Comments fixtures/jsx-comment-after-self-closing-jsx.src 1`] = ` Object { "body": Array [ Object { @@ -2613,71 +2511,166 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, - }, + "column": 6, + "line": 1, + }, }, - "name": "zzz", + "name": "pure", "range": Array [ + 6, 10, - 13, ], "type": "Identifier", }, "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", + }, + "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": 21, - "line": 2, + "column": 1, + "line": 5, }, "start": Object { - "column": 18, - "line": 2, + "column": 13, + "line": 1, }, }, + "params": Array [], "range": Array [ - 24, - 27, + 13, + 65, ], - "raw": "777", - "type": "Literal", - "value": 777, + "type": "ArrowFunctionExpression", }, "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 1, + "line": 5, }, "start": Object { - "column": 4, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ - 10, - 27, + 6, + 65, ], "type": "VariableDeclarator", }, ], - "kind": "var", + "kind": "const", "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 1, + "line": 5, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 6, - 28, + 0, + 65, ], "type": "VariableDeclaration", }, @@ -2686,124 +2679,88 @@ Object { 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, + "column": 22, "line": 3, }, "start": Object { - "column": 0, + "column": 16, "line": 3, }, }, "range": Array [ - 29, - 34, + 50, + 56, ], "type": "Line", - "value": "bar", + "value": " Foo", }, ], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 6, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 6, - 35, + 0, + 66, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 6, - 9, + 0, + 5, ], "type": "Keyword", - "value": "var", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ + 6, 10, - 13, ], "type": "Identifier", - "value": "zzz", + "value": "pure", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 22, - 23, + 11, + 12, ], "type": "Punctuator", "value": "=", @@ -2811,243 +2768,243 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 24, - 27, + 13, + 14, ], - "type": "Numeric", - "value": "777", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 27, - 28, + 14, + 15, ], "type": "Punctuator", - "value": ";", + "value": ")", }, - ], - "type": "Program", -} -`; - -exports[`Comments fixtures/no-comment-regex.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "regex", - "range": Array [ - 6, - 11, - ], - "type": "Identifier", - }, - "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", - }, - ], - "kind": "const", "loc": Object { "end": Object { - "column": 34, + "column": 18, "line": 1, }, "start": Object { - "column": 0, + "column": 16, "line": 1, }, }, "range": Array [ - 0, - 34, + 16, + 18, ], - "type": "VariableDeclaration", - }, - ], - "comments": Array [], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "=>", }, - }, - "range": Array [ - 0, - 35, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 20, "line": 1, }, "start": Object { - "column": 0, + "column": 19, "line": 1, }, }, "range": Array [ - 0, - 5, + 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": "const", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 6, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 6, - 11, + 32, + 33, ], - "type": "Identifier", - "value": "regex", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "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": 1, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, }, }, "range": Array [ - 12, - 13, + 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": "=", + "value": "/", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 15, + "line": 3, }, "start": Object { "column": 14, - "line": 1, + "line": 3, }, }, "range": Array [ - 14, - 33, + 48, + 49, ], - "regex": Object { - "flags": "", - "pattern": "no comment\\\\/**foo", + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, }, - "type": "RegularExpression", - "value": "/no comment\\\\/**foo/", + "range": Array [ + 61, + 62, + ], + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 6, + "line": 4, }, "start": Object { - "column": 33, - "line": 1, + "column": 5, + "line": 4, }, }, "range": Array [ - 33, - 34, + 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", } `; -exports[`Comments fixtures/no-comment-template.src 1`] = ` +exports[`Comments fixtures/jsx-tag-comments.src 1`] = ` Object { "body": Array [ Object { @@ -3056,7 +3013,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 9, + "column": 10, "line": 1, }, "start": Object { @@ -3064,10 +3021,4080 @@ Object { "line": 1, }, }, - "name": "str", + "name": "pure", "range": Array [ 6, - 9, + 10, + ], + "type": "Identifier", + }, + "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": "Literal", + "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", + }, + "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, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 127, + ], + "type": "VariableDeclarator", + }, + ], + "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", +} +`; + +exports[`Comments fixtures/jsx-text-with-multiline-non-comment.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "pure", + "range": Array [ + 6, + 10, + ], + "type": "Identifier", + }, + "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": "Literal", + "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", + }, + "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, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 93, + ], + "type": "VariableDeclarator", + }, + ], + "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", +} +`; + +exports[`Comments fixtures/jsx-text-with-url.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "link", + "range": Array [ + 6, + 10, + ], + "type": "Identifier", + }, + "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": "Literal", + "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", + }, + "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", + }, + ], + "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", +} +`; + +exports[`Comments fixtures/jsx-with-greather-than.src 1`] = ` +Object { + "body": Array [ + Object { + "alternate": null, + "consequent": Object { + "body": Array [ + Object { + "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 { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "test", + "range": Array [ + 24, + 28, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 24, + 37, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 24, + 38, + ], + "type": "ExpressionStatement", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "name": "foo", + "range": Array [ + 47, + 50, + ], + "type": "Identifier", + }, + "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": "Literal", + "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", + }, + "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", + }, + ], + "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", +} +`; + +exports[`Comments fixtures/jsx-with-operators.src 1`] = ` +Object { + "body": Array [ + Object { + "alternate": null, + "consequent": Object { + "body": Array [ + Object { + "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 { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "test", + "range": Array [ + 24, + 28, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 24, + 37, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 24, + 38, + ], + "type": "ExpressionStatement", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "name": "foo", + "range": Array [ + 47, + 50, + ], + "type": "Identifier", + }, + "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": "Literal", + "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", + }, + "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", + }, + ], + "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", +} +`; + +exports[`Comments fixtures/line-comment-with-block-syntax.src 1`] = ` +Object { + "body": Array [], + "comments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "type": "Line", + "value": " /*test*/", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 12, + 12, + ], + "sourceType": "script", + "tokens": Array [], + "type": "Program", +} +`; + +exports[`Comments fixtures/mix-line-and-block-comments.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "zzz", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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", +} +`; + +exports[`Comments fixtures/no-comment-regex.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "regex", + "range": Array [ + 6, + 11, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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", +} +`; + +exports[`Comments fixtures/no-comment-template.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "str", + "range": Array [ + 6, + 9, ], "type": "Identifier", }, @@ -8617,494 +12644,844 @@ Object { "line": 6, }, "start": Object { - "column": 56, - "line": 6, + "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 [ - 194, - 205, + 282, + 283, ], - "type": "Identifier", - "value": "expressions", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 68, - "line": 6, + "column": 1, + "line": 12, }, "start": Object { - "column": 67, - "line": 6, + "column": 0, + "line": 12, }, }, "range": Array [ - 205, - 206, + 285, + 286, ], "type": "Punctuator", - "value": ".", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 74, - "line": 6, + "column": 2, + "line": 12, }, "start": Object { - "column": 68, - "line": 6, + "column": 1, + "line": 12, }, }, "range": Array [ - 206, - 212, + 286, + 287, ], - "type": "Identifier", - "value": "length", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`Comments fixtures/template-string-block.src 1`] = ` +Object { + "body": Array [ Object { + "expression": Object { + "expressions": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "name", + "range": Array [ + 3, + 7, + ], + "type": "Identifier", + }, + ], + "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": 76, - "line": 6, + "column": 10, + "line": 1, }, "start": Object { - "column": 75, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 213, - 214, + 0, + 10, ], - "type": "Punctuator", - "value": "-", + "type": "ExpressionStatement", }, Object { + "body": Array [ + Object { + "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": 78, - "line": 6, + "column": 1, + "line": 5, }, "start": Object { - "column": 77, - "line": 6, + "column": 0, + "line": 2, }, }, "range": Array [ - 215, - 216, + 11, + 64, ], - "type": "Numeric", - "value": "1", + "type": "BlockStatement", }, + ], + "comments": Array [ Object { "loc": Object { "end": Object { - "column": 79, - "line": 6, + "column": 38, + "line": 3, }, "start": Object { - "column": 78, - "line": 6, + "column": 4, + "line": 3, }, }, "range": Array [ - 216, - 217, + 17, + 51, ], - "type": "Punctuator", - "value": "]", + "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": 80, - "line": 6, + "column": 3, + "line": 1, }, "start": Object { - "column": 79, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 217, - 218, + 0, + 3, ], - "type": "Punctuator", - "value": ")", + "type": "Template", + "value": "\`\${", }, Object { "loc": Object { "end": Object { - "column": 81, - "line": 6, + "column": 7, + "line": 1, }, "start": Object { - "column": 80, - "line": 6, + "column": 3, + "line": 1, }, }, "range": Array [ - 218, - 219, + 3, + 7, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "name", }, Object { "loc": Object { "end": Object { "column": 9, - "line": 8, + "line": 1, }, "start": Object { - "column": 8, - "line": 8, + "column": 7, + "line": 1, }, }, "range": Array [ - 254, - 255, + 7, + 9, ], - "type": "Punctuator", - "value": "}", + "type": "Template", + "value": "}\`", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 9, + "column": 10, + "line": 1, }, "start": Object { - "column": 8, - "line": 9, + "column": 9, + "line": 1, }, }, "range": Array [ - 264, - 270, + 9, + 10, ], - "type": "Keyword", - "value": "return", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 9, + "column": 1, + "line": 2, }, "start": Object { - "column": 15, - "line": 9, + "column": 0, + "line": 2, }, }, "range": Array [ - 271, - 276, + 11, + 12, ], - "type": "Boolean", - "value": "false", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 9, + "column": 5, + "line": 4, }, "start": Object { - "column": 20, - "line": 9, + "column": 4, + "line": 4, }, }, "range": Array [ - 276, - 277, + 56, + 57, ], - "type": "Punctuator", - "value": ";", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 10, + "column": 7, + "line": 4, }, "start": Object { - "column": 4, - "line": 10, + "column": 6, + "line": 4, }, }, "range": Array [ - 282, - 283, + 58, + 59, ], "type": "Punctuator", - "value": "}", + "value": "+", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 12, + "column": 9, + "line": 4, }, "start": Object { - "column": 0, - "line": 12, + "column": 8, + "line": 4, }, }, "range": Array [ - 285, - 286, + 60, + 61, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 12, + "column": 10, + "line": 4, }, "start": Object { - "column": 1, - "line": 12, + "column": 9, + "line": 4, }, }, "range": Array [ - 286, - 287, + 61, + 62, ], "type": "Punctuator", "value": ";", }, - ], - "type": "Program", -} -`; - -exports[`Comments fixtures/template-string-block.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "expressions": Array [ - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "name": "name", - "range": Array [ - 3, - 7, - ], - "type": "Identifier", - }, - ], - "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, + "column": 1, + "line": 5, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, - 10, + 63, + 64, ], - "type": "ExpressionStatement", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`Comments fixtures/type-assertion-regression-test.src 1`] = ` +Object { + "body": Array [ Object { - "body": Array [ + "declarations": Array [ Object { - "expression": Object { - "left": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "init": Object { + "expression": Object { "loc": Object { "end": Object { "column": 5, - "line": 4, + "line": 2, }, "start": Object { - "column": 4, - "line": 4, + "column": 2, + "line": 2, }, }, + "name": "bar", "range": Array [ - 56, - 57, + 28, + 31, ], - "raw": "1", - "type": "Literal", - "value": 1, + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 9, - "line": 4, + "column": 5, + "line": 2, }, "start": Object { - "column": 4, - "line": 4, + "column": 12, + "line": 1, }, }, - "operator": "+", "range": Array [ - 56, - 61, + 12, + 31, ], - "right": Object { + "type": "TSTypeAssertion", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 9, - "line": 4, + "column": 16, + "line": 1, }, "start": Object { - "column": 8, - "line": 4, + "column": 13, + "line": 1, }, }, "range": Array [ - 60, - 61, + 13, + 16, ], - "raw": "1", - "type": "Literal", - "value": 1, + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, }, - "type": "BinaryExpression", }, "loc": Object { "end": Object { - "column": 10, - "line": 4, + "column": 5, + "line": 2, }, "start": Object { - "column": 4, - "line": 4, + "column": 6, + "line": 1, }, }, "range": Array [ - 56, - 62, + 6, + 31, ], - "type": "ExpressionStatement", + "type": "VariableDeclarator", }, ], + "kind": "const", "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 6, + "line": 2, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 11, - 64, + 0, + 32, ], - "type": "BlockStatement", + "type": "VariableDeclaration", }, ], "comments": Array [ Object { "loc": Object { "end": Object { - "column": 38, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 18, + "line": 1, }, }, "range": Array [ - 17, - 51, + 18, + 25, ], - "type": "Block", - "value": " TODO comment comment comment ", + "type": "Line", + "value": " test", }, ], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 3, }, "start": Object { "column": 0, @@ -9113,14 +13490,14 @@ Object { }, "range": Array [ 0, - 65, + 33, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -9130,28 +13507,10 @@ Object { }, "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, + 5, ], - "type": "Identifier", - "value": "name", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { @@ -9160,143 +13519,125 @@ Object { "line": 1, }, "start": Object { - "column": 7, + "column": 6, "line": 1, }, }, "range": Array [ - 7, + 6, 9, ], - "type": "Template", - "value": "}\`", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { - "column": 9, + "column": 10, "line": 1, }, }, "range": Array [ - 9, 10, + 11, ], "type": "Punctuator", - "value": ";", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 11, 12, + 13, ], "type": "Punctuator", - "value": "{", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 16, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 13, + "line": 1, }, }, "range": Array [ - 56, - 57, + 13, + 16, ], - "type": "Numeric", - "value": "1", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 4, + "column": 17, + "line": 1, }, "start": Object { - "column": 6, - "line": 4, + "column": 16, + "line": 1, }, }, "range": Array [ - 58, - 59, + 16, + 17, ], "type": "Punctuator", - "value": "+", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 4, + "column": 5, + "line": 2, }, "start": Object { - "column": 8, - "line": 4, + "column": 2, + "line": 2, }, }, "range": Array [ - 60, - 61, + 28, + 31, ], - "type": "Numeric", - "value": "1", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 4, + "column": 6, + "line": 2, }, "start": Object { - "column": 9, - "line": 4, + "column": 5, + "line": 2, }, }, "range": Array [ - 61, - 62, + 31, + 32, ], "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/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap index 504efbb..f54e6aa 100644 --- a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap +++ b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap @@ -17,6 +17,24 @@ Object { } `; +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/jsx-comment-after-jsx.src.js.src 1`] = ` +Object { + "column": 14, + "index": 48, + "lineNumber": 3, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/jsx-comment-after-self-closing-jsx.src.js.src 1`] = ` +Object { + "column": 13, + "index": 47, + "lineNumber": 3, + "message": "'>' expected.", +} +`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/jsx-tag-comments.src.js.src 1`] = ` Object { "column": 9, @@ -26,6 +44,42 @@ Object { } `; +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/jsx-text-with-multiline-non-comment.src.js.src 1`] = ` +Object { + "column": 5, + "index": 81, + "lineNumber": 7, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/jsx-text-with-url.src.js.src 1`] = ` +Object { + "column": 17, + "index": 17, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/jsx-with-greather-than.src.js.src 1`] = ` +Object { + "column": 0, + "index": 69, + "lineNumber": 4, + "message": "Expression expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/jsx-with-operators.src.js.src 1`] = ` +Object { + "column": 0, + "index": 69, + "lineNumber": 4, + "message": "Expression expected.", +} +`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/line-comment-with-block-syntax.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/mix-line-and-block-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; @@ -56,6 +110,8 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" en exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/template-string-block.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/comments/type-assertion-regression-test.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrayLiteral/array-literal-in-lhs.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/javascript/arrayLiteral/array-literals-in-binary-expr.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/tests/lib/comments.ts b/tests/lib/comments.ts index 936b7a2..7ad9695 100644 --- a/tests/lib/comments.ts +++ b/tests/lib/comments.ts @@ -18,10 +18,9 @@ const FIXTURES_DIR = './tests/fixtures/comments'; const testFiles = shelljs .find(FIXTURES_DIR) - .filter(filename => filename.indexOf('.src.js') > -1) - // strip off ".src.js" - .map(filename => - filename.substring(FIXTURES_DIR.length - 1, filename.length - 7) + .filter( + filename => + filename.indexOf('.src.js') > -1 || filename.indexOf('.src.ts') > -1 ); //------------------------------------------------------------------------------ @@ -30,17 +29,19 @@ const testFiles = shelljs describe('Comments', () => { testFiles.forEach(filename => { - const code = shelljs.cat(`${path.resolve(FIXTURES_DIR, filename)}.src.js`); - const config = { + const code = shelljs.cat(path.resolve(filename)); + const config: ParserOptions = { loc: true, range: true, tokens: true, comment: true, - jsx: true + jsx: path.extname(filename) === '.js' }; - it( - `fixtures/${filename}.src`, - createSnapshotTestBlock(code, config as ParserOptions) + // strip off ".src.js" and ".src.ts" + const name = filename.substring( + FIXTURES_DIR.length - 1, + filename.length - 7 ); + it(`fixtures/${name}.src`, createSnapshotTestBlock(code, config)); }); }); From 3ec7fce93bd8722340dc26a56b41ba6163a27e19 Mon Sep 17 00:00:00 2001 From: Armano Date: Fri, 4 Jan 2019 22:01:01 +0100 Subject: [PATCH 29/30] feat: align call and construct signature declarations (#74) BREAKING CHANGE: This changes the AST --- src/ast-node-types.ts | 3 +- src/convert.ts | 15 +- tests/ast-alignment/utils.ts | 26 + .../call-signatures-with-generics.src.ts | 4 + .../typescript/basics/call-signatures.src.ts | 4 + .../semantic-diagnostics-enabled.ts.snap | 4 + tests/lib/__snapshots__/typescript.ts.snap | 1491 ++++++++++++++++- 7 files changed, 1536 insertions(+), 11 deletions(-) create mode 100644 tests/fixtures/typescript/basics/call-signatures-with-generics.src.ts create mode 100644 tests/fixtures/typescript/basics/call-signatures.src.ts diff --git a/src/ast-node-types.ts b/src/ast-node-types.ts index 41ee3fb..7af75da 100644 --- a/src/ast-node-types.ts +++ b/src/ast-node-types.ts @@ -108,7 +108,8 @@ export const AST_NODE_TYPES: { [key: string]: string } = { TSBigIntKeyword: 'TSBigIntKeyword', TSConditionalType: 'TSConditionalType', TSConstructorType: 'TSConstructorType', - TSConstructSignature: 'TSConstructSignature', + TSCallSignatureDeclaration: 'TSCallSignatureDeclaration', + TSConstructSignatureDeclaration: 'TSConstructSignatureDeclaration', TSDeclareKeyword: 'TSDeclareKeyword', TSDeclareFunction: 'TSDeclareFunction', TSEnumDeclaration: 'TSEnumDeclaration', diff --git a/src/convert.ts b/src/convert.ts index 098c3df..c8476a0 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -2450,13 +2450,20 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { break; } - case SyntaxKind.ConstructSignature: { + case SyntaxKind.ConstructSignature: + case SyntaxKind.CallSignature: { Object.assign(result, { - type: AST_NODE_TYPES.TSConstructSignature, - params: convertParameters(node.parameters), - typeAnnotation: node.type ? convertTypeAnnotation(node.type) : null + type: + node.kind === SyntaxKind.ConstructSignature + ? AST_NODE_TYPES.TSConstructSignatureDeclaration + : AST_NODE_TYPES.TSCallSignatureDeclaration, + params: convertParameters(node.parameters) }); + if (node.type) { + (result as any).returnType = convertTypeAnnotation(node.type); + } + if (node.typeParameters) { result.typeParameters = convertTSTypeParametersToTypeParametersDeclaration( node.typeParameters diff --git a/tests/ast-alignment/utils.ts b/tests/ast-alignment/utils.ts index 0345ab5..52bffc8 100644 --- a/tests/ast-alignment/utils.ts +++ b/tests/ast-alignment/utils.ts @@ -142,6 +142,32 @@ export function preprocessBabylonAST(ast: any): any { BooleanLiteral(node: any) { node.type = 'Literal'; node.raw = String(node.value); + }, + /** + * Awaiting feedback on Babel issue https://github.com/babel/babel/issues/9231 + */ + TSCallSignatureDeclaration(node: any) { + if (node.typeAnnotation) { + node.returnType = node.typeAnnotation; + delete node.typeAnnotation; + } + if (node.parameters) { + node.params = node.parameters; + delete node.parameters; + } + }, + /** + * Awaiting feedback on Babel issue https://github.com/babel/babel/issues/9231 + */ + TSConstructSignatureDeclaration(node: any) { + if (node.typeAnnotation) { + node.returnType = node.typeAnnotation; + delete node.typeAnnotation; + } + if (node.parameters) { + node.params = node.parameters; + delete node.parameters; + } } } ); diff --git a/tests/fixtures/typescript/basics/call-signatures-with-generics.src.ts b/tests/fixtures/typescript/basics/call-signatures-with-generics.src.ts new file mode 100644 index 0000000..66abe76 --- /dev/null +++ b/tests/fixtures/typescript/basics/call-signatures-with-generics.src.ts @@ -0,0 +1,4 @@ +type foo = { + (a: string): string + new(a: string): string +} diff --git a/tests/fixtures/typescript/basics/call-signatures.src.ts b/tests/fixtures/typescript/basics/call-signatures.src.ts new file mode 100644 index 0000000..6b9205c --- /dev/null +++ b/tests/fixtures/typescript/basics/call-signatures.src.ts @@ -0,0 +1,4 @@ +type foo = { + (a: string): string + new(a: string): string +} diff --git a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap index f54e6aa..0c91c88 100644 --- a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap +++ b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap @@ -1674,6 +1674,10 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" en exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/async-function-with-var-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/call-signatures.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/call-signatures-with-generics.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-expression.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-multi.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/tests/lib/__snapshots__/typescript.ts.snap b/tests/lib/__snapshots__/typescript.ts.snap index bec36dc..245e6ef 100644 --- a/tests/lib/__snapshots__/typescript.ts.snap +++ b/tests/lib/__snapshots__/typescript.ts.snap @@ -4668,6 +4668,1486 @@ Object { } `; +exports[`typescript fixtures/basics/call-signatures.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 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 { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "name": "a", + "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", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "name": "a", + "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", + }, + ], + "range": Array [ + 11, + 61, + ], + "type": "TSTypeLiteral", + }, + }, + ], + "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", +} +`; + +exports[`typescript fixtures/basics/call-signatures-with-generics.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 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 { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "name": "a", + "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 { + "loc": Object { + "end": Object { + "column": 4, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "name": "T", + "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 { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "a", + "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 { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "name": "T", + "range": Array [ + 44, + 45, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 43, + 46, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "range": Array [ + 11, + 67, + ], + "type": "TSTypeLiteral", + }, + }, + ], + "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", +} +`; + exports[`typescript fixtures/basics/cast-as-expression.src 1`] = ` Object { "body": Array [ @@ -38096,8 +39576,7 @@ Object { 245, 265, ], - "type": "TSConstructSignature", - "typeAnnotation": Object { + "returnType": Object { "loc": Object { "end": Object { "column": 23, @@ -38131,6 +39610,7 @@ Object { "type": "TSStringKeyword", }, }, + "type": "TSConstructSignatureDeclaration", }, Object { "loc": Object { @@ -38186,8 +39666,7 @@ Object { 270, 293, ], - "type": "TSConstructSignature", - "typeAnnotation": Object { + "returnType": Object { "loc": Object { "end": Object { "column": 26, @@ -38221,6 +39700,7 @@ Object { "type": "TSStringKeyword", }, }, + "type": "TSConstructSignatureDeclaration", "typeParameters": Object { "loc": Object { "end": Object { @@ -40444,8 +41924,7 @@ Object { 21, 47, ], - "type": "TSConstructSignature", - "typeAnnotation": null, + "type": "TSConstructSignatureDeclaration", }, ], "loc": Object { From 45d0d31bd744b08bb23baa35031c76845e859695 Mon Sep 17 00:00:00 2001 From: Armano Date: Sat, 5 Jan 2019 00:06:12 +0100 Subject: [PATCH 30/30] feat: add missing TSNamespaceExportDeclaration node (#87) BREAKING CHANGE: This changes the AST --- src/ast-node-types.ts | 1 + src/convert.ts | 7 + .../basics/export-as-namespace.src.ts | 1 + .../semantic-diagnostics-enabled.ts.snap | 2 + tests/lib/__snapshots__/typescript.ts.snap | 150 ++++++++++++++++++ 5 files changed, 161 insertions(+) create mode 100644 tests/fixtures/typescript/basics/export-as-namespace.src.ts diff --git a/src/ast-node-types.ts b/src/ast-node-types.ts index 7af75da..afcf377 100644 --- a/src/ast-node-types.ts +++ b/src/ast-node-types.ts @@ -131,6 +131,7 @@ export const AST_NODE_TYPES: { [key: string]: string } = { TSModuleBlock: 'TSModuleBlock', TSModuleDeclaration: 'TSModuleDeclaration', TSNamespaceFunctionDeclaration: 'TSNamespaceFunctionDeclaration', + TSNamespaceExportDeclaration: 'TSNamespaceExportDeclaration', TSNonNullExpression: 'TSNonNullExpression', TSNeverKeyword: 'TSNeverKeyword', TSNullKeyword: 'TSNullKeyword', diff --git a/src/convert.ts b/src/convert.ts index c8476a0..0c24aae 100644 --- a/src/convert.ts +++ b/src/convert.ts @@ -2711,6 +2711,13 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { }); break; } + case SyntaxKind.NamespaceExportDeclaration: { + Object.assign(result, { + type: AST_NODE_TYPES.TSNamespaceExportDeclaration, + id: convertChild(node.name) + }); + break; + } default: deeplyCopy(); diff --git a/tests/fixtures/typescript/basics/export-as-namespace.src.ts b/tests/fixtures/typescript/basics/export-as-namespace.src.ts new file mode 100644 index 0000000..ff8bbad --- /dev/null +++ b/tests/fixtures/typescript/basics/export-as-namespace.src.ts @@ -0,0 +1 @@ +export as namespace a; diff --git a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap index 0c91c88..6649259 100644 --- a/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap +++ b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap @@ -1760,6 +1760,8 @@ exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" en exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/directive-in-namespace.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; +exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/export-as-namespace.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/export-assignment.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; exports[`Parse all fixtures with "errorOnTypeScriptSyntaticAndSemanticIssues" enabled fixtures/typescript/basics/export-default-class-with-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/tests/lib/__snapshots__/typescript.ts.snap b/tests/lib/__snapshots__/typescript.ts.snap index 245e6ef..8f61fb2 100644 --- a/tests/lib/__snapshots__/typescript.ts.snap +++ b/tests/lib/__snapshots__/typescript.ts.snap @@ -28708,6 +28708,156 @@ Object { } `; +exports[`typescript fixtures/basics/export-as-namespace.src 1`] = ` +Object { + "body": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "type": "TSNamespaceExportDeclaration", + }, + ], + "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", +} +`; + exports[`typescript fixtures/basics/export-assignment.src 1`] = ` Object { "body": Array [