diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000..bd0a21a --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,8 @@ +coverage: + status: + patch: + default: + target: 90% + project: + default: + target: auto 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/.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/.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 diff --git a/.travis.yml b/.travis.yml index 91faa15..4465698 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,8 +18,10 @@ script: - yarn check-format - yarn test - yarn build + - yarn global add codecov after_success: - - npm run travis-deploy-once "npm run semantic-release" + - codecov + - yarn travis-deploy-once "yarn semantic-release" branches: only: - master 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/jest.config.js b/jest.config.js new file mode 100644 index 0000000..fca6f61 --- /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: false, + collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'], + moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], + coverageReporters: ['text-summary', 'lcov'] +}; diff --git a/package.json b/package.json index a1ba511..8ca835a 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,8 @@ }, "license": "BSD-2-Clause", "devDependencies": { + "@babel/code-frame": "7.0.0", + "@babel/parser": "7.2.3", "@commitlint/cli": "^7.1.2", "@commitlint/config-conventional": "^7.1.2", "@commitlint/travis-cli": "^7.1.2", @@ -28,12 +30,10 @@ "@types/node": "^10.12.2", "@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", - "jest": "23.1.0", + "jest": "23.6.0", "lint-staged": "7.3.0", "lodash.isplainobject": "4.0.6", "prettier": "^1.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", @@ -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 --coverage", + "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/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/ast-node-types.ts b/src/ast-node-types.ts index ea3ce8d..58dc30f 100644 --- a/src/ast-node-types.ts +++ b/src/ast-node-types.ts @@ -5,148 +5,167 @@ * @copyright jQuery Foundation and other contributors, https://jquery.org/ * MIT License */ -export const AST_NODE_TYPES: { [key: string]: string } = { - ArrayExpression: 'ArrayExpression', - ArrayPattern: 'ArrayPattern', - ArrowFunctionExpression: 'ArrowFunctionExpression', - AssignmentExpression: 'AssignmentExpression', - AssignmentPattern: 'AssignmentPattern', - AwaitExpression: 'AwaitExpression', - BinaryExpression: 'BinaryExpression', - BlockStatement: 'BlockStatement', - BreakStatement: 'BreakStatement', - CallExpression: 'CallExpression', - CatchClause: 'CatchClause', - ClassBody: 'ClassBody', - ClassDeclaration: 'ClassDeclaration', - ClassExpression: 'ClassExpression', - ClassImplements: 'ClassImplements', - ClassProperty: 'ClassProperty', - ConditionalExpression: 'ConditionalExpression', - ContinueStatement: 'ContinueStatement', - DebuggerStatement: 'DebuggerStatement', - DeclareFunction: 'DeclareFunction', - Decorator: 'Decorator', - DoWhileStatement: 'DoWhileStatement', - EmptyStatement: 'EmptyStatement', - ExportAllDeclaration: 'ExportAllDeclaration', - ExportDefaultDeclaration: 'ExportDefaultDeclaration', - ExportNamedDeclaration: 'ExportNamedDeclaration', - ExportSpecifier: 'ExportSpecifier', - ExpressionStatement: 'ExpressionStatement', - ForInStatement: 'ForInStatement', - ForOfStatement: 'ForOfStatement', - ForStatement: 'ForStatement', - FunctionDeclaration: 'FunctionDeclaration', - FunctionExpression: 'FunctionExpression', - GenericTypeAnnotation: 'GenericTypeAnnotation', - Identifier: 'Identifier', - IfStatement: 'IfStatement', - Import: 'Import', - ImportDeclaration: 'ImportDeclaration', - ImportDefaultSpecifier: 'ImportDefaultSpecifier', - ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', - ImportSpecifier: 'ImportSpecifier', - JSXAttribute: 'JSXAttribute', - JSXClosingElement: 'JSXClosingElement', - JSXClosingFragment: 'JSXClosingFragment', - JSXElement: 'JSXElement', - JSXEmptyExpression: 'JSXEmptyExpression', - JSXExpressionContainer: 'JSXExpressionContainer', - JSXFragment: 'JSXFragment', - JSXIdentifier: 'JSXIdentifier', - JSXMemberExpression: 'JSXMemberExpression', - JSXNamespacedName: 'JSXNamespacedName', - JSXOpeningElement: 'JSXOpeningElement', - JSXOpeningFragment: 'JSXOpeningFragment', - JSXSpreadAttribute: 'JSXSpreadAttribute', - JSXSpreadChild: 'JSXSpreadChild', - JSXText: 'JSXText', - LabeledStatement: 'LabeledStatement', - Literal: 'Literal', - LogicalExpression: 'LogicalExpression', - MemberExpression: 'MemberExpression', - MetaProperty: 'MetaProperty', - MethodDefinition: 'MethodDefinition', - NewExpression: 'NewExpression', - ObjectExpression: 'ObjectExpression', - ObjectPattern: 'ObjectPattern', - Program: 'Program', - Property: 'Property', - RestElement: 'RestElement', - ReturnStatement: 'ReturnStatement', - SequenceExpression: 'SequenceExpression', - SpreadElement: 'SpreadElement', - Super: 'Super', - SwitchCase: 'SwitchCase', - SwitchStatement: 'SwitchStatement', - TaggedTemplateExpression: 'TaggedTemplateExpression', - TemplateElement: 'TemplateElement', - TemplateLiteral: 'TemplateLiteral', - ThisExpression: 'ThisExpression', - ThrowStatement: 'ThrowStatement', - TryStatement: 'TryStatement', +export enum AST_NODE_TYPES { + ArrayExpression = 'ArrayExpression', + ArrayPattern = 'ArrayPattern', + ArrowFunctionExpression = 'ArrowFunctionExpression', + AssignmentExpression = 'AssignmentExpression', + AssignmentPattern = 'AssignmentPattern', + AwaitExpression = 'AwaitExpression', + BigIntLiteral = 'BigIntLiteral', + BinaryExpression = 'BinaryExpression', + BlockStatement = 'BlockStatement', + BreakStatement = 'BreakStatement', + CallExpression = 'CallExpression', + CatchClause = 'CatchClause', + ClassBody = 'ClassBody', + ClassDeclaration = 'ClassDeclaration', + ClassExpression = 'ClassExpression', + ClassProperty = 'ClassProperty', + ConditionalExpression = 'ConditionalExpression', + ContinueStatement = 'ContinueStatement', + DebuggerStatement = 'DebuggerStatement', + Decorator = 'Decorator', + DoWhileStatement = 'DoWhileStatement', + EmptyStatement = 'EmptyStatement', + ExportAllDeclaration = 'ExportAllDeclaration', + ExportDefaultDeclaration = 'ExportDefaultDeclaration', + ExportNamedDeclaration = 'ExportNamedDeclaration', + ExportSpecifier = 'ExportSpecifier', + ExpressionStatement = 'ExpressionStatement', + ForInStatement = 'ForInStatement', + ForOfStatement = 'ForOfStatement', + ForStatement = 'ForStatement', + FunctionDeclaration = 'FunctionDeclaration', + FunctionExpression = 'FunctionExpression', + Identifier = 'Identifier', + IfStatement = 'IfStatement', + Import = 'Import', + ImportDeclaration = 'ImportDeclaration', + ImportDefaultSpecifier = 'ImportDefaultSpecifier', + ImportNamespaceSpecifier = 'ImportNamespaceSpecifier', + ImportSpecifier = 'ImportSpecifier', + JSXAttribute = 'JSXAttribute', + JSXClosingElement = 'JSXClosingElement', + JSXClosingFragment = 'JSXClosingFragment', + JSXElement = 'JSXElement', + JSXEmptyExpression = 'JSXEmptyExpression', + JSXExpressionContainer = 'JSXExpressionContainer', + JSXFragment = 'JSXFragment', + JSXIdentifier = 'JSXIdentifier', + JSXMemberExpression = 'JSXMemberExpression', + JSXNamespacedName = 'JSXNamespacedName', // https://github.com/Microsoft/TypeScript/issues/7411 + JSXOpeningElement = 'JSXOpeningElement', + JSXOpeningFragment = 'JSXOpeningFragment', + JSXSpreadAttribute = 'JSXSpreadAttribute', + JSXSpreadChild = 'JSXSpreadChild', + JSXText = 'JSXText', + LabeledStatement = 'LabeledStatement', + Literal = 'Literal', + LogicalExpression = 'LogicalExpression', + MemberExpression = 'MemberExpression', + MetaProperty = 'MetaProperty', + MethodDefinition = 'MethodDefinition', + NewExpression = 'NewExpression', + ObjectExpression = 'ObjectExpression', + ObjectPattern = 'ObjectPattern', + Program = 'Program', + Property = 'Property', + RestElement = 'RestElement', + ReturnStatement = 'ReturnStatement', + SequenceExpression = 'SequenceExpression', + SpreadElement = 'SpreadElement', + Super = 'Super', + SwitchCase = 'SwitchCase', + SwitchStatement = 'SwitchStatement', + TaggedTemplateExpression = 'TaggedTemplateExpression', + TemplateElement = 'TemplateElement', + TemplateLiteral = 'TemplateLiteral', + ThisExpression = 'ThisExpression', + ThrowStatement = 'ThrowStatement', + TryStatement = 'TryStatement', + UnaryExpression = 'UnaryExpression', + UpdateExpression = 'UpdateExpression', + VariableDeclaration = 'VariableDeclaration', + VariableDeclarator = 'VariableDeclarator', + WhileStatement = 'WhileStatement', + WithStatement = 'WithStatement', + YieldExpression = 'YieldExpression', /** * TS-prefixed nodes */ - TSAbstractClassProperty: 'TSAbstractClassProperty', - TSAbstractKeyword: 'TSAbstractKeyword', - TSAbstractMethodDefinition: 'TSAbstractMethodDefinition', - TSAnyKeyword: 'TSAnyKeyword', - TSArrayType: 'TSArrayType', - TSAsyncKeyword: 'TSAsyncKeyword', - TSBooleanKeyword: 'TSBooleanKeyword', - TSConstructorType: 'TSConstructorType', - TSConstructSignature: 'TSConstructSignature', - TSDeclareKeyword: 'TSDeclareKeyword', - TSEnumDeclaration: 'TSEnumDeclaration', - TSEnumMember: 'TSEnumMember', - TSExportAssignment: 'TSExportAssignment', - TSExportKeyword: 'TSExportKeyword', - TSImportType: 'TSImportType', - TSLiteralType: 'TSLiteralType', - TSIndexSignature: 'TSIndexSignature', - TSInterfaceBody: 'TSInterfaceBody', - TSInterfaceDeclaration: 'TSInterfaceDeclaration', - TSInterfaceHeritage: 'TSInterfaceHeritage', - TSFunctionType: 'TSFunctionType', - TSMethodSignature: 'TSMethodSignature', - TSModuleBlock: 'TSModuleBlock', - TSModuleDeclaration: 'TSModuleDeclaration', - TSNamespaceFunctionDeclaration: 'TSNamespaceFunctionDeclaration', - TSNonNullExpression: 'TSNonNullExpression', - TSNeverKeyword: 'TSNeverKeyword', - TSNullKeyword: 'TSNullKeyword', - TSNumberKeyword: 'TSNumberKeyword', - TSObjectKeyword: 'TSObjectKeyword', - TSParameterProperty: 'TSParameterProperty', - TSPrivateKeyword: 'TSPrivateKeyword', - TSPropertySignature: 'TSPropertySignature', - TSProtectedKeyword: 'TSProtectedKeyword', - TSPublicKeyword: 'TSPublicKeyword', - TSQualifiedName: 'TSQualifiedName', - TSQuestionToken: 'TSQuestionToken', - TSReadonlyKeyword: 'TSReadonlyKeyword', - TSStaticKeyword: 'TSStaticKeyword', - TSStringKeyword: 'TSStringKeyword', - TSSymbolKeyword: 'TSSymbolKeyword', - TSTypeAnnotation: 'TSTypeAnnotation', - TSTypeLiteral: 'TSTypeLiteral', - TSTypeOperator: 'TSTypeOperator', - TSTypeParameter: 'TSTypeParameter', - TSTypeParameterDeclaration: 'TSTypeParameterDeclaration', - TSTypeParameterInstantiation: 'TSTypeParameterInstantiation', - TSTypePredicate: 'TSTypePredicate', - TSTypeReference: 'TSTypeReference', - TSUnionType: 'TSUnionType', - TSUndefinedKeyword: 'TSUndefinedKeyword', - TSUnknownKeyword: 'TSUnknownKeyword', - TSVoidKeyword: 'TSVoidKeyword', - UnaryExpression: 'UnaryExpression', - UpdateExpression: 'UpdateExpression', - VariableDeclaration: 'VariableDeclaration', - VariableDeclarator: 'VariableDeclarator', - WhileStatement: 'WhileStatement', - WithStatement: 'WithStatement', - YieldExpression: 'YieldExpression' -}; + TSAbstractClassDeclaration = 'TSAbstractClassDeclaration', + TSAbstractClassProperty = 'TSAbstractClassProperty', + TSAbstractKeyword = 'TSAbstractKeyword', + TSAbstractMethodDefinition = 'TSAbstractMethodDefinition', + TSAnyKeyword = 'TSAnyKeyword', + TSArrayType = 'TSArrayType', + TSAsExpression = 'TSAsExpression', + TSAsyncKeyword = 'TSAsyncKeyword', + TSBooleanKeyword = 'TSBooleanKeyword', + TSBigIntKeyword = 'TSBigIntKeyword', + TSConditionalType = 'TSConditionalType', + TSConstructorType = 'TSConstructorType', + TSCallSignatureDeclaration = 'TSCallSignatureDeclaration', + TSClassImplements = 'TSClassImplements', + TSConstructSignatureDeclaration = 'TSConstructSignatureDeclaration', + TSDeclareKeyword = 'TSDeclareKeyword', + TSDeclareFunction = 'TSDeclareFunction', + TSEnumDeclaration = 'TSEnumDeclaration', + TSEnumMember = 'TSEnumMember', + TSExportAssignment = 'TSExportAssignment', + TSExportKeyword = 'TSExportKeyword', + TSExternalModuleReference = 'TSExternalModuleReference', + TSImportType = 'TSImportType', + TSInferType = 'TSInferType', + TSLiteralType = 'TSLiteralType', + TSIndexedAccessType = 'TSIndexedAccessType', + TSIndexSignature = 'TSIndexSignature', + TSInterfaceBody = 'TSInterfaceBody', + TSInterfaceDeclaration = 'TSInterfaceDeclaration', + TSInterfaceHeritage = 'TSInterfaceHeritage', + TSImportEqualsDeclaration = 'TSImportEqualsDeclaration', + TSFunctionType = 'TSFunctionType', + TSMethodSignature = 'TSMethodSignature', + TSModuleBlock = 'TSModuleBlock', + TSModuleDeclaration = 'TSModuleDeclaration', + TSNamespaceExportDeclaration = 'TSNamespaceExportDeclaration', + TSNonNullExpression = 'TSNonNullExpression', + TSNeverKeyword = 'TSNeverKeyword', + TSNullKeyword = 'TSNullKeyword', + TSNumberKeyword = 'TSNumberKeyword', + TSMappedType = 'TSMappedType', + TSObjectKeyword = 'TSObjectKeyword', + TSParameterProperty = 'TSParameterProperty', + TSPrivateKeyword = 'TSPrivateKeyword', + TSPropertySignature = 'TSPropertySignature', + TSProtectedKeyword = 'TSProtectedKeyword', + TSPublicKeyword = 'TSPublicKeyword', + TSQualifiedName = 'TSQualifiedName', + TSQuestionToken = 'TSQuestionToken', + TSReadonlyKeyword = 'TSReadonlyKeyword', + TSRestType = 'TSRestType', + TSStaticKeyword = 'TSStaticKeyword', + TSStringKeyword = 'TSStringKeyword', + TSSymbolKeyword = 'TSSymbolKeyword', + TSThisType = 'TSThisType', + TSTypeAnnotation = 'TSTypeAnnotation', + TSTypeAliasDeclaration = 'TSTypeAliasDeclaration', + TSTypeAssertion = 'TSTypeAssertion', + TSTypeLiteral = 'TSTypeLiteral', + TSTypeOperator = 'TSTypeOperator', + TSTypeParameter = 'TSTypeParameter', + TSTypeParameterDeclaration = 'TSTypeParameterDeclaration', + TSTypeParameterInstantiation = 'TSTypeParameterInstantiation', + TSTypePredicate = 'TSTypePredicate', + TSTypeReference = 'TSTypeReference', + TSTypeQuery = 'TSTypeQuery', + TSIntersectionType = 'TSIntersectionType', + TSTupleType = 'TSTupleType', + TSOptionalType = 'TSOptionalType', + TSParenthesizedType = 'TSParenthesizedType', + TSUnionType = 'TSUnionType', + TSUndefinedKeyword = 'TSUndefinedKeyword', + TSUnknownKeyword = 'TSUnknownKeyword', + TSVoidKeyword = 'TSVoidKeyword' +} diff --git a/src/convert-comments.ts b/src/convert-comments.ts index 25d4287..31d83cc 100644 --- a/src/convert-comments.ts +++ b/src/convert-comments.ts @@ -9,7 +9,6 @@ import ts from 'typescript'; import nodeUtils from './node-utils'; import { ESTreeComment, - ESTreeToken, LineAndColumnData } from './temp-types-based-on-js-source'; @@ -32,7 +31,7 @@ function convertTypeScriptCommentToEsprimaComment( startLoc: LineAndColumnData, endLoc: LineAndColumnData ): ESTreeComment { - const comment: Partial = { + const comment: ESTreeComment = { type: block ? 'Block' : 'Line', value: text }; @@ -48,7 +47,7 @@ function convertTypeScriptCommentToEsprimaComment( }; } - return comment as ESTreeComment; + return comment; } /** @@ -107,14 +106,19 @@ 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) { const start = triviaScanner.getTokenPos(); const end = triviaScanner.getTextPos(); - let container: ts.Token | null = null; + let container: ts.Node | null = null; switch (kind) { case ts.SyntaxKind.SingleLineCommentTrivia: case ts.SyntaxKind.MultiLineCommentTrivia: { @@ -123,8 +127,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 || @@ -136,7 +153,7 @@ export function convertComments( break; case ts.SyntaxKind.SlashToken: case ts.SyntaxKind.SlashEqualsToken: - container = nodeUtils.getNodeContainer(ast, start, end) as ts.Node; + container = nodeUtils.getNodeContainer(ast, start, end); if (container.kind === ts.SyntaxKind.RegularExpressionLiteral) { kind = triviaScanner.reScanSlashToken(); diff --git a/src/convert.ts b/src/convert.ts index 2204233..bfd00b3 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; @@ -33,21 +34,36 @@ interface ConvertAdditionalOptions { interface ConvertConfig { node: ts.Node; parent?: ts.Node | null; + inTypeMode?: boolean; + allowPattern?: boolean; ast: ts.SourceFile; 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 - * @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,21 +78,37 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { /** * Create a new ESTree node */ - let result: Partial = { - type: '', + let result: ESTreeNode = { + type: '' as AST_NODE_TYPES, range: [node.getStart(ast), node.end], loc: nodeUtils.getLoc(node, ast) }; + function converter( + child?: ts.Node, + inTypeMode?: boolean, + allowPattern?: boolean + ): ESTreeNode | null { + if (!child) { + return null; + } + return convert({ + node: child, + parent: node, + inTypeMode, + allowPattern, + ast, + additionalOptions + }); + } + /** - * 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} + * Converts a TypeScript node into an ESTree node. + * @param {ts.Node} child the child ts.Node + * @returns {ESTreeNode|null} the converted ESTree node */ - function simplyCopy(): void { - Object.assign(result, { - type: SyntaxKind[node.kind] - }); + function convertPattern(child?: ts.Node): ESTreeNode | null { + return converter(child, config.inTypeMode, true); } /** @@ -84,19 +116,35 @@ 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 { - return convert({ node: child, parent: node, ast, additionalOptions }); + function convertChild(child?: ts.Node): ESTreeNode | null { + return converter(child, config.inTypeMode, false); + } + + /** + * 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, false); } /** * 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 { - const annotation = convertChild(child); - const annotationStartCol = child.getFullStart() - 1; + function convertTypeAnnotation(child: ts.TypeNode): ESTreeNode { + const annotation = convertChildType(child); + // in FunctionType and ConstructorType typeAnnotation has 2 characters `=>` and in other places is just colon + const offset = + node.kind === SyntaxKind.FunctionType || + node.kind === SyntaxKind.ConstructorType + ? 2 + : 1; + const annotationStartCol = child.getFullStart() - offset; + const loc = nodeUtils.getLocFor(annotationStartCol, child.end, ast); return { type: AST_NODE_TYPES.TSTypeAnnotation, @@ -106,9 +154,45 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { }; } + /** + * Coverts body Nodes and add directive field to StringLiterals + * @param {ts.NodeArray} nodes of ts.Node + * @returns {ESTreeNode[]} Array of body statements + */ + function convertBodyExpressions( + nodes: ts.NodeArray + ): ESTreeNode[] { + // directives has to be unique, if directive is registered twice pick only first one + const unique: string[] = []; + const allowDirectives = nodeUtils.canContainDirective(node); + + return ( + nodes + .map(statement => { + const child = convertChild(statement); + if ( + allowDirectives && + child && + child.expression && + ts.isExpressionStatement(statement) && + ts.isStringLiteral(statement.expression) + ) { + const raw = child.expression.raw!; + if (!unique.includes(raw)) { + child.directive = raw.slice(1, -1); + unique.push(raw); + } + } + return child!; // child can be null but it's filtered below + }) + // filter out unknown nodes for now + .filter(statement => statement) + ); + } + /** * 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( @@ -145,32 +229,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)) }; } @@ -199,75 +258,29 @@ 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 - }; - }) - }; - } - - /** - * 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. - * @returns {ESTreeNode} The type annotation node. - */ - function convertClassImplements(child: any): ESTreeNode { - const id = convertChild(child.expression) as ESTreeNode; - const classImplementsNode: ESTreeNode = { - type: AST_NODE_TYPES.ClassImplements, - loc: id.loc, - range: id.range, - id + params: typeParameters.map(typeParameter => + convertChildType(typeParameter) + ) }; - if (child.typeArguments && child.typeArguments.length) { - classImplementsNode.typeParameters = convertTypeArgumentsToTypeParameters( - child.typeArguments - ); - } - return classImplementsNode; } /** - * Converts a child into a interface heritage node. - * @param {ts.Node} child The TypeScript AST node to convert. - * @returns {ESTreeNode} The type annotation node. + * Converts a child into a specified heritage node. + * @param {AST_NODE_TYPES} nodeType Type of node to be used + * @param {ts.ExpressionWithTypeArguments} child The TypeScript AST node to convert. + * @returns {ESTreeNode} The heritage node. */ - function convertInterfaceHeritageClause(child: any): ESTreeNode { - const id = convertChild(child.expression) as ESTreeNode; + function convertHeritageClause( + nodeType: AST_NODE_TYPES, + child: ts.ExpressionWithTypeArguments + ): ESTreeNode { + const expression = convertChild(child.expression)!; const classImplementsNode: ESTreeNode = { - type: AST_NODE_TYPES.TSInterfaceHeritage, - loc: id.loc, - range: id.range, - id + type: nodeType, + loc: expression.loc, + range: expression.range, + expression }; - if (child.typeArguments && child.typeArguments.length) { classImplementsNode.typeParameters = convertTypeArgumentsToTypeParameters( child.typeArguments @@ -276,34 +289,12 @@ 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 * @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 []; } @@ -313,7 +304,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { return convertedParam; } return Object.assign(convertedParam, { - decorators: convertDecorators(param.decorators) + decorators: param.decorators.map(convertChild) }); }); } @@ -325,10 +316,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { * @returns {void} */ function deeplyCopy(): void { - const customType = `TS${SyntaxKind[node.kind]}`; + const customType = `TS${SyntaxKind[node.kind]}` as AST_NODE_TYPES; /** * 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 && @@ -360,9 +351,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])) { @@ -383,10 +373,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 +411,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; } @@ -478,14 +470,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; } /** @@ -496,22 +486,15 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { case SyntaxKind.SourceFile: Object.assign(result, { type: AST_NODE_TYPES.Program, - body: [], + body: convertBodyExpressions(node.statements), + // 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) => { - const convertedStatement = convertChild(statement); - if (convertedStatement) { - result.body.push(convertedStatement); - } - }); - - (result as any).range[1] = (node as any).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; @@ -519,22 +502,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: convertBodyExpressions(node.statements) }); 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 +526,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 +542,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 +551,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 +569,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 +583,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 +591,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 +616,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,76 +628,77 @@ 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: convertPattern(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; } // Declarations case SyntaxKind.FunctionDeclaration: { + const isDeclare = nodeUtils.hasModifier(SyntaxKind.DeclareKeyword, node); 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 (isDeclare || !node.body) { + functionDeclarationType = AST_NODE_TYPES.TSDeclareFunction; } 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) || undefined }); // Process returnType - if ((node as any).type) { - (result as any).returnType = convertTypeAnnotation((node as any).type); + if (node.type) { + result.returnType = convertTypeAnnotation(node.type); + } + + if (isDeclare) { + result.declare = true; } // 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 ); } // check for exports - result = nodeUtils.fixExports(node, result as any, ast); + result = nodeUtils.fixExports(node, result, ast); break; } @@ -718,18 +706,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: convertPattern(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,21 +724,23 @@ 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) }); + if (nodeUtils.hasModifier(SyntaxKind.DeclareKeyword, node)) { + result.declare = true; + } + // check for exports - result = nodeUtils.fixExports(node, result as any, ast); + result = nodeUtils.fixExports(node, result, ast); break; // mostly for for-of, for-in 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 +750,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; @@ -773,103 +761,47 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { break; case SyntaxKind.ArrayLiteralExpression: { - const arrayAssignNode = nodeUtils.findAncestorOfKind( - node, - SyntaxKind.BinaryExpression - ); - const arrayIsInForOf = - node.parent && node.parent.kind === SyntaxKind.ForOfStatement; - const arrayIsInForIn = - node.parent && node.parent.kind === SyntaxKind.ForInStatement; - let arrayIsInAssignment; - - if (arrayAssignNode) { - if (node.parent.kind === SyntaxKind.CallExpression) { - arrayIsInAssignment = false; - } else if ( - nodeUtils.getBinaryExpressionType( - (arrayAssignNode as any).operatorToken - ) === AST_NODE_TYPES.AssignmentExpression - ) { - arrayIsInAssignment = - nodeUtils.findChildOfKind( - (arrayAssignNode as any).left, - SyntaxKind.ArrayLiteralExpression, - ast - ) === node || (arrayAssignNode as any).left === node; - } else { - arrayIsInAssignment = false; - } - } - // TypeScript uses ArrayLiteralExpression in destructuring assignment, too - if (arrayIsInAssignment || arrayIsInForOf || arrayIsInForIn) { + if (config.allowPattern) { Object.assign(result, { type: AST_NODE_TYPES.ArrayPattern, - elements: (node as any).elements.map(convertChild) + elements: node.elements.map(convertPattern) }); } else { Object.assign(result, { type: AST_NODE_TYPES.ArrayExpression, - elements: (node as any).elements.map(convertChild) + elements: node.elements.map(convertChild) }); } break; } case SyntaxKind.ObjectLiteralExpression: { - const ancestorNode = nodeUtils.findFirstMatchingAncestor( - node, - parentNode => - parentNode.kind === SyntaxKind.BinaryExpression || - parentNode.kind === SyntaxKind.ArrowFunction - ); - const objectAssignNode = - ancestorNode && - ancestorNode.kind === SyntaxKind.BinaryExpression && - (ancestorNode as any).operatorToken.kind === SyntaxKind.FirstAssignment - ? ancestorNode - : null; - - let objectIsInAssignment = false; - - if (objectAssignNode) { - if ((objectAssignNode as any).left === node) { - objectIsInAssignment = true; - } else if (node.parent.kind === SyntaxKind.CallExpression) { - objectIsInAssignment = false; - } else { - objectIsInAssignment = - nodeUtils.findChildOfKind( - (objectAssignNode as any).left, - SyntaxKind.ObjectLiteralExpression, - ast - ) === node; - } - } - // TypeScript uses ObjectLiteralExpression in destructuring assignment, too - if (objectIsInAssignment) { + if (config.allowPattern) { Object.assign(result, { type: AST_NODE_TYPES.ObjectPattern, - properties: (node as any).properties.map(convertChild) + properties: node.properties.map(convertPattern) }); } else { Object.assign(result, { type: AST_NODE_TYPES.ObjectExpression, - properties: (node as any).properties.map(convertChild) + properties: node.properties.map(convertChild) }); } - break; } 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: converter( + node.initializer, + config.inTypeMode, + config.allowPattern + ), + computed: nodeUtils.isComputedProperty(node.name), method: false, shorthand: false, kind: 'init' @@ -877,14 +809,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: convertPattern(node.name), + right: convertChild(node.objectAssignmentInitializer), loc: result.loc, range: result.range }, @@ -894,10 +826,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 +842,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 +853,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { kind: 'init' }); } else { - return convertChild((node as any).expression); + return convertChild(node.expression); } break; @@ -932,43 +866,40 @@ 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), - static: nodeUtils.hasStaticModifierFlag(node), + key: convertChild(node.name), + value: convertChild(node.initializer), + computed: nodeUtils.isComputedProperty(node.name), + static: nodeUtils.hasModifier(SyntaxKind.StaticKeyword, 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) { - result.decorators = convertDecorators(node.decorators); + result.decorators = node.decorators.map(convertChild); } const accessibility = nodeUtils.getTSNodeAccessibility(node); if (accessibility) { - (result as any).accessibility = accessibility; + result.accessibility = accessibility; } - if ( - (node as any).name.kind === SyntaxKind.Identifier && - (node as any).questionToken - ) { - (result as any).optional = true; + if (node.name.kind === SyntaxKind.Identifier && node.questionToken) { + result.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; + result.optional = true; } break; } @@ -977,7 +908,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,32 +926,32 @@ 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.range[1]], loc: { start: { line: methodLoc.line + 1, column: methodLoc.character }, - end: (result as any).loc.end + end: result.loc.end } }; - 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 +962,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,26 +976,26 @@ 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), - static: nodeUtils.hasStaticModifierFlag(node), + computed: nodeUtils.isComputedProperty(node.name), + static: nodeUtils.hasModifier(SyntaxKind.StaticKeyword, node), kind: 'method' }); if (node.decorators) { - result.decorators = convertDecorators(node.decorators); + result.decorators = node.decorators.map(convertChild); } const accessibility = nodeUtils.getTSNodeAccessibility(node); if (accessibility) { - (result as any).accessibility = accessibility; + result.accessibility = accessibility; } } if ( (result as any).key.type === AST_NODE_TYPES.Identifier && - (node as any).questionToken + node.questionToken ) { (result as any).key.optional = true; } @@ -1075,16 +1006,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 ); } @@ -1093,32 +1024,35 @@ 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 ), 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.range[1]], loc: { start: { line: constructorLoc.line + 1, column: constructorLoc.character }, - end: (result as any).loc.end + end: result.loc.end } }; @@ -1129,8 +1063,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 +1071,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 @@ -1191,7 +1124,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; @@ -1200,23 +1133,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.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 +1163,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(convertPattern) }); break; @@ -1241,26 +1174,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(convertPattern) }); 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 +1202,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 +1243,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.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 +1265,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 +1287,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 +1301,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 +1314,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 +1333,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 }); @@ -1415,83 +1342,53 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { // Patterns + case SyntaxKind.SpreadAssignment: case SyntaxKind.SpreadElement: { - let type = AST_NODE_TYPES.SpreadElement; - - if ( - node.parent && - node.parent.parent && - node.parent.parent.kind === SyntaxKind.BinaryExpression - ) { - if ((node as any).parent.parent.left === node.parent) { - type = AST_NODE_TYPES.RestElement; - } else if ((node as any).parent.parent.right === node.parent) { - type = AST_NODE_TYPES.SpreadElement; - } - } - - Object.assign(result, { - type, - argument: convertChild((node as any).expression) - }); - break; - } - case SyntaxKind.SpreadAssignment: { - let type = AST_NODE_TYPES.SpreadElement; - - if ( - node.parent && - node.parent.parent && - node.parent.parent.kind === SyntaxKind.BinaryExpression - ) { - if ((node as any).parent.parent.right === node.parent) { - type = AST_NODE_TYPES.SpreadElement; - } else if ((node as any).parent.parent.left === node.parent) { - type = AST_NODE_TYPES.RestElement; - } + if (config.allowPattern) { + Object.assign(result, { + type: AST_NODE_TYPES.RestElement, + argument: convertPattern(node.expression) + }); + } else { + Object.assign(result, { + type: AST_NODE_TYPES.SpreadElement, + argument: convertChild(node.expression) + }); } - - Object.assign(result, { - type, - argument: convertChild((node as any).expression) - }); break; } case SyntaxKind.Parameter: { - let parameter; + let parameter: ESTreeNode; - if ((node as any).dotDotDotToken) { - parameter = convertChild((node as any).name); + if (node.dotDotDotToken) { Object.assign(result, { type: AST_NODE_TYPES.RestElement, - argument: parameter + argument: convertChild(node.name) }); - } else if ((node as any).initializer) { - parameter = convertChild((node as any).name); + parameter = result; + } 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, + parameter = result = convert({ + node: node.name, parent, ast, additionalOptions - }); - (result as any) = parameter; + })!; } - if ((node as any).type) { - (parameter as any).typeAnnotation = convertTypeAnnotation( - (node as any).type - ); - fixTypeAnnotationParentLocation(parameter as any); + if (node.type) { + parameter.typeAnnotation = convertTypeAnnotation(node.type); + fixTypeAnnotationParentLocation(parameter); } - if ((node as any).questionToken) { + if (node.questionToken) { (parameter as any).optional = true; } @@ -1519,23 +1416,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 +1449,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); @@ -1565,7 +1461,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) { @@ -1585,18 +1481,16 @@ 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, { type: classNodeType, - id: convertChild((node as any).name), + id: convertChild(node.name), body: { type: AST_NODE_TYPES.ClassBody, body: [], - - // TODO: Fix location info - range: [openBrace.getStart(ast), (result as any).range[1]], + range: [openBrace.getStart(ast), node.end], loc: nodeUtils.getLocFor(openBrace.getStart(ast), node.end, ast) }, superClass: @@ -1606,16 +1500,20 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { }); if (implementsClause) { - (result as any).implements = implementsClause.types.map( - convertClassImplements + result.implements = implementsClause.types.map(el => + convertHeritageClause(AST_NODE_TYPES.TSClassImplements, el) ); } + if (nodeUtils.hasModifier(SyntaxKind.DeclareKeyword, node)) { + result.declare = true; + } + if (node.decorators) { - result.decorators = convertDecorators(node.decorators); + result.decorators = node.decorators.map(convertChild); } - const filteredMembers = (node as any).members.filter( + const filteredMembers = node.members.filter( nodeUtils.isESTreeClassMember ); @@ -1624,7 +1522,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; } @@ -1633,93 +1531,77 @@ 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: convertBodyExpressions(node.statements) }); 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.specifiers!.push(convertChild(node.importClause)); } - if ((node as any).importClause.namedBindings) { - if ( - (node as any).importClause.namedBindings.kind === - SyntaxKind.NamespaceImport - ) { - (result as any).specifiers.push( - convertChild((node as any).importClause.namedBindings) - ); - } else { - result.specifiers = (result as any).specifiers.concat( - (node as any).importClause.namedBindings.elements.map( - convertChild - ) - ); + if (node.importClause.namedBindings) { + switch (node.importClause.namedBindings.kind) { + case SyntaxKind.NamespaceImport: + result.specifiers!.push( + convertChild(node.importClause.namedBindings) + ); + break; + case SyntaxKind.NamedImports: + result.specifiers = result.specifiers!.concat( + node.importClause.namedBindings.elements.map(convertChild) + ); + break; } } } - break; 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.loc = nodeUtils.getLocFor( - (result as any).range[0], - (result as any).range[1], - ast - ); - break; - - case SyntaxKind.NamedImports: - Object.assign(result, { - type: AST_NODE_TYPES.ImportDefaultSpecifier, - local: convertChild((node as any).name) - }); + result.range[1] = node.name!.end; + result.loc = nodeUtils.getLocFor(result.range[0], result.range[1], ast); 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 +1609,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 +1632,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 +1642,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 +1652,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 +1661,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 +1670,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,16 +1686,16 @@ 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) { + if (left.type === AST_NODE_TYPES.SequenceExpression) { (result as any).expressions = (result as any).expressions.concat( (left as any).expressions ); @@ -1821,65 +1703,29 @@ 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 ); } else { (result as any).expressions.push(right); } - } else if ( - (node as any).operatorToken && - (node as any).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) - }); } else { + const type = nodeUtils.getBinaryExpressionType(node.operatorToken); Object.assign(result, { - type: nodeUtils.getBinaryExpressionType((node as any).operatorToken), - operator: nodeUtils.getTextForTokenKind( - (node as any).operatorToken.kind + type, + operator: nodeUtils.getTextForTokenKind(node.operatorToken.kind), + left: converter( + node.left, + config.inTypeMode, + type === AST_NODE_TYPES.AssignmentExpression ), - left: convertChild((node as any).left), - right: convertChild((node as any).right) + right: convertChild(node.right) }); // 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 - ); - - let upperArrayIsInAssignment; - - if (upperArrayAssignNode) { - if ((upperArrayAssignNode as any).left === upperArrayNode) { - upperArrayIsInAssignment = true; - } else { - upperArrayIsInAssignment = - nodeUtils.findChildOfKind( - (upperArrayAssignNode as any).left, - SyntaxKind.ArrayLiteralExpression, - ast - ) === upperArrayNode; - } - } - - if (upperArrayIsInAssignment) { + if (config.allowPattern) { delete (result as any).operator; result.type = AST_NODE_TYPES.AssignmentPattern; } @@ -1891,12 +1737,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 +1755,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 +1765,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 +1774,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 +1796,35 @@ 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; + } + + case SyntaxKind.Decorator: { + Object.assign(result, { + type: AST_NODE_TYPES.Decorator, + expression: convertChild(node.expression) }); break; } @@ -1985,33 +1834,37 @@ 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 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), - raw: ast.text.slice((result as any).range[0], (result as any).range[1]) + value: Number(node.text), + raw: ast.text.slice(result.range[0], result.range[1]) + }); + break; + + case SyntaxKind.BigIntLiteral: { + 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, + raw, + value }); break; + } 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 { @@ -2023,7 +1876,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 @@ -2049,7 +1902,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 }); @@ -2071,7 +1924,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 @@ -2079,9 +1934,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; @@ -2091,46 +1946,50 @@ 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; case SyntaxKind.JsxSelfClosingElement: { - /** - * 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; - - const openingElement = convertChild(node); - (openingElement as any).selfClosing = true; - Object.assign(result, { type: AST_NODE_TYPES.JSXElement, - openingElement, + /** + * Convert SyntaxKind.JsxSelfClosingElement to SyntaxKind.JsxOpeningElement, + * TypeScript does not seem to have the idea of openingElement when tag is self-closing + */ + openingElement: { + type: AST_NODE_TYPES.JSXOpeningElement, + typeParameters: node.typeArguments + ? convertTypeArgumentsToTypeParameters(node.typeArguments) + : undefined, + selfClosing: true, + name: convertTypeScriptJSXTagNameToESTreeName(node.tagName), + attributes: node.attributes.properties.map(convertChild), + range: result.range, + loc: result.loc + }, closingElement: null, children: [] }); - break; } 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; @@ -2146,11 +2005,9 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { break; case SyntaxKind.JsxExpression: { - const eloc = ast.getLineAndCharacterOfPosition( - (result as any).range[0] + 1 - ); - const expression = (node as any).expression - ? convertChild((node as any).expression) + const eloc = ast.getLineAndCharacterOfPosition(result.range[0] + 1); + const expression = node.expression + ? convertChild(node.expression) : { type: AST_NODE_TYPES.JSXEmptyExpression, loc: { @@ -2159,15 +2016,15 @@ 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, { - type: (node as any).dotDotDotToken + type: node.dotDotDotToken ? AST_NODE_TYPES.JSXSpreadChild : AST_NODE_TYPES.JSXExpressionContainer, expression @@ -2177,7 +2034,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; @@ -2185,7 +2042,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; @@ -2220,96 +2077,215 @@ 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; - case SyntaxKind.FirstNode: { + case SyntaxKind.QualifiedName: { 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; } // 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: convertChildType(node.name), + constraint: node.constraint + ? convertChildType(node.constraint) + : undefined, + default: node.default ? convertChildType(node.default) : undefined + }); + break; + } + + case SyntaxKind.ThisType: + 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: AST_NODE_TYPES[`TS${SyntaxKind[node.kind]}` as AST_NODE_TYPES] + }); + 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.readonly = true; + } else { + result.readonly = nodeUtils.getTextForTokenKind( + node.readonlyToken.kind + ); + } + } + + if (node.questionToken) { + if (node.questionToken.kind === SyntaxKind.QuestionToken) { + result.optional = true; + } else { + result.optional = nodeUtils.getTextForTokenKind( + node.questionToken.kind + ); + } + } + + if (node.type) { + result.typeAnnotation = convertChildType(node.type); + } + break; + } + case SyntaxKind.ParenthesizedExpression: return convert({ - node: (node as any).expression, + node: node.expression, parent, ast, 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, - id: convertChild((node as any).name), - init: convertChild((node as any).type), - range: [(node as any).name.getStart(ast), (node as any).end] - }; + Object.assign(result, { + type: AST_NODE_TYPES.TSTypeAliasDeclaration, + id: convertChild(node.name), + typeAnnotation: convertChildType(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 as any).typeParameters && (node as any).typeParameters.length) { - (typeAliasDeclarator as any).typeParameters = convertTSTypeParametersToTypeParametersDeclaration( - (node as any).typeParameters + if (node.typeParameters && node.typeParameters.length) { + result.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); - + result = nodeUtils.fixExports(node, result, ast); break; } case SyntaxKind.MethodSignature: { 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, - readonly: - nodeUtils.hasModifier(SyntaxKind.ReadonlyKeyword, node) || undefined, - static: nodeUtils.hasModifier(SyntaxKind.StaticKeyword, node), - export: - nodeUtils.hasModifier(SyntaxKind.ExportKeyword, node) || undefined + computed: nodeUtils.isComputedProperty(node.name), + key: convertChild(node.name), + params: convertParameters(node.parameters) }); + if (nodeUtils.isOptional(node)) { + result.optional = true; + } + + if (node.type) { + result.returnType = convertTypeAnnotation(node.type); + } + + if (nodeUtils.hasModifier(SyntaxKind.ReadonlyKeyword, node)) { + result.readonly = true; + } + + if (node.typeParameters) { + result.typeParameters = convertTSTypeParametersToTypeParametersDeclaration( + node.typeParameters + ); + } + const accessibility = nodeUtils.getTSNodeAccessibility(node); if (accessibility) { - (result as any).accessibility = accessibility; + result.accessibility = accessibility; } - if ((node as any).typeParameters) { - (result as any).typeParameters = convertTSTypeParametersToTypeParametersDeclaration( - (node as any).typeParameters - ); + if (nodeUtils.hasModifier(SyntaxKind.ExportKeyword, node)) { + result.export = true; } + if (nodeUtils.hasModifier(SyntaxKind.StaticKeyword, node)) { + result.static = true; + } break; } @@ -2317,12 +2293,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: @@ -2333,7 +2309,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; @@ -2342,37 +2318,60 @@ 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, - readonly: - nodeUtils.hasModifier(SyntaxKind.ReadonlyKeyword, node) || undefined, - static: nodeUtils.hasModifier(SyntaxKind.StaticKeyword, node), - export: - nodeUtils.hasModifier(SyntaxKind.ExportKeyword, node) || undefined + parameters: node.parameters.map(convertChild), + typeAnnotation: node.type ? convertTypeAnnotation(node.type) : null }); + if (nodeUtils.hasModifier(SyntaxKind.ReadonlyKeyword, node)) { + result.readonly = true; + } + const accessibility = nodeUtils.getTSNodeAccessibility(node); if (accessibility) { - (result as any).accessibility = accessibility; + result.accessibility = accessibility; } + if (nodeUtils.hasModifier(SyntaxKind.ExportKeyword, node)) { + result.export = true; + } + + if (nodeUtils.hasModifier(SyntaxKind.StaticKeyword, node)) { + result.static = true; + } break; } - - case SyntaxKind.ConstructSignature: { + case SyntaxKind.ConstructorType: + case SyntaxKind.FunctionType: + case SyntaxKind.ConstructSignature: + case SyntaxKind.CallSignature: { + let type: AST_NODE_TYPES; + switch (node.kind) { + case SyntaxKind.ConstructSignature: + type = AST_NODE_TYPES.TSConstructSignatureDeclaration; + break; + case SyntaxKind.CallSignature: + type = AST_NODE_TYPES.TSCallSignatureDeclaration; + break; + case SyntaxKind.FunctionType: + type = AST_NODE_TYPES.TSFunctionType; + break; + case SyntaxKind.ConstructorType: + default: + type = AST_NODE_TYPES.TSConstructorType; + break; + } 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 + type: type, + params: convertParameters(node.parameters) }); - if ((node as any).typeParameters) { + if (node.type) { + result.returnType = convertTypeAnnotation(node.type); + } + + if (node.typeParameters) { result.typeParameters = convertTSTypeParametersToTypeParametersDeclaration( - (node as any).typeParameters + node.typeParameters ); } @@ -2380,16 +2379,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 || @@ -2399,18 +2397,13 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { interfaceLastTypeParameter, ast, ast - ); + ) as any; } result.typeParameters = convertTSTypeParametersToTypeParametersDeclaration( - (node as any).typeParameters + node.typeParameters ); } - const hasImplementsClause = interfaceHeritageClauses.length > 0; - const hasAbstractKeyword = nodeUtils.hasModifier( - SyntaxKind.AbstractKeyword, - node - ); const interfaceOpenBrace = nodeUtils.findNextToken( interfaceLastClassToken, ast, @@ -2419,8 +2412,8 @@ 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)), - range: [interfaceOpenBrace.getStart(ast), (result as any).range[1]], + body: node.members.map(member => convertChild(member)), + range: [interfaceOpenBrace.getStart(ast), node.end], loc: nodeUtils.getLocFor( interfaceOpenBrace.getStart(ast), node.end, @@ -2429,26 +2422,56 @@ export default function convert(config: ConvertConfig): ESTreeNode | null { }; Object.assign(result, { - abstract: hasAbstractKeyword, type: AST_NODE_TYPES.TSInterfaceDeclaration, body: interfaceBody, - id: convertChild((node as any).name), - heritage: hasImplementsClause - ? interfaceHeritageClauses[0].types.map( - convertInterfaceHeritageClause - ) - : [] + id: convertChild(node.name) }); + + if (interfaceHeritageClauses.length > 0) { + const interfaceExtends = []; + const interfaceImplements = []; + + for (const heritageClause of interfaceHeritageClauses) { + if (heritageClause.token === SyntaxKind.ExtendsKeyword) { + for (const n of heritageClause.types) { + interfaceExtends.push( + convertHeritageClause(AST_NODE_TYPES.TSInterfaceHeritage, n) + ); + } + } else if (heritageClause.token === SyntaxKind.ImplementsKeyword) { + for (const n of heritageClause.types) { + interfaceImplements.push( + convertHeritageClause(AST_NODE_TYPES.TSInterfaceHeritage, n) + ); + } + } + } + + if (interfaceExtends.length) { + result.extends = interfaceExtends; + } + + if (interfaceImplements.length) { + result.implements = interfaceImplements; + } + } + /** * Semantically, decorators are not allowed on interface declarations, * but the TypeScript compiler will parse them and produce a valid AST, * 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; + } + if (nodeUtils.hasModifier(SyntaxKind.DeclareKeyword, node)) { + result.declare = true; } // check for exports - result = nodeUtils.fixExports(node, result as any, ast); + result = nodeUtils.fixExports(node, result, ast); break; } @@ -2456,24 +2479,24 @@ 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 */ - (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: 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; @@ -2481,20 +2504,20 @@ 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); + 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, * so we handle them here too. */ if (node.decorators) { - result.decorators = convertDecorators(node.decorators); + result.decorators = node.decorators.map(convertChild); } break; } @@ -2502,10 +2525,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; } @@ -2520,18 +2543,115 @@ 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; } // ...then check for exports - result = nodeUtils.fixExports(node, result as any, ast); + result = nodeUtils.fixExports(node, result, ast); + 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; + } + 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, + typeParameter: convertChildType(node.typeParameter) + }); + break; + } + case SyntaxKind.LiteralType: { + Object.assign(result, { + type: AST_NODE_TYPES.TSLiteralType, + literal: convertChildType(node.literal) + }); + 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, + 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; + } + case SyntaxKind.NamespaceExportDeclaration: { + Object.assign(result, { + type: AST_NODE_TYPES.TSNamespaceExportDeclaration, + id: convertChild(node.name) + }); break; } @@ -2544,5 +2664,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 873db9c..b25ad78 100644 --- a/src/node-utils.ts +++ b/src/node-utils.ts @@ -11,14 +11,17 @@ import { ESTreeNode, 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, @@ -29,99 +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'; - -/** - * Find the first matching child based on the given sourceFile and predicate function. - * @param {ts.Node} node The current ts.Node - * @param {ts.SourceFile} sourceFile The full AST source file - * @param {Function} predicate The predicate function to apply to each checked child - * @returns {ts.Node|undefined} a matching child ts.Node - */ -function findFirstMatchingChild( - node: ts.Node, - sourceFile: ts.SourceFile, - predicate: (node: ts.Node) => boolean -): ts.Node | undefined { - const children = node.getChildren(sourceFile); - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (child && predicate(child)) { - return child; - } - - const grandChild = findFirstMatchingChild(child, sourceFile, predicate); - if (grandChild) { - return grandChild; - } - } - return undefined; -} +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' +}; export default { /** @@ -138,15 +115,13 @@ export default { getLocFor, getLoc, isToken, + canContainDirective, isJSXToken, getDeclarationKind, getTSNodeAccessibility, - hasStaticModifierFlag, findNextToken, findFirstMatchingToken, - findChildOfKind, findFirstMatchingAncestor, - findAncestorOfKind, hasJSXAncestor, unescapeStringLiteralText, isComputedProperty, @@ -156,8 +131,6 @@ export default { convertToken, convertTokens, getNodeContainer, - isWithinTypeAnnotation, - isTypeKeyword, isComment, isJSDocComment, createError, @@ -169,7 +142,9 @@ export default { * @param {ts.Token} operator the operator token * @returns {boolean} is assignment */ -function isAssignmentOperator(operator: ts.Token): boolean { +function isAssignmentOperator( + operator: ts.Token +): boolean { return ASSIGNMENT_OPERATORS.indexOf(operator.kind) > -1; } @@ -178,7 +153,7 @@ function isAssignmentOperator(operator: ts.Token): boolean { * @param {ts.Token} operator the operator token * @returns {boolean} is a logical operator */ -function isLogicalOperator(operator: ts.Token): boolean { +function isLogicalOperator(operator: ts.Token): boolean { return LOGICAL_OPERATORS.indexOf(operator.kind) > -1; } @@ -187,7 +162,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]; } @@ -202,11 +177,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 && @@ -216,10 +194,10 @@ function hasModifier(modifierKind: number, node: ts.Node): boolean { /** * Returns true if the given ts.Token is a comma - * @param {ts.Token} token the TypeScript token + * @param {ts.Node} token the TypeScript token * @returns {boolean} is comma */ -function isComma(token: ts.Token): boolean { +function isComma(token: ts.Node): boolean { return token.kind === SyntaxKind.CommaToken; } @@ -249,13 +227,18 @@ function isJSDocComment(node: ts.Node): boolean { * @param {ts.Token} operator the operator token * @returns {string} the binary expression type */ -function getBinaryExpressionType(operator: ts.Token): string { +function getBinaryExpressionType( + operator: ts.Token +): + | AST_NODE_TYPES.AssignmentExpression + | AST_NODE_TYPES.LogicalExpression + | AST_NODE_TYPES.BinaryExpression { 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; } /** @@ -286,17 +269,42 @@ 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 - * @param {ts.Token|ts.Node} nodeOrToken the ts.Node or ts.Token + * @param {ts.Node} 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, - ast: ts.SourceFile -): ESTreeNodeLoc { +function getLoc(nodeOrToken: ts.Node, ast: ts.SourceFile): ESTreeNodeLoc { return getLocFor(nodeOrToken.getStart(ast), nodeOrToken.end, ast); } @@ -322,48 +330,21 @@ 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 + * @param {ts.VariableDeclarationList} node TypeScript AST node * @returns {string} declaration kind */ -function getDeclarationKind(node: ts.Node): string { - switch (node.kind) { - case SyntaxKind.TypeAliasDeclaration: - return 'type'; - 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'; } /** @@ -371,7 +352,9 @@ function getDeclarationKind(node: ts.Node): string { * @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; @@ -386,41 +369,28 @@ function getTSNodeAccessibility(node: ts.Node): string | null { case SyntaxKind.PrivateKeyword: return 'private'; default: - continue; + break; } } 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 - * @param {ts.Token} previousToken The previous TSToken + * @param {ts.Node} previousToken The previous TSToken * @param {ts.Node} parent The parent TSNode * @param {ts.SourceFile} ast The TS AST - * @returns {ts.Token} the next TSToken + * @returns {ts.Node|undefined} the next TSToken */ function findNextToken( - previousToken: ts.Token, + previousToken: ts.Node, parent: ts.Node, ast: ts.SourceFile -): ts.Token | undefined { +): ts.Node | undefined { return find(parent); - function find(n: ts.Node): ts.Token | undefined { + function find(n: ts.Node): ts.Node | undefined { if (ts.isToken(n) && n.pos === previousToken.end) { // this is token that starts at the end of previous token - return it return n; @@ -440,18 +410,18 @@ function findNextToken( /** * Find the first matching token based on the given predicate function. - * @param {ts.Token} previousToken The previous ts.Token + * @param {ts.Node} previousToken The previous ts.Token * @param {ts.Node} parent The parent ts.Node * @param {Function} predicate The predicate function to apply to each checked token * @param {ts.SourceFile} ast The TS AST - * @returns {ts.Token|undefined} a matching ts.Token + * @returns {ts.Node|undefined} a matching ts.Token */ function findFirstMatchingToken( - previousToken: ts.Token | undefined, + previousToken: ts.Node | undefined, parent: ts.Node, predicate: (node: ts.Node) => boolean, ast: ts.SourceFile -): ts.Token | undefined { +): ts.Node | undefined { while (previousToken) { if (predicate(previousToken)) { return previousToken; @@ -461,21 +431,6 @@ function findFirstMatchingToken( return undefined; } -/** - * Finds the first child ts.Node which matches the given kind - * @param {ts.Node} node The parent ts.Node - * @param {number} kind The ts.Node kind to match against - * @param {ts.SourceFile} sourceFile The full AST source file - * @returns {ts.Node|undefined} a matching ts.Node - */ -function findChildOfKind( - node: ts.Node, - kind: number, - sourceFile: ts.SourceFile -): ts.Node | undefined { - return findFirstMatchingChild(node, sourceFile, child => child.kind === kind); -} - /** * Find the first matching ancestor based on the given predicate function. * @param {ts.Node} node The current ts.Node @@ -495,16 +450,6 @@ function findFirstMatchingAncestor( return undefined; } -/** - * Finds the first parent ts.Node which matches the given kind - * @param {ts.Node} node The current ts.Node - * @param {number} kind The ts.Node kind to match against - * @returns {ts.Node|undefined} a matching parent ts.Node - */ -function findAncestorOfKind(node: ts.Node, kind: number): ts.Node | undefined { - return findFirstMatchingAncestor(node, parent => parent.kind === kind); -} - /** * Returns true if a given ts.Node has a JSX token within its hierarchy * @param {ts.Node} node ts.Node to be checked @@ -537,25 +482,12 @@ 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; } -/** - * 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 @@ -581,8 +513,8 @@ function fixExports( result.loc = getLocFor(result.range[0], result.range[1], ast); const declarationType = declarationIsDefault - ? 'ExportDefaultDeclaration' - : 'ExportNamedDeclaration'; + ? AST_NODE_TYPES.ExportDefaultDeclaration + : AST_NODE_TYPES.ExportNamedDeclaration; const newResult: any = { type: declarationType, @@ -711,11 +643,11 @@ function getTokenType(token: any): string { /** * Extends and formats a given ts.Token, for a given AST - * @param {ts.Token} token the ts.Token + * @param {ts.Node} token the ts.Token * @param {ts.SourceFile} ast the AST object * @returns {ESTreeToken} the converted ESTreeToken */ -function convertToken(token: ts.Token, ast: ts.SourceFile): ESTreeToken { +function convertToken(token: ts.Node, ast: ts.SourceFile): ESTreeToken { const start = token.kind === SyntaxKind.JsxText ? token.getFullStart() @@ -773,18 +705,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 @@ -804,7 +736,7 @@ function getNodeContainer( } walk(ast); - return (container as unknown) as ts.Token; + return container!; } /** diff --git a/src/parser.ts b/src/parser.ts index 41135b8..1371b50 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -5,18 +5,23 @@ * @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'; +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'); @@ -56,8 +61,10 @@ function resetExtra(): void { log: console.log, projects: [], errorOnUnknownASTType: false, + errorOnTypeScriptSyntacticAndSemanticIssues: false, code: '', - tsconfigRootDir: process.cwd() + tsconfigRootDir: process.cwd(), + extraFileExtensions: [] }; } @@ -73,7 +80,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 +89,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 +173,7 @@ function getProgramAndAST( ) { return ( (shouldProvideParserServices && getASTFromProject(code, options)) || + (shouldProvideParserServices && getASTAndDefaultProject(code, options)) || createNewProgram(code) ); } @@ -229,6 +249,19 @@ 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.errorOnTypeScriptSyntacticAndSemanticIssues === + 'boolean' && + options.errorOnTypeScriptSyntacticAndSemanticIssues + ) { + extra.errorOnTypeScriptSyntacticAndSemanticIssues = true; + } + if (typeof options.useJSXTextNode === 'boolean' && options.useJSXTextNode) { extra.useJSXTextNode = true; } @@ -254,6 +287,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) { @@ -280,7 +320,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.errorOnTypeScriptSyntacticAndSemanticIssues) { + const error = getFirstSemanticOrSyntacticError(program, ast); + if (error) { + throw convertError(error); + } + } + return { estree, program: shouldProvideParserServices ? program : undefined, @@ -303,6 +359,11 @@ export function parse( code: string, options?: T ) { + if (options && options.errorOnTypeScriptSyntacticAndSemanticIssues) { + throw new Error( + `"errorOnTypeScriptSyntacticAndSemanticIssues" 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..3513c4d --- /dev/null +++ b/src/semantic-errors.ts @@ -0,0 +1,102 @@ +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 { + try { + 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; + } catch (e) { + /** + * TypeScript compiler has certain Debug.fail() statements in, which will cause the diagnostics + * retrieval above to throw. + * + * E.g. from ast-alignment-tests + * "Debug Failure. Shouldn't ever directly check a JsxOpeningElement" + * + * For our current use-cases this is undesired behavior, so we just suppress it + * and log a a warning. + */ + console.warn(`Warning From TSC: "${e.message}`); + return undefined; + } +} + +function whitelistSupportedDiagnostics( + diagnostics: ReadonlyArray +): ReadonlyArray { + return diagnostics.filter(diagnostic => { + switch (diagnostic.code) { + case 1014: // ts 3.2 "A rest parameter must be last in a parameter list." + case 1044: // ts 3.2 "'{0}' modifier cannot appear on a module or namespace element." + case 1045: // ts 3.2 "A '{0}' modifier cannot be used with an interface declaration." + case 1048: // ts 3.2 "A rest parameter cannot have an initializer." + case 1049: // ts 3.2 "A 'set' accessor must have exactly one parameter." + case 1070: // ts 3.2 "'{0}' modifier cannot appear on a type member." + case 1071: // ts 3.2 "'{0}' modifier cannot appear on an index signature." + case 1090: // ts 3.2 "'{0}' modifier cannot appear on a parameter." + case 1096: // ts 3.2 "An index signature must have exactly one parameter." + case 1097: // ts 3.2 "'{0}' list cannot be empty." + case 1117: // ts 3.2 "An object literal cannot have multiple properties with the same name in strict mode." + case 1121: // ts 3.2 "Octal literals are not allowed in strict mode." + case 1123: // ts 3.2: "Variable declaration list cannot be empty." + case 1141: // ts 3.2 "String literal expected." + case 1172: // ts 3.2 "'extends' clause already seen." + case 1173: // ts 3.2 "'extends' clause must precede 'implements' clause." + case 1175: // ts 3.2 "'implements' clause already seen." + case 1176: // ts 3.2 "Interface declaration cannot have 'implements' clause." + case 1190: // ts 3.2 "The variable declaration of a 'for...of' statement cannot have an initializer." + case 1200: // ts 3.2 "Line terminator not permitted before arrow." + case 1206: // ts 3.2 "Decorators are not valid here." + case 1211: // ts 3.2 "A class declaration without the 'default' modifier must have a name." + case 1242: // ts 3.2 "'abstract' modifier can only appear on a class, method, or property declaration." + case 1246: // ts 3.2 "An interface property cannot have an initializer." + case 2364: // ts 3.2 "The left-hand side of an assignment expression must be a variable or a property access." + case 2369: // ts 3.2 "A parameter property is only allowed in a constructor implementation." + case 2462: // ts 3.2 "A rest element must be last in a destructuring pattern." + case 17012: // ts 3.2 "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?" + case 17013: // ts 3.2 "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor." + 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 3a37c3f..a002b74 100644 --- a/src/temp-types-based-on-js-source.ts +++ b/src/temp-types-based-on-js-source.ts @@ -4,11 +4,13 @@ * They will be gradually replaced with the more accurate types derived from the ESTree spec, and its * applicable extensions */ +import { AST_NODE_TYPES } from './ast-node-types'; + export interface ESTreeToken { - type: string; - value: string; - range: number[]; + type: AST_NODE_TYPES; + range: [number, number]; loc: ESTreeNodeLoc; + value: string; regex?: { pattern: string; flags: string; @@ -19,31 +21,45 @@ export interface ESTreeToken { } export interface ESTreeNode { - type: string; + type: AST_NODE_TYPES; + range: [number, number]; loc: ESTreeNodeLoc; - range: number[]; declaration?: ESTreeNode; - specifiers?: any[]; + specifiers?: (ESTreeNode | null)[]; source?: any; typeAnnotation?: ESTreeNode | null; - typeParameters?: any; + typeParameters?: ESTreeNode | null; id?: ESTreeNode | null; + raw?: string; + value?: string; expression?: ESTreeNode | null; - decorators?: any; + decorators?: (ESTreeNode | null)[]; + implements?: ESTreeNode[]; + extends?: ESTreeNode[]; const?: boolean; declare?: boolean; global?: boolean; modifiers?: any; body?: any; params?: any; - accessibility?: any; - readonly?: boolean; + accessibility?: 'public' | 'protected' | 'private'; + readonly?: boolean | string; static?: boolean; export?: boolean; parameter?: any; + abstract?: boolean; + typeName?: ESTreeNode | null; + directive?: string; + returnType?: ESTreeNode; + optional?: boolean | string; } -export interface ESTreeComment extends ESTreeNode {} +export interface ESTreeComment { + type: 'Block' | 'Line'; + range?: [number, number]; + loc?: ESTreeNodeLoc; + value: string; +} export interface LineAndColumnData { line: number; @@ -57,6 +73,7 @@ export interface ESTreeNodeLoc { export interface Extra { errorOnUnknownASTType: boolean; + errorOnTypeScriptSyntacticAndSemanticIssues: boolean; useJSXTextNode: boolean; tokens: null | ESTreeToken[]; comment: boolean; @@ -69,6 +86,7 @@ export interface Extra { log: Function; projects: string[]; tsconfigRootDir: string; + extraFileExtensions: string[]; } export interface ParserOptions { @@ -78,9 +96,11 @@ export interface ParserOptions { comment?: boolean; jsx?: boolean; errorOnUnknownASTType?: boolean; + errorOnTypeScriptSyntacticAndSemanticIssues?: boolean; useJSXTextNode?: boolean; loggerFn?: Function | false; project?: string | string[]; filePath?: string; tsconfigRootDir?: string; + extraFileExtensions?: string[]; } diff --git a/src/ts-nodes.ts b/src/ts-nodes.ts new file mode 100644 index 0000000..b917584 --- /dev/null +++ b/src/ts-nodes.ts @@ -0,0 +1,179 @@ +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.FunctionTypeNode + | 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); diff --git a/src/tsconfig-parser.ts b/src/tsconfig-parser.ts index 63d472f..2212c4d 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, true); + 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/ast-alignment/fixtures-to-test.ts b/tests/ast-alignment/fixtures-to-test.ts index 1285ce1..30d8bbd 100644 --- a/tests/ast-alignment/fixtures-to-test.ts +++ b/tests/ast-alignment/fixtures-to-test.ts @@ -1,26 +1,104 @@ import glob from 'glob'; +import fs from 'fs'; import path from 'path'; + import jsxKnownIssues from '../jsx-known-issues'; interface Fixture { filename: string; - config?: any; + jsx: boolean; + ignoreSourceType: boolean; } interface FixturePatternConfig { pattern: string; - config?: { - babylonParserOptions?: any; - typeScriptESTreeOptions?: any; - }; + jsx: boolean; + ignoreSourceType: boolean; } interface CreateFixturePatternConfig { ignore?: string[]; fileType?: string; - parseWithSourceTypeModule?: string[]; + ignoreSourceType?: string[]; +} + +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 */ @@ -28,528 +106,355 @@ const jsxFilesWithKnownIssues = jsxKnownIssues.map(f => f.replace('jsx/', '')); /** * Current random error difference on jsx/invalid-no-tag-name.src.js - * TSEP - SyntaxError - * Babylon - RangeError + * ts-estree - SyntaxError + * 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'); -/** - * 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' - ); - } - config = config || ({} as CreateFixturePatternConfig); - config.ignore = config.ignore || []; - config.fileType = config.fileType || 'js'; - config.parseWithSourceTypeModule = config.parseWithSourceTypeModule || []; - /** - * 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". - * - * 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) { - config.ignore = ([] as string[]).concat( - config.ignore, - config.parseWithSourceTypeModule - ); - fixturesRequiringSourceTypeModule = ([] as FixturePatternConfig[]).concat( - fixturesRequiringSourceTypeModule, - config.parseWithSourceTypeModule.map(fixture => ({ - // 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' } } - })) - ); - } - return { - pattern: `${fixturesSubPath}/!(${config.ignore.join('|')}).src.${ - config.fileType - }` - }; -} +tester.addFixturePatternConfig('javascript/templateStrings', { + ignore: ['**/*'] +}); -/** - * An array of FixturePatternConfigs - */ -let fixturePatternConfigsToTest = [ - createFixturePatternConfigFor('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 - */ - 'no-comment-template', // Purely AST diffs - 'template-string-block' // Purely AST diffs - ] - }), - - createFixturePatternConfigFor('javascript/templateStrings', { - ignore: ['**/*'] - }), - - createFixturePatternConfigFor('javascript/experimentalObjectRestSpread', { - ignore: [ - /** - * Trailing comma is not permitted after a "RestElement" in Babylon - */ - 'invalid-rest-trailing-comma' - ] - }), - - createFixturePatternConfigFor('javascript/arrowFunctions', { - ignore: [ - /** - * Expected babylon 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 - ] - }), - - 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', // babylon parse errors - /** - * Expected babylon 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 - ] - }), - - createFixturePatternConfigFor('javascript/defaultParams'), - - createFixturePatternConfigFor('javascript/destructuring', { - ignore: [ - /** - * Expected babylon 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 - ] - }), - - 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 babylon 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 - ] - }), - - createFixturePatternConfigFor('javascript/experimentalAsyncIteration'), - createFixturePatternConfigFor('javascript/experimentalDynamicImport'), - createFixturePatternConfigFor('javascript/exponentiationOperators'), - - createFixturePatternConfigFor('javascript/forOf', { - ignore: [ - /** - * TypeScript, espree and acorn parse this fine - esprima, flow and babylon do not... - */ - 'for-of-with-function-initializer' // babylon parse errors - ] - }), - - createFixturePatternConfigFor('javascript/generators'), - createFixturePatternConfigFor('javascript/globalReturn'), - - 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 - * 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 - ], - 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' - ] - }), - - createFixturePatternConfigFor('javascript/newTarget', { - ignore: [ - /** - * Expected babylon 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 - ] - }), - - createFixturePatternConfigFor('javascript/objectLiteralComputedProperties'), - - createFixturePatternConfigFor('javascript/objectLiteralDuplicateProperties', { - ignore: [ - /** - * Expected babylon 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 - ] - }), - - createFixturePatternConfigFor('javascript/objectLiteralShorthandMethods'), - createFixturePatternConfigFor('javascript/objectLiteralShorthandProperties'), - createFixturePatternConfigFor('javascript/octalLiterals'), - createFixturePatternConfigFor('javascript/regex'), - createFixturePatternConfigFor('javascript/regexUFlag'), - createFixturePatternConfigFor('javascript/regexYFlag'), - - createFixturePatternConfigFor('javascript/restParams', { - ignore: [ - /** - * Expected babylon 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 - ] - }), - - createFixturePatternConfigFor('javascript/spread'), - createFixturePatternConfigFor('javascript/unicodeCodePointEscapes'), - createFixturePatternConfigFor('jsx', { ignore: jsxFilesWithKnownIssues }), - createFixturePatternConfigFor('jsx-useJSXTextNode'), - - /* ================================================== */ +tester.addFixturePatternConfig('javascript/arrayLiteral'); - /** - * TSX-SPECIFIC FILES - */ +tester.addFixturePatternConfig('javascript/simple-literals'); - createFixturePatternConfigFor('tsx', { - fileType: 'tsx', - ignore: [ - /** - * AST difference - */ - 'react-typed-props', - /** - * currently babylon not supported - */ - 'generic-jsx-element' - ] - }), - - /* ================================================== */ +tester.addFixturePatternConfig('javascript/directives'); - /** - * TYPESCRIPT-SPECIFIC FILES - */ +tester.addFixturePatternConfig('javascript/experimentalObjectRestSpread', { + ignore: [ + /** + * Trailing comma is not permitted after a "RestElement" in Babel + */ + 'invalid-rest-trailing-comma' + ] +}); + +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. + * + * We are also unable to leverage diagnostics effectively here. The relevant TypeScript diagnostic is: + * + * (ts 3.2) 2300 "Duplicate identifier '{0}'." + * + * ...but this is heavily overloaded. It will also report an error for an object with two properties + * with the same name, for example. + */ + 'error-dup-params', // babel parse errors + 'error-strict-dup-params' // babel parse errors + ] +}); - createFixturePatternConfigFor('typescript/babylon-convergence', { - fileType: 'ts' - }), - - createFixturePatternConfigFor('typescript/basics', { - fileType: 'ts', - ignore: [ - /** - * Other babylon 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 - 'var-with-definite-assignment', // babylon parse errors - 'class-with-definite-assignment', // babylon parse errors - /** - * typescript-estree erroring, but babylon not. - */ - 'arrow-function-with-type-parameters', // typescript-estree parse errors - /** - * Babylon: ClassDeclaration + abstract: true - * tsep: TSAbstractClassDeclaration - */ - 'abstract-class-with-abstract-properties', - /** - * Babylon: ClassProperty + abstract: true - * tsep: TSAbstractClassProperty - */ - 'abstract-class-with-abstract-readonly-property', - /** - * Babylon: TSExpressionWithTypeArguments - * tsep: ClassImplements - */ - 'class-with-implements-generic-multiple', - '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) - */ - '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', - '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 - * as `ArrayPattern`, babylon, acorn and espree say it should be `ArrayExpression` - * TODO: Fix this - */ - 'destructuring-assignment', - /** - * Babylon 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 - /** - * Awaiting feedback on Babylon issue https://github.com/babel/babylon/issues/700 - */ - '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 - */ - 'import-type', - 'import-type-with-type-parameters-in-type-reference' - ], - parseWithSourceTypeModule: [ - 'export-named-enum', - 'export-assignment', - 'export-default-class-with-generic', - 'export-default-class-with-multiple-generics', - 'export-named-class-with-generic', - 'export-named-class-with-multiple-generics' - ] - }), - - 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: [ - /** - * currently babylon not supported - */ - 'tagged-template-expression-type-arguments' - ] - }), - - createFixturePatternConfigFor('typescript/errorRecovery', { - fileType: 'ts', - ignore: [ - /** - * AST difference - */ - 'interface-empty-extends', - /** - * TypeScript-specific tests taken from "errorRecovery". Babylon 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 - ] - }), - - createFixturePatternConfigFor('typescript/namespaces-and-modules', { - fileType: 'ts', - ignore: [ - /** - * Minor AST difference - */ - 'nested-internal-module', - /** - * Babylon: TSDeclareFunction - * tsep: TSNamespaceFunctionDeclaration - */ - 'declare-namespace-with-exported-function' - ] - }) -]; +tester.addFixturePatternConfig('javascript/bigIntLiterals'); +tester.addFixturePatternConfig('javascript/binaryLiterals'); +tester.addFixturePatternConfig('javascript/blockBindings'); + +tester.addFixturePatternConfig('javascript/callExpression'); + +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 + ] +}); + +tester.addFixturePatternConfig('javascript/defaultParams'); + +tester.addFixturePatternConfig('javascript/destructuring'); +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'); + +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: [ + /** + * Babel correctly errors on this file, and we can report on it via: + * TS 1189 (ts 3.2) "The variable declaration of a 'for...in' statement cannot have an initializer." + * + * However, if we enable that, we get a lot of cases which ts-estree errors on, but Babel doesn't. + * Therefore, leaving this as the one ignored case for now. + * + * TODO: Investigate this in more detail + */ + 'for-in-with-assigment' // babel parse errors + ] +}); + +tester.addFixturePatternConfig('javascript/forOf'); +tester.addFixturePatternConfig('javascript/generators'); +tester.addFixturePatternConfig('javascript/globalReturn'); +tester.addFixturePatternConfig('javascript/importMeta'); +tester.addFixturePatternConfig('javascript/labels'); + +tester.addFixturePatternConfig('javascript/modules', { + ignore: [ + /** + * Expected babel parse errors - ts-estree is not currently throwing + */ + 'invalid-export-named-default' // babel parse errors + ], + ignoreSourceType: ['error-function', 'error-strict', 'error-delete'] +}); + +tester.addFixturePatternConfig('javascript/newTarget'); + +tester.addFixturePatternConfig('javascript/objectLiteral'); +tester.addFixturePatternConfig('javascript/objectLiteralComputedProperties'); + +tester.addFixturePatternConfig('javascript/objectLiteralDuplicateProperties', { + ignore: [ + /** + * Babel throws SyntaxError: Redefinition of __proto__ property + * + * TypeScript reports it via the overloaded TS 2300 "Duplicate identifier '{0}'.", which we + * do not currently enable as per the notes above. + */ + 'error-proto-string-property', // babel parse errors + /** + * ts-estree throws thanks to TS 1117 (ts 3.2 at time of writing) + * "An object literal cannot have multiple properties with the same name in strict mode." + * + * Babel does not throw for some reason... + */ + 'strict-duplicate-properties' // ts-estree 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'); +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[] = []; -const fixturesDirPath = path.join(__dirname, '../fixtures'); +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, - config: fixturePatternConfig.config - }); - }); + +tester.addFixturePatternConfig('typescript/babylon-convergence', { + fileType: 'ts' +}); + +tester.addFixturePatternConfig('typescript/basics', { + fileType: 'ts', + ignore: [ + /** + * TypeScript does not report any diagnostics for this file, but Babel throws: + * [SyntaxError: Unexpected token, expected "{" (2:8) + 1 | class Foo { + > 2 | foo?(); + | ^ + 3 | bar?(): string; + 4 | private baz?(): string; + 5 | }] + */ + 'class-with-optional-methods', // babel parse errors + /** + * There are number of things that can be reported in this file, so it's not great + * for comparison purposes. + * + * Nevertheless, Babel appears to throw on syntax that TypeScript doesn't report on directly. + * + * TODO: Investigate in more depth, potentially split up different parts of the interface + */ + 'interface-with-all-property-types', // babel parse errors + /** + * PR for generic ArrowFunctionExpression ranges has been merged into Babel: https://github.com/babel/babel/pull/9295 + * TODO: remove me in next babel > 7.2.3 + */ + 'arrow-function-with-type-parameters', + /** + * Babel error: parameterName is not included into range of TSTypeAnnotation + * TODO: report it to babel + */ + 'type-guard-in-method', + /** + * there is difference in range between babel and ts-estree + */ + 'class-with-implements-generic-multiple', + 'class-with-implements-generic', + 'export-declare-const-named-enum', + 'interface-with-extends-type-parameters', + 'interface-with-optional-properties', + /** + * Babel bug for parsing exported abstract interface + * https://github.com/babel/babel/issues/9304 + */ + 'abstract-interface', + /** + * Babel bug for optional or abstract methods + * https://github.com/babel/babel/issues/9305 + */ + 'abstract-class-with-abstract-method', // babel parse errors + 'abstract-class-with-optional-method', // babel parse errors + 'declare-class-with-optional-method', // babel parse errors + /** + * PR for parameter property ranges has been merged into Babel: https://github.com/babel/babel/pull/9284 + * TODO: remove me in next babel > 7.2.3 + */ + 'class-with-private-parameter-properties', + 'class-with-protected-parameter-properties', + 'class-with-public-parameter-properties', + 'class-with-readonly-parameter-properties', + /** + * PR for type import has been merged into Babel: https://github.com/babel/babel/pull/9302 + * TODO: remove me in next babel > 7.2.3 + */ + 'import-type', + 'import-type-with-type-parameters-in-type-reference', + /** + * PR for BigInt support has been merged into Babel: https://github.com/babel/babel/pull/9230 + * TODO: remove me in next babel > 7.2.3 + */ + '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', + 'directive-in-namespace', + /** + * PR for type assertions ranges has been merged into Babel: https://github.com/babel/babel/pull/9284 + * TODO: remove me in next babel > 7.2.3 + */ + 'type-assertion' + ], + ignoreSourceType: [ + /** + * Babel reports sourceType script + * 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 ts-estree + */ + 'tagged-template-expression-type-arguments' + ] +}); + +tester.addFixturePatternConfig('typescript/errorRecovery', { + fileType: 'ts', + ignore: [ + /** + * PR with errors in empty extends and implements has been merged into Babel: https://github.com/babel/babel/pull/9292 + * TODO: remove me in next babel > 7.2.3 + */ + 'interface-empty-extends', + 'class-extends-empty-implements' + ] +}); + +tester.addFixturePatternConfig('typescript/types', { + fileType: 'ts', + ignore: [ + /** + * Babel bug for range of Identifier in TSIndexSignature + * https://github.com/babel/babel/issues/9319 + */ + 'index-signature', + 'index-signature-readonly', + 'index-signature-without-type', + /** + * AST difference + */ + 'literal-number-negative' + ] }); +tester.addFixturePatternConfig('typescript/declare', { + fileType: 'ts' +}); + +tester.addFixturePatternConfig('typescript/namespaces-and-modules', { + fileType: 'ts', + ignore: [ + /** + * Minor AST difference + */ + 'nested-internal-module' + ], + ignoreSourceType: [ + 'module-with-default-exports', + 'ambient-module-declaration-with-import', + 'declare-namespace-with-exported-function' + ] +}); + +const fixturesToTest = tester.getFixtures(); + export { fixturesToTest }; 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/tests/ast-alignment/parse.ts b/tests/ast-alignment/parse.ts index d875556..4073464 100644 --- a/tests/ast-alignment/parse.ts +++ b/tests/ast-alignment/parse.ts @@ -1,7 +1,7 @@ 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 { ParserPlugin } from '@babel/parser'; function createError(message: string, line: number, column: number) { // Construct an error similar to the ones thrown by Babylon. @@ -13,51 +13,51 @@ function createError(message: string, line: number, column: number) { return error; } -function parseWithBabylonPluginTypescript(text: string, parserOptions?: any) { - parserOptions = parserOptions || {}; - const babylon = require('babylon'); - return babylon.parse( - text, - Object.assign( - { - sourceType: 'script', - allowImportExportEverywhere: true, - allowReturnOutsideFunction: true, - ranges: true, - plugins: [ - 'jsx', - 'typescript', - 'objectRestSpread', - 'decorators', - 'classProperties', - 'asyncGenerators', - 'dynamicImport', - 'estree' - ] - }, - parserOptions - ) - ); +function parseWithBabelParser(text: string, jsx: boolean = true) { + const babel = require('@babel/parser'); + const plugins: ParserPlugin[] = [ + 'typescript', + 'objectRestSpread', + 'decorators-legacy', + 'classProperties', + 'asyncGenerators', + 'dynamicImport', + 'estree', + 'bigInt', + 'importMeta' + ]; + 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); + const result = parser.parseAndGenerateServices(text, { + loc: true, + range: true, + tokens: false, + comment: false, + useJSXTextNode: true, + errorOnUnknownASTType: true, + /** + * Babel will always throw on these types of issues, so we enable + * them in typescript-estree when comparing behavior between the + * two parsers. By default, the TypeScript compiler is much more + * forgiving. + */ + errorOnTypeScriptSyntacticAndSemanticIssues: true, + jsx + }); + return result.ast; } catch (e) { throw createError(e.message, e.lineNumber, e.column); } @@ -65,8 +65,7 @@ function parseWithTypeScriptESTree( interface ASTComparisonParseOptions { parser: string; - typeScriptESTreeOptions?: ParserOptions; - babylonParserOptions?: any; + jsx?: boolean; } export function parse(text: string, opts: ASTComparisonParseOptions) { @@ -83,17 +82,17 @@ 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 'babylon-plugin-typescript': + case '@babel/parser': result.ast = parseUtils.normalizeNodeTypes( - parseWithBabylonPluginTypescript(text, opts.babylonParserOptions) + parseWithBabelParser(text, opts.jsx) ); 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..777e0b7 100644 --- a/tests/ast-alignment/spec.ts +++ b/tests/ast-alignment/spec.ts @@ -12,43 +12,38 @@ fixturesToTest.forEach(fixture => { */ const typeScriptESTreeResult = parse(source, { parser: 'typescript-estree', - typeScriptESTreeOptions: - fixture.config && fixture.config.typeScriptESTreeOptions - ? fixture.config.typeScriptESTreeOptions - : null + jsx: fixture.jsx }); /** - * Parse the source with babylon typescript-plugin + * Parse the source with @babel/parser typescript-plugin */ - const babylonTypeScriptPluginResult = parse(source, { - parser: 'babylon-plugin-typescript', - babylonParserOptions: - fixture.config && fixture.config.babylonParserOptions - ? fixture.config.babylonParserOptions - : null + const babelParserResult = parse(source, { + parser: '@babel/parser', + jsx: fixture.jsx }); /** - * 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 (babylonTypeScriptPluginResult.parseError) { + 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 TS-ESTREE DID NOT] - ${filename}`, () => { expect(typeScriptESTreeResult.parseError).toEqual( - babylonTypeScriptPluginResult.parseError + babelParserResult.parseError ); }); return; } /** * Both parsers errored - this is OK as long as the errors are of the same "type" + * E.g. Both must be a SyntaxError, or both must be a RangeError etc. */ it(`[Both parsers error as expected] - ${filename}`, () => { - expect(babylonTypeScriptPluginResult.parseError.name).toEqual( + expect(babelParserResult.parseError.name).toEqual( typeScriptESTreeResult.parseError.name ); }); @@ -56,11 +51,11 @@ 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}`, () => { - expect(babylonTypeScriptPluginResult.parseError).toEqual( + it(`TEST FAIL [TS-ESTREE ERRORED, BUT BABEL DID NOT] - ${filename}`, () => { + expect(babelParserResult.parseError).toEqual( typeScriptESTreeResult.parseError ); }); @@ -71,17 +66,21 @@ 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 + * Perform some extra formatting steps on the babel AST before comparing */ expect( - parseUtils.removeLocationDataFromProgramNode( - parseUtils.preprocessBabylonAST(babylonTypeScriptPluginResult.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 0d1b1ca..34c3dab 100644 --- a/tests/ast-alignment/utils.ts +++ b/tests/ast-alignment/utils.ts @@ -1,4 +1,5 @@ import isPlainObject from 'lodash.isplainobject'; +import { AST_NODE_TYPES } from '../../src/ast-node-types'; /** * By default, pretty-format (within Jest matchers) retains the names/types of nodes from the babylon AST, @@ -14,59 +15,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 +82,188 @@ 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: 'directive', - predicate: always - }, - { - key: 'innerComments', - predicate: always - }, - { - key: 'leadingComments', - predicate: always - }, - { - key: 'trailingComments', - 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: 'guardedHandlers', - 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); + }, + /** + * 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; + } + }, + /** + * Awaiting feedback on Babel issue https://github.com/babel/babel/issues/9231 + */ + TSFunctionType(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 + */ + TSConstructorType(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 + */ + TSMethodSignature(node: any) { + if (node.typeAnnotation) { + node.returnType = node.typeAnnotation; + delete node.typeAnnotation; + } + if (node.parameters) { + node.params = node.parameters; + delete node.parameters; + } + }, + /** + * We want this node to be different + * @see https://github.com/JamesHenry/typescript-estree/issues/109 + */ + TSTypeParameter(node: any) { + if (node.name) { + node.name = { + loc: { + start: { + column: node.loc.start.column, + line: node.loc.start.line + }, + end: { + column: node.loc.start.column + node.name.length, + line: node.loc.start.line + } + }, + name: node.name, + range: [node.range[0], node.range[0] + node.name.length], + type: AST_NODE_TYPES.Identifier + }; + } + }, + /** + * Babel: ClassDeclaration + abstract: true + * ts-estree: TSAbstractClassDeclaration + */ + ClassDeclaration(node: any) { + if (node.abstract) { + node.type = 'TSAbstractClassDeclaration'; + delete node.abstract; + } + }, + /** + * Babel: ClassProperty + abstract: true + * ts-estree: TSAbstractClassProperty + */ + ClassProperty(node: any, parent: any) { + if (node.abstract) { + node.type = 'TSAbstractClassProperty'; + delete node.abstract; + } + }, + TSExpressionWithTypeArguments(node: any, parent: any) { + if (parent.type === 'TSInterfaceDeclaration') { + node.type = 'TSInterfaceHeritage'; + } else if ( + parent.type === 'ClassExpression' || + parent.type === 'ClassDeclaration' + ) { + node.type = 'TSClassImplements'; + } + } } - ]); + ); } /** @@ -135,13 +271,20 @@ 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 * @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/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/fixtures/javascript/basics/and-operator-array-object.src.js b/tests/fixtures/javascript/basics/and-operator-array-object.src.js new file mode 100644 index 0000000..44480a0 --- /dev/null +++ b/tests/fixtures/javascript/basics/and-operator-array-object.src.js @@ -0,0 +1,4 @@ +var v = {} && {} && [] && "" && ("" && {}); +var x = [] && [] && {} && "" && ("" && []); +var z = [] && []; +var y = {} && {}; diff --git a/tests/fixtures/javascript/basics/or-operator-array-object.src.js b/tests/fixtures/javascript/basics/or-operator-array-object.src.js new file mode 100644 index 0000000..0b78444 --- /dev/null +++ b/tests/fixtures/javascript/basics/or-operator-array-object.src.js @@ -0,0 +1,4 @@ +var v = {} || {} || [] || "" || ("" || {}); +var x = [] || [] || {} || "" || ("" || []); +var z = [] || []; +var y = {} || {}; 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/fixtures/javascript/callExpression/call-expression-with-array.src.js b/tests/fixtures/javascript/callExpression/call-expression-with-array.src.js new file mode 100644 index 0000000..4853044 --- /dev/null +++ b/tests/fixtures/javascript/callExpression/call-expression-with-array.src.js @@ -0,0 +1 @@ +foo([]); diff --git a/tests/fixtures/javascript/callExpression/call-expression-with-object.src.js b/tests/fixtures/javascript/callExpression/call-expression-with-object.src.js new file mode 100644 index 0000000..5f81d97 --- /dev/null +++ b/tests/fixtures/javascript/callExpression/call-expression-with-object.src.js @@ -0,0 +1 @@ +foo({}); diff --git a/tests/fixtures/javascript/callExpression/mixed-expression.src.js b/tests/fixtures/javascript/callExpression/mixed-expression.src.js new file mode 100644 index 0000000..004c3ef --- /dev/null +++ b/tests/fixtures/javascript/callExpression/mixed-expression.src.js @@ -0,0 +1,5 @@ +(function () { + (function () { + this.call({}, []) + })([]); +})({}); diff --git a/tests/fixtures/javascript/callExpression/new-expression-with-array.src.js b/tests/fixtures/javascript/callExpression/new-expression-with-array.src.js new file mode 100644 index 0000000..350613c --- /dev/null +++ b/tests/fixtures/javascript/callExpression/new-expression-with-array.src.js @@ -0,0 +1,2 @@ +new bar([]); +new bar([[{}]]); diff --git a/tests/fixtures/javascript/callExpression/new-expression-with-object.src.js b/tests/fixtures/javascript/callExpression/new-expression-with-object.src.js new file mode 100644 index 0000000..33f2eff --- /dev/null +++ b/tests/fixtures/javascript/callExpression/new-expression-with-object.src.js @@ -0,0 +1,2 @@ +new bar({}); + 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/javascript/destructuring/call-expression-destruction-array.src.js b/tests/fixtures/javascript/destructuring/call-expression-destruction-array.src.js new file mode 100644 index 0000000..1e7c8bb --- /dev/null +++ b/tests/fixtures/javascript/destructuring/call-expression-destruction-array.src.js @@ -0,0 +1 @@ +foo(...[]); diff --git a/tests/fixtures/javascript/destructuring/call-expression-destruction-object.src.js b/tests/fixtures/javascript/destructuring/call-expression-destruction-object.src.js new file mode 100644 index 0000000..216754d --- /dev/null +++ b/tests/fixtures/javascript/destructuring/call-expression-destruction-object.src.js @@ -0,0 +1 @@ +foo(...{}); 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/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-array.src.js b/tests/fixtures/javascript/forIn/for-in-array.src.js new file mode 100644 index 0000000..a756590 --- /dev/null +++ b/tests/fixtures/javascript/forIn/for-in-array.src.js @@ -0,0 +1 @@ +for (i in []) {} 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-object.src.js b/tests/fixtures/javascript/forIn/for-in-destruction-object.src.js new file mode 100644 index 0000000..44c6938 --- /dev/null +++ b/tests/fixtures/javascript/forIn/for-in-destruction-object.src.js @@ -0,0 +1 @@ +for (var {name, value} in obj) {} 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-with-body.src.js b/tests/fixtures/javascript/forIn/for-in-object-with-body.src.js new file mode 100644 index 0000000..ed66d4e --- /dev/null +++ b/tests/fixtures/javascript/forIn/for-in-object-with-body.src.js @@ -0,0 +1 @@ +for (i in {}) {} 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-rest.src.js b/tests/fixtures/javascript/forIn/for-in-with-rest.src.js new file mode 100644 index 0000000..cef90ad --- /dev/null +++ b/tests/fixtures/javascript/forIn/for-in-with-rest.src.js @@ -0,0 +1,2 @@ +for ({ x: xx, ...rrestOff } in array) { +} 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/fixtures/javascript/forOf/for-of-array.src.js b/tests/fixtures/javascript/forOf/for-of-array.src.js new file mode 100644 index 0000000..e91a157 --- /dev/null +++ b/tests/fixtures/javascript/forOf/for-of-array.src.js @@ -0,0 +1,2 @@ +for (let x of []) + doSomething(); diff --git a/tests/fixtures/javascript/forOf/for-of-destruction-object.src.js b/tests/fixtures/javascript/forOf/for-of-destruction-object.src.js new file mode 100644 index 0000000..3a2fd43 --- /dev/null +++ b/tests/fixtures/javascript/forOf/for-of-destruction-object.src.js @@ -0,0 +1 @@ +for (var {name, value} of obj) {} diff --git a/tests/fixtures/javascript/forOf/for-of-destruction.src.js b/tests/fixtures/javascript/forOf/for-of-destruction.src.js new file mode 100644 index 0000000..d39ffd3 --- /dev/null +++ b/tests/fixtures/javascript/forOf/for-of-destruction.src.js @@ -0,0 +1 @@ +for (var [name, value] of obj) {} diff --git a/tests/fixtures/javascript/forOf/for-of-object.src.js b/tests/fixtures/javascript/forOf/for-of-object.src.js new file mode 100644 index 0000000..ad1fe32 --- /dev/null +++ b/tests/fixtures/javascript/forOf/for-of-object.src.js @@ -0,0 +1,2 @@ +for (let x of {}) + doSomething(); diff --git a/tests/fixtures/javascript/forOf/for-of-with-rest.src.js b/tests/fixtures/javascript/forOf/for-of-with-rest.src.js new file mode 100644 index 0000000..157c798 --- /dev/null +++ b/tests/fixtures/javascript/forOf/for-of-with-rest.src.js @@ -0,0 +1,2 @@ +for ({ x: xx, ...rrestOff } of array) { +} diff --git a/tests/fixtures/javascript/labels/label-break.src.js b/tests/fixtures/javascript/labels/label-break.src.js new file mode 100644 index 0000000..fc6d422 --- /dev/null +++ b/tests/fixtures/javascript/labels/label-break.src.js @@ -0,0 +1,5 @@ +loop1: + while(true) { + break loop1; + break; + } diff --git a/tests/fixtures/javascript/labels/label-continue.src.js b/tests/fixtures/javascript/labels/label-continue.src.js new file mode 100644 index 0000000..4243ace --- /dev/null +++ b/tests/fixtures/javascript/labels/label-continue.src.js @@ -0,0 +1,5 @@ +loop1: + while(true) { + continue loop1; + continue; + } 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/javascript/spread/complex-spread.src.js b/tests/fixtures/javascript/spread/complex-spread.src.js new file mode 100644 index 0000000..d4df1f9 --- /dev/null +++ b/tests/fixtures/javascript/spread/complex-spread.src.js @@ -0,0 +1 @@ +({x: { ka, ...nested }, y: other, f: { a: [{ ...nested2 }, ...y], b: { z, ...c }, ...rest2 }, ...rest} = complex); 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/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/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/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/class-with-property-values.src.ts b/tests/fixtures/typescript/basics/class-with-property-values.src.ts new file mode 100644 index 0000000..047fabd --- /dev/null +++ b/tests/fixtures/typescript/basics/class-with-property-values.src.ts @@ -0,0 +1,7 @@ +class Foo { + a = 2; + b = {}; + c = []; + d = ""; + e = new Array([{}, [], 2]); +} 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/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/fixtures/typescript/basics/export-declare-const-named-enum.src.ts b/tests/fixtures/typescript/basics/export-declare-const-named-enum.src.ts new file mode 100644 index 0000000..7bbafe1 --- /dev/null +++ b/tests/fixtures/typescript/basics/export-declare-const-named-enum.src.ts @@ -0,0 +1,4 @@ +export declare const enum Foo { + foo = 1, + bar +} diff --git a/tests/fixtures/typescript/basics/export-declare-named-enum.src.ts b/tests/fixtures/typescript/basics/export-declare-named-enum.src.ts new file mode 100644 index 0000000..2864376 --- /dev/null +++ b/tests/fixtures/typescript/basics/export-declare-named-enum.src.ts @@ -0,0 +1,4 @@ +export declare enum Foo { + foo = 1, + bar +} diff --git a/tests/fixtures/typescript/basics/function-overloads.src.ts b/tests/fixtures/typescript/basics/function-overloads.src.ts new file mode 100644 index 0000000..27fb059 --- /dev/null +++ b/tests/fixtures/typescript/basics/function-overloads.src.ts @@ -0,0 +1,5 @@ +export function f(x: number): number; +export function f(x: string): string; +export function f(x: string | number): string | number { + return x; +} 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/fixtures/typescript/basics/interface-with-method.src.ts b/tests/fixtures/typescript/basics/interface-with-method.src.ts new file mode 100644 index 0000000..4171537 --- /dev/null +++ b/tests/fixtures/typescript/basics/interface-with-method.src.ts @@ -0,0 +1,4 @@ +interface test { + h(bar: string): void; + g(bar: T): T; +} diff --git a/tests/fixtures/typescript/basics/parenthesized-use-strict.src.ts b/tests/fixtures/typescript/basics/parenthesized-use-strict.src.ts new file mode 100644 index 0000000..b0dd2af --- /dev/null +++ b/tests/fixtures/typescript/basics/parenthesized-use-strict.src.ts @@ -0,0 +1,2 @@ +// this should not be classed as a directive +("use strict"); \ No newline at end of file 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/fixtures/typescript/basics/type-guard-in-arrow-function.src.ts b/tests/fixtures/typescript/basics/type-guard-in-arrow-function.src.ts new file mode 100644 index 0000000..7157427 --- /dev/null +++ b/tests/fixtures/typescript/basics/type-guard-in-arrow-function.src.ts @@ -0,0 +1,3 @@ +const isString = (x: any): x is string => { + return typeof x === 'string' +} diff --git a/tests/fixtures/typescript/basics/type-guard.src.ts b/tests/fixtures/typescript/basics/type-guard-in-function.src.ts similarity index 100% rename from tests/fixtures/typescript/basics/type-guard.src.ts rename to tests/fixtures/typescript/basics/type-guard-in-function.src.ts diff --git a/tests/fixtures/typescript/basics/type-guard-in-interface.src.ts b/tests/fixtures/typescript/basics/type-guard-in-interface.src.ts new file mode 100644 index 0000000..d432312 --- /dev/null +++ b/tests/fixtures/typescript/basics/type-guard-in-interface.src.ts @@ -0,0 +1,3 @@ +interface Foo { + isString(node: any): node is string; +} diff --git a/tests/fixtures/typescript/basics/type-guard-in-method.src.ts b/tests/fixtures/typescript/basics/type-guard-in-method.src.ts new file mode 100644 index 0000000..843f1f5 --- /dev/null +++ b/tests/fixtures/typescript/basics/type-guard-in-method.src.ts @@ -0,0 +1,8 @@ +class Foo { + isBar(): this is string { + return this instanceof Foo; + } + isBaz = (): this is string => { + return this instanceof Foo; + } +} 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/basics/typed-method-signature.src.ts b/tests/fixtures/typescript/basics/typed-method-signature.src.ts new file mode 100644 index 0000000..072d006 --- /dev/null +++ b/tests/fixtures/typescript/basics/typed-method-signature.src.ts @@ -0,0 +1,4 @@ +type Foo = { + h(bar: string): void; + g(bar: T): T; +} 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/fixtures/typescript/errorRecovery/class-multiple-implements.src.ts b/tests/fixtures/typescript/errorRecovery/class-multiple-implements.src.ts new file mode 100644 index 0000000..4ecd2ee --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/class-multiple-implements.src.ts @@ -0,0 +1 @@ +class a implements b implements c {} diff --git a/tests/fixtures/typescript/errorRecovery/index-signature-parameters.src.ts b/tests/fixtures/typescript/errorRecovery/index-signature-parameters.src.ts new file mode 100644 index 0000000..f792269 --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/index-signature-parameters.src.ts @@ -0,0 +1,3 @@ +type foo = { + [a: string, b: string]: string; +} diff --git a/tests/fixtures/typescript/errorRecovery/interface-implements.src.ts b/tests/fixtures/typescript/errorRecovery/interface-implements.src.ts new file mode 100644 index 0000000..d3b8c72 --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-implements.src.ts @@ -0,0 +1 @@ +interface d implements e {} diff --git a/tests/fixtures/typescript/errorRecovery/interface-index-signature-export.src.ts b/tests/fixtures/typescript/errorRecovery/interface-index-signature-export.src.ts new file mode 100644 index 0000000..32d5974 --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-index-signature-export.src.ts @@ -0,0 +1,4 @@ +interface Foo { + export [baz: string]: string; +} + diff --git a/tests/fixtures/typescript/errorRecovery/interface-index-signature-private.src.ts b/tests/fixtures/typescript/errorRecovery/interface-index-signature-private.src.ts new file mode 100644 index 0000000..fca05ad --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-index-signature-private.src.ts @@ -0,0 +1,4 @@ +interface Foo { + private [baz: string]: string; +} + diff --git a/tests/fixtures/typescript/errorRecovery/interface-index-signature-protected.src.ts b/tests/fixtures/typescript/errorRecovery/interface-index-signature-protected.src.ts new file mode 100644 index 0000000..4ba7918 --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-index-signature-protected.src.ts @@ -0,0 +1,4 @@ +interface Foo { + protected [baz: string]: string; +} + diff --git a/tests/fixtures/typescript/errorRecovery/interface-index-signature-public.src.ts b/tests/fixtures/typescript/errorRecovery/interface-index-signature-public.src.ts new file mode 100644 index 0000000..963b1d9 --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-index-signature-public.src.ts @@ -0,0 +1,4 @@ +interface Foo { + public [baz: string]: string; +} + diff --git a/tests/fixtures/typescript/errorRecovery/interface-index-signature-static.src.ts b/tests/fixtures/typescript/errorRecovery/interface-index-signature-static.src.ts new file mode 100644 index 0000000..729350f --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-index-signature-static.src.ts @@ -0,0 +1,4 @@ +interface Foo { + static [baz: string]: string; +} + diff --git a/tests/fixtures/typescript/errorRecovery/interface-method-export.src.ts b/tests/fixtures/typescript/errorRecovery/interface-method-export.src.ts new file mode 100644 index 0000000..45e722d --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-method-export.src.ts @@ -0,0 +1,4 @@ +interface Foo { + export g(bar: string): void; +} + diff --git a/tests/fixtures/typescript/errorRecovery/interface-method-private.src.ts b/tests/fixtures/typescript/errorRecovery/interface-method-private.src.ts new file mode 100644 index 0000000..af4488e --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-method-private.src.ts @@ -0,0 +1,4 @@ +interface Foo { + private g(bar: string): void; +} + diff --git a/tests/fixtures/typescript/errorRecovery/interface-method-protected.src.ts b/tests/fixtures/typescript/errorRecovery/interface-method-protected.src.ts new file mode 100644 index 0000000..2b7bb10 --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-method-protected.src.ts @@ -0,0 +1,4 @@ +interface Foo { + protected g(bar: string): void; +} + diff --git a/tests/fixtures/typescript/errorRecovery/interface-method-public.src.ts b/tests/fixtures/typescript/errorRecovery/interface-method-public.src.ts new file mode 100644 index 0000000..0f9914f --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-method-public.src.ts @@ -0,0 +1,4 @@ +interface Foo { + public g(bar: string): void; +} + diff --git a/tests/fixtures/typescript/errorRecovery/interface-method-static.src.ts b/tests/fixtures/typescript/errorRecovery/interface-method-static.src.ts new file mode 100644 index 0000000..84b3f3f --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-method-static.src.ts @@ -0,0 +1,4 @@ +interface Foo { + static g(bar: string): void; +} + diff --git a/tests/fixtures/typescript/errorRecovery/interface-multiple-extends.src.ts b/tests/fixtures/typescript/errorRecovery/interface-multiple-extends.src.ts new file mode 100644 index 0000000..343867f --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-multiple-extends.src.ts @@ -0,0 +1 @@ +interface foo extends bar extends baz {} diff --git a/tests/fixtures/typescript/errorRecovery/interface-property-export.src.ts b/tests/fixtures/typescript/errorRecovery/interface-property-export.src.ts new file mode 100644 index 0000000..c24282e --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-property-export.src.ts @@ -0,0 +1,4 @@ +interface Foo { + export a: string; +} + diff --git a/tests/fixtures/typescript/errorRecovery/interface-property-modifiers.src.ts b/tests/fixtures/typescript/errorRecovery/interface-property-modifiers.src.ts deleted file mode 100644 index 02c0c91..0000000 --- a/tests/fixtures/typescript/errorRecovery/interface-property-modifiers.src.ts +++ /dev/null @@ -1,24 +0,0 @@ -interface Foo { - bar: string = 'a'; - public a: string; - private b: string; - protected c: string; - static d: string; - export e: string; - readonly f: string; - - public [baz: string]: string; - private [baz: string]: string; - protected [baz: string]: string; - static [baz: string]: string; - export [baz: string]: string; - readonly [baz: string]: string; - - public g(bar: string): void; - private h(bar: string): void; - protected i(bar: string): void; - static j(bar: string): void; - export k(bar: string): void; - readonly l(bar: string): void; -} - diff --git a/tests/fixtures/typescript/errorRecovery/interface-property-private.src.ts b/tests/fixtures/typescript/errorRecovery/interface-property-private.src.ts new file mode 100644 index 0000000..33f0092 --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-property-private.src.ts @@ -0,0 +1,4 @@ +interface Foo { + private b: string; +} + diff --git a/tests/fixtures/typescript/errorRecovery/interface-property-protected.src.ts b/tests/fixtures/typescript/errorRecovery/interface-property-protected.src.ts new file mode 100644 index 0000000..20f839a --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-property-protected.src.ts @@ -0,0 +1,4 @@ +interface Foo { + protected a: string; +} + diff --git a/tests/fixtures/typescript/errorRecovery/interface-property-public.src.ts b/tests/fixtures/typescript/errorRecovery/interface-property-public.src.ts new file mode 100644 index 0000000..f9fb03e --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-property-public.src.ts @@ -0,0 +1,4 @@ +interface Foo { + public a: string; +} + diff --git a/tests/fixtures/typescript/errorRecovery/interface-property-static.src.ts b/tests/fixtures/typescript/errorRecovery/interface-property-static.src.ts new file mode 100644 index 0000000..ae41b9b --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-property-static.src.ts @@ -0,0 +1,4 @@ +interface Foo { + static a: string; +} + diff --git a/tests/fixtures/typescript/errorRecovery/interface-property-with-default-value.src.ts b/tests/fixtures/typescript/errorRecovery/interface-property-with-default-value.src.ts new file mode 100644 index 0000000..4a90a54 --- /dev/null +++ b/tests/fixtures/typescript/errorRecovery/interface-property-with-default-value.src.ts @@ -0,0 +1,3 @@ +interface Foo { + bar: string = 'a'; +} 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/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-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/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/constructor-generic.src.ts b/tests/fixtures/typescript/types/constructor-generic.src.ts new file mode 100644 index 0000000..f16a76d --- /dev/null +++ b/tests/fixtures/typescript/types/constructor-generic.src.ts @@ -0,0 +1 @@ +let f: new (a: T) => T; diff --git a/tests/fixtures/typescript/types/constructor-in-generic.src.ts b/tests/fixtures/typescript/types/constructor-in-generic.src.ts new file mode 100644 index 0000000..d9ea30e --- /dev/null +++ b/tests/fixtures/typescript/types/constructor-in-generic.src.ts @@ -0,0 +1 @@ +let x: Array string>; diff --git a/tests/fixtures/typescript/types/constructor-with-rest.src.ts b/tests/fixtures/typescript/types/constructor-with-rest.src.ts new file mode 100644 index 0000000..c3d9b7e --- /dev/null +++ b/tests/fixtures/typescript/types/constructor-with-rest.src.ts @@ -0,0 +1 @@ +let f: new (...a: number[]) => void; diff --git a/tests/fixtures/typescript/types/constructor.src.ts b/tests/fixtures/typescript/types/constructor.src.ts new file mode 100644 index 0000000..d240547 --- /dev/null +++ b/tests/fixtures/typescript/types/constructor.src.ts @@ -0,0 +1 @@ +let f: new (a: number, b?: number) => void; diff --git a/tests/fixtures/typescript/types/function-generic.src.ts b/tests/fixtures/typescript/types/function-generic.src.ts new file mode 100644 index 0000000..61d8ece --- /dev/null +++ b/tests/fixtures/typescript/types/function-generic.src.ts @@ -0,0 +1 @@ +let f: (a: T) => T; diff --git a/tests/fixtures/typescript/types/function-in-generic.src.ts b/tests/fixtures/typescript/types/function-in-generic.src.ts new file mode 100644 index 0000000..6b9a571 --- /dev/null +++ b/tests/fixtures/typescript/types/function-in-generic.src.ts @@ -0,0 +1 @@ +let x: Array<() => void>; diff --git a/tests/fixtures/typescript/types/function-with-rest.src.ts b/tests/fixtures/typescript/types/function-with-rest.src.ts new file mode 100644 index 0000000..7dabdd6 --- /dev/null +++ b/tests/fixtures/typescript/types/function-with-rest.src.ts @@ -0,0 +1 @@ +let f: (...a: number[]) => void; diff --git a/tests/fixtures/typescript/types/function-with-this.src.ts b/tests/fixtures/typescript/types/function-with-this.src.ts new file mode 100644 index 0000000..cd13ed0 --- /dev/null +++ b/tests/fixtures/typescript/types/function-with-this.src.ts @@ -0,0 +1 @@ +let f: (this: number) => void; diff --git a/tests/fixtures/typescript/types/function.src.ts b/tests/fixtures/typescript/types/function.src.ts new file mode 100644 index 0000000..b82de11 --- /dev/null +++ b/tests/fixtures/typescript/types/function.src.ts @@ -0,0 +1 @@ +let f: (a: number, b?: number) => void; diff --git a/tests/fixtures/typescript/types/index-signature-readonly.src.ts b/tests/fixtures/typescript/types/index-signature-readonly.src.ts new file mode 100644 index 0000000..2d33034 --- /dev/null +++ b/tests/fixtures/typescript/types/index-signature-readonly.src.ts @@ -0,0 +1,3 @@ +type foo = { + readonly [key: number]: number; +} diff --git a/tests/fixtures/typescript/types/index-signature-without-type.src.ts b/tests/fixtures/typescript/types/index-signature-without-type.src.ts new file mode 100644 index 0000000..1994449 --- /dev/null +++ b/tests/fixtures/typescript/types/index-signature-without-type.src.ts @@ -0,0 +1,3 @@ +type foo = { + [a: string]; +} diff --git a/tests/fixtures/typescript/types/index-signature.src.ts b/tests/fixtures/typescript/types/index-signature.src.ts new file mode 100644 index 0000000..6e828cc --- /dev/null +++ b/tests/fixtures/typescript/types/index-signature.src.ts @@ -0,0 +1,3 @@ +type foo = { + [a: string]: 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/literal-number-negative.src.ts b/tests/fixtures/typescript/types/literal-number-negative.src.ts new file mode 100644 index 0000000..48e57ca --- /dev/null +++ b/tests/fixtures/typescript/types/literal-number-negative.src.ts @@ -0,0 +1 @@ +let x: -1; 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/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/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/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__/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__/javascript.ts.snap b/tests/lib/__snapshots__/javascript.ts.snap index 35c0cb4..f6c0c50 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 { @@ -9664,235 +9674,251 @@ Object { } `; -exports[`javascript fixtures/basics/delete-expression.src 1`] = ` +exports[`javascript fixtures/basics/and-operator-array-object.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "object": Object { + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 10, + "column": 5, "line": 1, }, "start": Object { - "column": 7, + "column": 4, "line": 1, }, }, - "name": "foo", + "name": "v", "range": Array [ - 7, - 10, + 4, + 5, ], "type": "Identifier", }, - "property": Object { + "init": Object { + "left": Object { + "left": Object { + "left": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 8, + 10, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "operator": "&&", + "range": Array [ + 8, + 16, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 14, + 16, + ], + "type": "ObjectExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "operator": "&&", + "range": Array [ + 8, + 22, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "ArrayExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "operator": "&&", + "range": Array [ + 8, + 28, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 28, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "type": "LogicalExpression", + }, "loc": Object { "end": Object { - "column": 14, + "column": 42, "line": 1, }, "start": Object { - "column": 11, + "column": 8, "line": 1, }, }, - "name": "bar", + "operator": "&&", "range": Array [ - 11, - 14, + 8, + 42, ], - "type": "Identifier", + "right": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 35, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "operator": "&&", + "range": Array [ + 33, + 41, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 39, + 41, + ], + "type": "ObjectExpression", + }, + "type": "LogicalExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, "range": Array [ - 7, - 14, + 4, + 42, ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "delete", - "prefix": true, - "range": Array [ - 0, - 14, - ], - "type": "UnaryExpression", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "delete", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, + "type": "VariableDeclarator", }, - }, - "range": Array [ - 14, - 15, ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/basics/do-while-statements.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "EmptyStatement", - }, + "kind": "var", "loc": Object { "end": Object { - "column": 13, + "column": 43, "line": 1, }, "start": Object { @@ -9902,28 +9928,9 @@ Object { }, "range": Array [ 0, - 13, + 43, ], - "test": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "DoWhileStatement", + "type": "VariableDeclaration", }, Object { "declarations": Array [ @@ -9932,241 +9939,477 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 3, + "line": 2, }, "start": Object { "column": 4, - "line": 3, + "line": 2, }, }, - "name": "i", + "name": "x", "range": Array [ - 19, - 20, + 48, + 49, ], "type": "Identifier", }, "init": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 23, - 24, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 19, - 24, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 25, - ], - "type": "VariableDeclaration", - }, - Object { - "body": Object { - "body": Array [ - Object { - "expression": Object { + "left": Object { "left": Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 5, + "left": Object { + "left": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 52, + 54, + ], + "type": "ArrayExpression", }, - "start": Object { - "column": 3, - "line": 5, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, }, - }, - "name": "i", - "range": Array [ - 34, - 35, + "operator": "&&", + "range": Array [ + 52, + 60, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 58, + 60, + ], + "type": "ArrayExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "operator": "&&", + "range": Array [ + 52, + 66, ], - "type": "Identifier", + "right": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "properties": Array [], + "range": Array [ + 64, + 66, + ], + "type": "ObjectExpression", + }, + "type": "LogicalExpression", }, "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 28, + "line": 2, }, "start": Object { - "column": 3, - "line": 5, + "column": 8, + "line": 2, }, }, - "operator": "+=", + "operator": "&&", "range": Array [ - 34, - 40, + 52, + 72, ], "right": Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 28, + "line": 2, }, "start": Object { - "column": 8, - "line": 5, + "column": 26, + "line": 2, }, }, "range": Array [ - 39, - 40, + 70, + 72, ], - "raw": "1", + "raw": "\\"\\"", "type": "Literal", - "value": 1, + "value": "", }, - "type": "AssignmentExpression", + "type": "LogicalExpression", }, "loc": Object { "end": Object { - "column": 10, - "line": 5, + "column": 42, + "line": 2, }, "start": Object { - "column": 3, - "line": 5, + "column": 8, + "line": 2, }, }, + "operator": "&&", "range": Array [ - 34, - 41, + 52, + 86, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, + "right": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 77, + 79, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "operator": "&&", + "range": Array [ + 77, + 85, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 39, + "line": 2, + }, + }, + "range": Array [ + 83, + 85, + ], + "type": "ArrayExpression", + }, + "type": "LogicalExpression", + }, + "type": "LogicalExpression", }, - "start": Object { - "column": 3, - "line": 4, + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, }, + "range": Array [ + 48, + 86, + ], + "type": "VariableDeclarator", }, - "range": Array [ - 29, - 43, - ], - "type": "BlockStatement", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 16, - "line": 6, + "column": 43, + "line": 2, }, "start": Object { "column": 0, - "line": 4, + "line": 2, }, }, "range": Array [ - 26, - 58, + 44, + 87, ], - "test": Object { - "left": Object { + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "z", + "range": Array [ + 92, + 93, + ], + "type": "Identifier", + }, + "init": Object { + "left": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 96, + 98, + ], + "type": "ArrayExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "operator": "&&", + "range": Array [ + 96, + 104, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 102, + 104, + ], + "type": "ArrayExpression", + }, + "type": "LogicalExpression", + }, "loc": Object { "end": Object { - "column": 10, - "line": 6, + "column": 16, + "line": 3, }, "start": Object { - "column": 9, - "line": 6, + "column": 4, + "line": 3, }, }, - "name": "i", "range": Array [ - 51, - 52, + 92, + 104, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - "loc": Object { - "end": Object { - "column": 14, - "line": 6, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 88, + 105, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "name": "y", + "range": Array [ + 110, + 111, + ], + "type": "Identifier", }, - "start": Object { - "column": 9, - "line": 6, + "init": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "properties": Array [], + "range": Array [ + 114, + 116, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "operator": "&&", + "range": Array [ + 114, + 122, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "properties": Array [], + "range": Array [ + 120, + 122, + ], + "type": "ObjectExpression", + }, + "type": "LogicalExpression", }, - }, - "operator": "<", - "range": Array [ - 51, - 56, - ], - "right": Object { "loc": Object { "end": Object { - "column": 14, - "line": 6, + "column": 16, + "line": 4, }, "start": Object { - "column": 13, - "line": 6, + "column": 4, + "line": 4, }, }, "range": Array [ - 55, - 56, + 110, + 122, ], - "raw": "5", - "type": "Literal", - "value": 5, + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, }, - "type": "BinaryExpression", }, - "type": "DoWhileStatement", + "range": Array [ + 106, + 123, + ], + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 7, + "line": 5, }, "start": Object { "column": 0, @@ -10175,14 +10418,14 @@ Object { }, "range": Array [ 0, - 59, + 124, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 2, + "column": 3, "line": 1, }, "start": Object { @@ -10192,87 +10435,87 @@ Object { }, "range": Array [ 0, - 2, + 3, ], "type": "Keyword", - "value": "do", + "value": "var", }, 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": "v", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, "range": Array [ - 4, - 9, + 6, + 7, ], - "type": "Keyword", - "value": "while", + "type": "Punctuator", + "value": "=", }, 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": "Punctuator", - "value": "(", + "value": "{", }, 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": "Numeric", - "value": "1", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 13, "line": 1, }, "start": Object { @@ -10282,182 +10525,200 @@ Object { }, "range": Array [ 11, - 12, + 13, ], "type": "Punctuator", - "value": ")", + "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 { "end": Object { - "column": 3, - "line": 3, + "column": 16, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 15, + "line": 1, }, }, "range": Array [ 15, - 18, + 16, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 19, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 17, + "line": 1, }, }, "range": Array [ + 17, 19, - 20, ], - "type": "Identifier", - "value": "i", + "type": "Punctuator", + "value": "&&", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 21, + "line": 1, }, "start": Object { - "column": 6, - "line": 3, + "column": 20, + "line": 1, }, }, "range": Array [ + 20, 21, - 22, ], "type": "Punctuator", - "value": "=", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 22, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 21, + "line": 1, }, }, "range": Array [ - 23, - 24, + 21, + 22, ], - "type": "Numeric", - "value": "0", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { - "column": 9, - "line": 3, + "column": 23, + "line": 1, }, }, "range": Array [ - 24, + 23, 25, ], "type": "Punctuator", - "value": ";", + "value": "&&", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 28, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 26, + "line": 1, }, }, "range": Array [ 26, 28, ], - "type": "Keyword", - "value": "do", + "type": "String", + "value": "\\"\\"", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 4, + "column": 31, + "line": 1, }, "start": Object { - "column": 3, - "line": 4, + "column": 29, + "line": 1, }, }, "range": Array [ 29, - 30, + 31, ], "type": "Punctuator", - "value": "{", + "value": "&&", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 5, + "column": 33, + "line": 1, }, "start": Object { - "column": 3, - "line": 5, + "column": 32, + "line": 1, }, }, "range": Array [ - 34, + 32, + 33, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, 35, ], - "type": "Identifier", - "value": "i", + "type": "String", + "value": "\\"\\"", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 38, + "line": 1, }, "start": Object { - "column": 5, - "line": 5, + "column": 36, + "line": 1, }, }, "range": Array [ @@ -10465,35 +10726,35 @@ Object { 38, ], "type": "Punctuator", - "value": "+=", + "value": "&&", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 40, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 39, + "line": 1, }, }, "range": Array [ 39, 40, ], - "type": "Numeric", - "value": "1", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 5, + "column": 41, + "line": 1, }, "start": Object { - "column": 9, - "line": 5, + "column": 40, + "line": 1, }, }, "range": Array [ @@ -10501,851 +10762,813 @@ Object { 41, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 42, + "line": 1, }, "start": Object { - "column": 0, - "line": 6, + "column": 41, + "line": 1, }, }, "range": Array [ + 41, 42, - 43, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 6, + "column": 43, + "line": 1, }, "start": Object { - "column": 2, - "line": 6, + "column": 42, + "line": 1, }, }, "range": Array [ - 44, - 49, + 42, + 43, ], - "type": "Keyword", - "value": "while", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 6, + "column": 3, + "line": 2, }, "start": Object { - "column": 8, - "line": 6, + "column": 0, + "line": 2, }, }, "range": Array [ - 50, - 51, + 44, + 47, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 6, + "column": 5, + "line": 2, }, "start": Object { - "column": 9, - "line": 6, + "column": 4, + "line": 2, }, }, "range": Array [ - 51, - 52, + 48, + 49, ], "type": "Identifier", - "value": "i", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 6, + "column": 7, + "line": 2, }, "start": Object { - "column": 11, - "line": 6, + "column": 6, + "line": 2, }, }, "range": Array [ - 53, - 54, + 50, + 51, ], "type": "Punctuator", - "value": "<", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 6, + "column": 9, + "line": 2, }, "start": Object { - "column": 13, - "line": 6, + "column": 8, + "line": 2, }, }, "range": Array [ - 55, - 56, + 52, + 53, ], - "type": "Numeric", - "value": "5", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 6, + "column": 10, + "line": 2, }, "start": Object { - "column": 14, - "line": 6, + "column": 9, + "line": 2, }, }, "range": Array [ - 56, - 57, + 53, + 54, ], "type": "Punctuator", - "value": ")", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 6, + "column": 13, + "line": 2, }, "start": Object { - "column": 15, - "line": 6, + "column": 11, + "line": 2, }, }, "range": Array [ + 55, 57, - 58, ], "type": "Punctuator", - "value": ";", + "value": "&&", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/basics/identifiers-double-underscore.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "__test", - "range": Array [ - 4, - 10, - ], - "type": "Identifier", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 17, - ], - "raw": "'ff'", - "type": "Literal", - "value": "ff", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 17, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 0, - 18, + 58, + 59, ], - "type": "VariableDeclaration", + "type": "Punctuator", + "value": "[", }, Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 32, - 36, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "name": "__Foo", - "range": Array [ - 26, - 31, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 16, + "line": 2, }, "start": Object { - "column": 0, - "line": 3, + "column": 15, + "line": 2, }, }, "range": Array [ - 20, - 36, + 59, + 60, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "Punctuator", + "value": "]", }, Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 7, - }, - }, - "range": Array [ - 55, - 59, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 7, - }, - "start": Object { - "column": 9, - "line": 7, - }, - }, - "name": "__Bar", - "range": Array [ - 47, - 52, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 19, + "line": 2, }, "start": Object { - "column": 0, - "line": 7, + "column": 17, + "line": 2, }, }, - "params": Array [], "range": Array [ - 38, - 59, + 61, + 63, ], - "type": "FunctionDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "&&", }, - }, - "range": Array [ - 0, - 60, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 21, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 20, + "line": 2, }, }, "range": Array [ - 0, - 3, + 64, + 65, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 4, - "line": 1, + "column": 21, + "line": 2, }, }, "range": Array [ - 4, - 10, + 65, + 66, ], - "type": "Identifier", - "value": "__test", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ - 11, - 12, + 67, + 69, ], "type": "Punctuator", - "value": "=", + "value": "&&", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 28, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 26, + "line": 2, }, }, "range": Array [ - 13, - 17, + 70, + 72, ], "type": "String", - "value": "'ff'", + "value": "\\"\\"", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 31, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 29, + "line": 2, }, }, "range": Array [ - 17, - 18, + 73, + 75, ], "type": "Punctuator", - "value": ";", + "value": "&&", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 33, + "line": 2, }, "start": Object { - "column": 0, - "line": 3, + "column": 32, + "line": 2, }, }, "range": Array [ - 20, - 25, + 76, + 77, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 35, + "line": 2, }, "start": Object { - "column": 6, - "line": 3, + "column": 33, + "line": 2, }, }, "range": Array [ - 26, - 31, + 77, + 79, ], - "type": "Identifier", - "value": "__Foo", + "type": "String", + "value": "\\"\\"", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 38, + "line": 2, }, "start": Object { - "column": 12, - "line": 3, + "column": 36, + "line": 2, }, }, "range": Array [ - 32, - 33, + 80, + 82, ], "type": "Punctuator", - "value": "{", + "value": "&&", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 40, + "line": 2, }, "start": Object { - "column": 0, - "line": 5, + "column": 39, + "line": 2, }, }, "range": Array [ - 35, - 36, + 83, + 84, ], "type": "Punctuator", - "value": "}", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 7, + "column": 41, + "line": 2, + }, + "start": Object { + "column": 40, + "line": 2, + }, + }, + "range": Array [ + 84, + 85, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 41, + "line": 2, + }, + }, + "range": Array [ + 85, + 86, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 2, + }, + "start": Object { + "column": 42, + "line": 2, + }, + }, + "range": Array [ + 86, + 87, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, }, "start": Object { "column": 0, - "line": 7, + "line": 3, }, }, "range": Array [ - 38, - 46, + 88, + 91, ], "type": "Keyword", - "value": "function", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 7, + "column": 5, + "line": 3, }, "start": Object { - "column": 9, - "line": 7, + "column": 4, + "line": 3, }, }, "range": Array [ - 47, - 52, + 92, + 93, ], "type": "Identifier", - "value": "__Bar", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 94, + 95, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 96, + 97, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 97, + 98, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 99, + 101, + ], + "type": "Punctuator", + "value": "&&", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 7, + "line": 3, }, "start": Object { "column": 14, - "line": 7, + "line": 3, }, }, "range": Array [ - 52, - 53, + 102, + 103, ], "type": "Punctuator", - "value": "(", + "value": "[", }, Object { "loc": Object { "end": Object { "column": 16, - "line": 7, + "line": 3, }, "start": Object { "column": 15, - "line": 7, + "line": 3, }, }, "range": Array [ - 53, - 54, + 103, + 104, ], "type": "Punctuator", - "value": ")", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 7, + "column": 17, + "line": 3, }, "start": Object { - "column": 17, - "line": 7, + "column": 16, + "line": 3, }, }, "range": Array [ - 55, - 56, + 104, + 105, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 3, + "line": 4, }, "start": Object { "column": 0, - "line": 9, + "line": 4, }, }, "range": Array [ - 58, - 59, + 106, + 109, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "var", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/basics/instanceof.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 2, - ], - "raw": "''", - "type": "Literal", - "value": "", + "loc": Object { + "end": Object { + "column": 5, + "line": 4, }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "start": Object { + "column": 4, + "line": 4, }, - "operator": "instanceof", - "range": Array [ - 0, - 17, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "Set", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", + }, + "range": Array [ + 110, + 111, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, }, - "type": "BinaryExpression", }, + "range": Array [ + 112, + 113, + ], + "type": "Punctuator", + "value": "=", + }, + Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 9, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 4, }, }, "range": Array [ - 0, - 17, + 114, + 115, ], - "type": "ExpressionStatement", + "type": "Punctuator", + "value": "{", }, - ], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "range": Array [ + 115, + 116, + ], + "type": "Punctuator", + "value": "}", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 11, + "line": 4, + }, + }, + "range": Array [ + 117, + 119, + ], + "type": "Punctuator", + "value": "&&", }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 2, - "line": 1, + "column": 15, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 14, + "line": 4, }, }, "range": Array [ - 0, - 2, + 120, + 121, ], - "type": "String", - "value": "''", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 16, + "line": 4, }, "start": Object { - "column": 3, - "line": 1, + "column": 15, + "line": 4, }, }, "range": Array [ - 3, - 13, + 121, + 122, ], - "type": "Keyword", - "value": "instanceof", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 17, - "line": 1, + "line": 4, }, "start": Object { - "column": 14, - "line": 1, + "column": 16, + "line": 4, }, }, "range": Array [ - 14, - 17, + 122, + 123, ], - "type": "Identifier", - "value": "Set", + "type": "Punctuator", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/basics/new-with-member-expression.src 1`] = ` +exports[`javascript fixtures/basics/delete-expression.src 1`] = ` Object { "body": Array [ Object { "expression": Object { - "arguments": Array [], - "callee": Object { + "argument": Object { "computed": false, "loc": Object { "end": Object { - "column": 11, + "column": 14, "line": 1, }, "start": Object { - "column": 4, + "column": 7, "line": 1, }, }, "object": Object { "loc": Object { "end": Object { - "column": 7, + "column": 10, "line": 1, }, "start": Object { - "column": 4, + "column": 7, "line": 1, }, }, "name": "foo", "range": Array [ - 4, 7, + 10, ], "type": "Identifier", }, "property": Object { "loc": Object { "end": Object { - "column": 11, + "column": 14, "line": 1, }, "start": Object { - "column": 8, + "column": 11, "line": 1, }, }, "name": "bar", "range": Array [ - 8, 11, + 14, ], "type": "Identifier", }, "range": Array [ - 4, - 11, + 7, + 14, ], "type": "MemberExpression", }, "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 1, }, "start": Object { @@ -11353,15 +11576,17 @@ Object { "line": 1, }, }, + "operator": "delete", + "prefix": true, "range": Array [ 0, - 13, + 14, ], - "type": "NewExpression", + "type": "UnaryExpression", }, "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { @@ -11371,7 +11596,7 @@ Object { }, "range": Array [ 0, - 14, + 15, ], "type": "ExpressionStatement", }, @@ -11388,14 +11613,14 @@ Object { }, "range": Array [ 0, - 15, + 16, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 6, "line": 1, }, "start": Object { @@ -11405,25 +11630,25 @@ Object { }, "range": Array [ 0, - 3, + 6, ], "type": "Keyword", - "value": "new", + "value": "delete", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 10, "line": 1, }, "start": Object { - "column": 4, + "column": 7, "line": 1, }, }, "range": Array [ - 4, 7, + 10, ], "type": "Identifier", "value": "foo", @@ -11431,17 +11656,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 11, "line": 1, }, "start": Object { - "column": 7, + "column": 10, "line": 1, }, }, "range": Array [ - 7, - 8, + 10, + 11, ], "type": "Punctuator", "value": ".", @@ -11449,17 +11674,17 @@ Object { 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": "bar", @@ -11467,53 +11692,17 @@ Object { 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, + "column": 15, "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, + 15, ], "type": "Punctuator", "value": ";", @@ -11523,52 +11712,30 @@ Object { } `; -exports[`javascript fixtures/basics/new-without-parens.src 1`] = ` +exports[`javascript fixtures/basics/do-while-statements.src 1`] = ` Object { "body": Array [ Object { - "async": false, "body": Object { - "body": Array [], "loc": Object { "end": Object { - "column": 16, + "column": 3, "line": 1, }, "start": Object { - "column": 14, + "column": 2, "line": 1, }, }, "range": Array [ - 14, - 16, + 2, + 3, ], - "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", + "type": "EmptyStatement", }, "loc": Object { "end": Object { - "column": 16, + "column": 13, "line": 1, }, "start": Object { @@ -11576,71 +11743,273 @@ Object { "line": 1, }, }, - "params": Array [], "range": Array [ 0, - 16, + 13, ], - "type": "FunctionDeclaration", + "test": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "type": "DoWhileStatement", }, Object { - "expression": Object { - "arguments": Array [], - "callee": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "i", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 23, + 24, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 9, + "line": 3, }, "start": Object { "column": 4, - "line": 2, + "line": 3, }, }, - "name": "X", "range": Array [ - 21, - 22, + 19, + 24, ], - "type": "Identifier", + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, }, + }, + "range": Array [ + 15, + 25, + ], + "type": "VariableDeclaration", + }, + Object { + "body": Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 5, + }, + "start": Object { + "column": 3, + "line": 5, + }, + }, + "name": "i", + "range": Array [ + 34, + 35, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 3, + "line": 5, + }, + }, + "operator": "+=", + "range": Array [ + 34, + 40, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "range": Array [ + 39, + 40, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 5, + }, + "start": Object { + "column": 3, + "line": 5, + }, + }, + "range": Array [ + 34, + 41, + ], + "type": "ExpressionStatement", + }, + ], "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 1, + "line": 6, }, "start": Object { - "column": 0, - "line": 2, + "column": 3, + "line": 4, }, }, "range": Array [ - 17, - 22, + 29, + 43, ], - "type": "NewExpression", + "type": "BlockStatement", }, "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 16, + "line": 6, }, "start": Object { "column": 0, - "line": 2, + "line": 4, }, }, "range": Array [ - 17, - 23, + 26, + 58, ], - "type": "ExpressionStatement", + "test": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 6, + }, + "start": Object { + "column": 9, + "line": 6, + }, + }, + "name": "i", + "range": Array [ + 51, + 52, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 6, + }, + "start": Object { + "column": 9, + "line": 6, + }, + }, + "operator": "<", + "range": Array [ + 51, + 56, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 6, + }, + "start": Object { + "column": 13, + "line": 6, + }, + }, + "range": Array [ + 55, + 56, + ], + "raw": "5", + "type": "Literal", + "value": 5, + }, + "type": "BinaryExpression", + }, + "type": "DoWhileStatement", }, ], "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 0, + "line": 7, }, "start": Object { "column": 0, @@ -11649,14 +12018,14 @@ Object { }, "range": Array [ 0, - 23, + 59, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 2, "line": 1, }, "start": Object { @@ -11666,43 +12035,61 @@ Object { }, "range": Array [ 0, - 8, + 2, ], "type": "Keyword", - "value": "function", + "value": "do", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 3, "line": 1, }, "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { "column": 9, "line": 1, }, + "start": Object { + "column": 4, + "line": 1, + }, }, "range": Array [ + 4, 9, - 10, ], - "type": "Identifier", - "value": "X", + "type": "Keyword", + "value": "while", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 10, "line": 1, }, "start": Object { - "column": 11, + "column": 9, "line": 1, }, }, "range": Array [ - 11, - 12, + 9, + 10, ], "type": "Punctuator", "value": "(", @@ -11710,278 +12097,450 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 11, "line": 1, }, "start": Object { - "column": 12, + "column": 10, "line": 1, }, }, "range": Array [ - 12, - 13, + 10, + 11, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 12, "line": 1, }, "start": Object { - "column": 14, + "column": 11, "line": 1, }, }, "range": Array [ - 14, - 15, + 11, + 12, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 13, "line": 1, }, "start": Object { - "column": 15, + "column": 12, "line": 1, }, }, "range": Array [ - 15, - 16, + 12, + 13, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 3, - "line": 2, + "line": 3, }, "start": Object { "column": 0, - "line": 2, + "line": 3, }, }, "range": Array [ - 17, - 20, + 15, + 18, ], "type": "Keyword", - "value": "new", + "value": "var", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 2, + "line": 3, }, "start": Object { "column": 4, - "line": 2, + "line": 3, }, }, "range": Array [ - 21, - 22, + 19, + 20, ], "type": "Identifier", - "value": "X", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 5, - "line": 2, + "column": 6, + "line": 3, }, }, "range": Array [ + 21, 22, - 23, ], "type": "Punctuator", - "value": ";", + "value": "=", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/basics/typeof-expression.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "raw": "'str'", - "type": "Literal", - "value": "str", + "loc": Object { + "end": Object { + "column": 9, + "line": 3, }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "start": Object { + "column": 8, + "line": 3, }, - "operator": "typeof", - "prefix": true, - "range": Array [ - 0, - 12, - ], - "type": "UnaryExpression", }, + "range": Array [ + 23, + 24, + ], + "type": "Numeric", + "value": "0", + }, + Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 10, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 9, + "line": 3, }, }, "range": Array [ - 0, - 12, + 24, + 25, ], - "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": 6, - "line": 1, + "column": 2, + "line": 4, }, "start": Object { "column": 0, - "line": 1, + "line": 4, }, }, "range": Array [ - 0, - 6, + 26, + 28, ], "type": "Keyword", - "value": "typeof", + "value": "do", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 4, + "line": 4, }, "start": Object { - "column": 7, - "line": 1, + "column": 3, + "line": 4, }, }, "range": Array [ - 7, - 12, + 29, + 30, ], - "type": "String", - "value": "'str'", + "type": "Punctuator", + "value": "{", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/basics/update-expression.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": "i", + "loc": Object { + "end": Object { + "column": 4, + "line": 5, + }, + "start": Object { + "column": 3, + "line": 5, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Identifier", + "value": "i", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 5, + }, + "start": Object { + "column": 5, + "line": 5, + }, + }, + "range": Array [ + 36, + 38, + ], + "type": "Punctuator", + "value": "+=", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 5, + }, + "start": Object { + "column": 9, + "line": 5, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 6, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 6, + }, + }, + "range": Array [ + 44, + 49, + ], + "type": "Keyword", + "value": "while", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 6, + }, + "start": Object { + "column": 8, + "line": 6, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 6, + }, + "start": Object { + "column": 9, + "line": 6, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Identifier", + "value": "i", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 6, + }, + "start": Object { + "column": 11, + "line": 6, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 6, + }, + "start": Object { + "column": 13, + "line": 6, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Numeric", + "value": "5", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 14, + "line": 6, + }, + }, + "range": Array [ + 56, + 57, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 6, + }, + "start": Object { + "column": 15, + "line": 6, + }, + }, + "range": Array [ + 57, + 58, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/basics/identifiers-double-underscore.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "__test", "range": Array [ 4, - 5, + 10, ], "type": "Identifier", }, "init": Object { "loc": Object { "end": Object { - "column": 9, + "column": 17, "line": 1, }, "start": Object { - "column": 8, + "column": 13, "line": 1, }, }, "range": Array [ - 8, - 9, + 13, + 17, ], - "raw": "0", + "raw": "'ff'", "type": "Literal", - "value": 0, + "value": "ff", }, "loc": Object { "end": Object { - "column": 9, + "column": 17, "line": 1, }, "start": Object { @@ -11991,7 +12550,7 @@ Object { }, "range": Array [ 4, - 9, + 17, ], "type": "VariableDeclarator", }, @@ -11999,7 +12558,7 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 10, + "column": 18, "line": 1, }, "start": Object { @@ -12009,180 +12568,126 @@ Object { }, "range": Array [ 0, - 10, + 18, ], "type": "VariableDeclaration", }, Object { - "async": false, "body": Object { - "body": Array [ - Object { - "expression": Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "i", - "range": Array [ - 28, - 29, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "operator": "++", - "prefix": false, - "range": Array [ - 28, - 31, - ], - "type": "UpdateExpression", - }, - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 28, - 32, - ], - "type": "ExpressionStatement", - }, - ], + "body": Array [], "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 5, }, "start": Object { - "column": 13, - "line": 2, + "column": 12, + "line": 3, }, }, "range": Array [ - 24, - 34, + 32, + 36, ], - "type": "BlockStatement", + "type": "ClassBody", }, - "expression": false, - "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 11, + "line": 3, }, "start": Object { - "column": 9, - "line": 2, + "column": 6, + "line": 3, }, }, - "name": "f", + "name": "__Foo", "range": Array [ - 20, - 21, + 26, + 31, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 5, }, "start": Object { "column": 0, - "line": 2, + "line": 3, }, }, - "params": Array [], "range": Array [ - 11, - 34, + 20, + 36, ], - "type": "FunctionDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 17, + "line": 7, }, - "name": "f", - "range": Array [ - 35, - 36, - ], - "type": "Identifier", }, + "range": Array [ + 55, + 59, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 14, + "line": 7, }, "start": Object { - "column": 0, - "line": 5, + "column": 9, + "line": 7, }, }, + "name": "__Bar", "range": Array [ - 35, - 38, + 47, + 52, ], - "type": "CallExpression", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 4, - "line": 5, + "column": 1, + "line": 9, }, "start": Object { "column": 0, - "line": 5, + "line": 7, }, }, + "params": Array [], "range": Array [ - 35, - 39, + 38, + 59, ], - "type": "ExpressionStatement", + "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { - "column": 4, - "line": 5, + "column": 0, + "line": 10, }, "start": Object { "column": 0, @@ -12191,7 +12696,7 @@ Object { }, "range": Array [ 0, - 39, + 60, ], "sourceType": "script", "tokens": Array [ @@ -12216,7 +12721,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 10, "line": 1, }, "start": Object { @@ -12226,25 +12731,25 @@ Object { }, "range": Array [ 4, - 5, + 10, ], "type": "Identifier", - "value": "i", + "value": "__test", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 1, }, "start": Object { - "column": 6, + "column": 11, "line": 1, }, }, "range": Array [ - 6, - 7, + 11, + 12, ], "type": "Punctuator", "value": "=", @@ -12252,35 +12757,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 17, "line": 1, }, "start": Object { - "column": 8, + "column": 13, "line": 1, }, }, "range": Array [ - 8, - 9, + 13, + 17, ], - "type": "Numeric", - "value": "0", + "type": "String", + "value": "'ff'", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 18, "line": 1, }, "start": Object { - "column": 9, + "column": 17, "line": 1, }, }, "range": Array [ - 9, - 10, + 17, + 18, ], "type": "Punctuator", "value": ";", @@ -12288,269 +12793,215 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 5, + "line": 3, }, "start": Object { "column": 0, - "line": 2, + "line": 3, }, }, "range": Array [ - 11, - 19, + 20, + 25, ], "type": "Keyword", - "value": "function", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 11, + "line": 3, }, "start": Object { - "column": 9, - "line": 2, + "column": 6, + "line": 3, }, }, "range": Array [ - 20, - 21, + 26, + 31, ], "type": "Identifier", - "value": "f", + "value": "__Foo", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 13, + "line": 3, }, "start": Object { - "column": 10, - "line": 2, + "column": 12, + "line": 3, }, }, "range": Array [ - 21, - 22, + 32, + 33, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 1, + "line": 5, }, "start": Object { - "column": 11, - "line": 2, - }, + "column": 0, + "line": 5, + }, }, "range": Array [ - 22, - 23, + 35, + 36, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 8, + "line": 7, }, "start": Object { - "column": 13, - "line": 2, + "column": 0, + "line": 7, }, }, "range": Array [ - 24, - 25, + 38, + 46, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 3, + "column": 14, + "line": 7, }, "start": Object { - "column": 2, - "line": 3, + "column": 9, + "line": 7, }, }, "range": Array [ - 28, - 29, + 47, + 52, ], "type": "Identifier", - "value": "i", + "value": "__Bar", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 15, + "line": 7, }, "start": Object { - "column": 3, - "line": 3, + "column": 14, + "line": 7, }, }, "range": Array [ - 29, - 31, + 52, + 53, ], "type": "Punctuator", - "value": "++", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 3, + "column": 16, + "line": 7, }, "start": Object { - "column": 5, - "line": 3, + "column": 15, + "line": 7, }, }, "range": Array [ - 31, - 32, + 53, + 54, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 18, + "line": 7, }, "start": Object { - "column": 0, - "line": 4, + "column": 17, + "line": 7, }, }, "range": Array [ - 33, - 34, + 55, + 56, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 9, }, "start": Object { "column": 0, - "line": 5, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "f", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 5, - }, - "start": Object { - "column": 3, - "line": 5, + "line": 9, }, }, "range": Array [ - 38, - 39, + 58, + 59, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/basics/void-expression.src 1`] = ` +exports[`javascript fixtures/basics/instanceof.src 1`] = ` Object { "body": Array [ Object { "expression": Object { - "argument": Object { + "left": Object { "loc": Object { "end": Object { - "column": 6, + "column": 2, "line": 1, }, "start": Object { - "column": 5, + "column": 0, "line": 1, }, }, "range": Array [ - 5, - 6, + 0, + 2, ], - "raw": "4", + "raw": "''", "type": "Literal", - "value": 4, + "value": "", }, "loc": Object { "end": Object { - "column": 6, + "column": 17, "line": 1, }, "start": Object { @@ -12558,17 +13009,34 @@ Object { "line": 1, }, }, - "operator": "void", - "prefix": true, + "operator": "instanceof", "range": Array [ 0, - 6, + 17, ], - "type": "UnaryExpression", + "right": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "Set", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "type": "BinaryExpression", }, "loc": Object { "end": Object { - "column": 7, + "column": 17, "line": 1, }, "start": Object { @@ -12578,62 +13046,175 @@ Object { }, "range": Array [ 0, - 7, + 17, ], "type": "ExpressionStatement", }, + ], + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 2, + ], + "type": "String", + "value": "''", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 13, + ], + "type": "Keyword", + "value": "instanceof", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + "value": "Set", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/basics/new-with-member-expression.src 1`] = ` +Object { + "body": Array [ Object { "expression": Object { - "argument": Object { + "arguments": Array [], + "callee": Object { + "computed": false, "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 4, + "line": 1, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "property": 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 [ - 13, - 14, + 4, + 11, ], - "raw": "3", - "type": "Literal", - "value": 3, + "type": "MemberExpression", }, "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, - "operator": "void", - "prefix": true, "range": Array [ - 8, - 15, + 0, + 13, ], - "type": "UnaryExpression", + "type": "NewExpression", }, "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 8, - 16, + 0, + 14, ], "type": "ExpressionStatement", }, @@ -12641,7 +13222,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 2, }, "start": Object { "column": 0, @@ -12650,14 +13231,14 @@ Object { }, "range": Array [ 0, - 17, + 15, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, + "column": 3, "line": 1, }, "start": Object { @@ -12667,79 +13248,79 @@ Object { }, "range": Array [ 0, - 4, + 3, ], "type": "Keyword", - "value": "void", + "value": "new", }, 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": "Numeric", - "value": "4", + "type": "Identifier", + "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": 4, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ 8, - 12, + 11, ], - "type": "Keyword", - "value": "void", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ + 11, 12, - 13, ], "type": "Punctuator", "value": "(", @@ -12747,35 +13328,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ + 12, 13, - 14, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 14, - 15, ], "type": "Punctuator", "value": ")", @@ -12783,17 +13346,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 15, - 16, + 13, + 14, ], "type": "Punctuator", "value": ";", @@ -12803,34 +13366,52 @@ Object { } `; -exports[`javascript fixtures/binaryLiterals/invalid.src 1`] = `"';' expected."`; - -exports[`javascript fixtures/binaryLiterals/lowercase.src 1`] = ` +exports[`javascript fixtures/basics/new-without-parens.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 5, + "column": 16, "line": 1, }, "start": Object { - "column": 0, + "column": 14, "line": 1, }, }, "range": Array [ - 0, - 5, + 14, + 16, ], - "raw": "0b101", - "type": "Literal", - "value": 5, + "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": 6, + "column": 16, "line": 1, }, "start": Object { @@ -12838,113 +13419,70 @@ Object { "line": 1, }, }, + "params": Array [], "range": Array [ 0, - 6, + 16, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "FunctionDeclaration", }, - }, - "range": Array [ - 0, - 7, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Numeric", - "value": "0b101", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/binaryLiterals/uppercase.src 1`] = ` -Object { - "body": Array [ Object { "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "X", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, "range": Array [ - 0, - 5, + 17, + 22, ], - "raw": "0B101", - "type": "Literal", - "value": 5, + "type": "NewExpression", }, "loc": Object { "end": Object { "column": 6, - "line": 1, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, "range": Array [ - 0, - 6, + 17, + 23, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 0, + "column": 6, "line": 2, }, "start": Object { @@ -12954,14 +13492,14 @@ Object { }, "range": Array [ 0, - 7, + 23, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -12971,213 +13509,151 @@ Object { }, "range": Array [ 0, - 5, + 8, ], - "type": "Numeric", - "value": "0B101", + "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": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "X", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/blockBindings/const.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 { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 15, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "const", "loc": Object { "end": Object { - "column": 16, + "column": 12, "line": 1, }, "start": Object { - "column": 0, + "column": 11, "line": 1, }, }, "range": Array [ - 0, - 16, + 11, + 12, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "(", }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 13, "line": 1, }, "start": Object { - "column": 0, + "column": 12, "line": 1, }, }, "range": Array [ - 0, - 5, + 12, + 13, ], - "type": "Keyword", - "value": "const", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 15, "line": 1, }, "start": Object { - "column": 6, + "column": 14, "line": 1, }, }, "range": Array [ - 6, - 9, + 14, + 15, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "{", }, 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": "=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 3, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 12, - 15, + 17, + 20, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, ], "type": "Identifier", - "value": "bar", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 6, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 5, + "line": 2, }, }, "range": Array [ - 15, - 16, + 22, + 23, ], "type": "Punctuator", "value": ";", @@ -13187,7 +13663,7 @@ Object { } `; -exports[`javascript fixtures/blockBindings/let.src 1`] = ` +exports[`javascript fixtures/basics/or-operator-array-object.src 1`] = ` Object { "body": Array [ Object { @@ -13196,7 +13672,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -13204,34 +13680,216 @@ Object { "line": 1, }, }, - "name": "foo", + "name": "v", "range": Array [ 4, - 7, + 5, ], "type": "Identifier", }, "init": Object { + "left": Object { + "left": Object { + "left": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 8, + 10, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "operator": "||", + "range": Array [ + 8, + 16, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 14, + 16, + ], + "type": "ObjectExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "operator": "||", + "range": Array [ + 8, + 22, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "ArrayExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "operator": "||", + "range": Array [ + 8, + 28, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 28, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "type": "LogicalExpression", + }, "loc": Object { "end": Object { - "column": 13, + "column": 42, "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, - "name": "bar", + "operator": "||", "range": Array [ - 10, - 13, + 8, + 42, ], - "type": "Identifier", + "right": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 35, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "operator": "||", + "range": Array [ + 33, + 41, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 39, + 41, + ], + "type": "ObjectExpression", + }, + "type": "LogicalExpression", + }, + "type": "LogicalExpression", }, "loc": Object { "end": Object { - "column": 13, + "column": 42, "line": 1, }, "start": Object { @@ -13241,15 +13899,15 @@ Object { }, "range": Array [ 4, - 13, + 42, ], "type": "VariableDeclarator", }, ], - "kind": "let", + "kind": "var", "loc": Object { "end": Object { - "column": 14, + "column": 43, "line": 1, }, "start": Object { @@ -13259,297 +13917,488 @@ Object { }, "range": Array [ 0, - 14, + 43, ], "type": "VariableDeclaration", }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/blockBindings/let-in-switchcase.src 1`] = ` -Object { - "body": Array [ - Object { - "cases": Array [ + "declarations": Array [ Object { - "consequent": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "x", + "range": Array [ + 48, + 49, + ], + "type": "Identifier", + }, + "init": Object { + "left": Object { + "left": Object { + "left": Object { + "left": Object { + "elements": Array [], "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 31, - "line": 1, + "column": 8, + "line": 2, }, }, - "name": "t", "range": Array [ - 31, - 32, + 52, + 54, ], - "type": "Identifier", + "type": "ArrayExpression", }, - "init": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "operator": "||", + "range": Array [ + 52, + 60, + ], + "right": Object { + "elements": Array [], "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 35, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 35, - 37, + 58, + 60, ], - "raw": "42", - "type": "Literal", - "value": 42, + "type": "ArrayExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "operator": "||", + "range": Array [ + 52, + 66, + ], + "right": Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 31, - "line": 1, + "column": 20, + "line": 2, }, }, + "properties": Array [], "range": Array [ - 31, - 37, + 64, + 66, ], - "type": "VariableDeclarator", + "type": "ObjectExpression", }, - ], - "kind": "let", + "type": "LogicalExpression", + }, "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 28, + "line": 2, }, "start": Object { - "column": 27, - "line": 1, + "column": 8, + "line": 2, }, }, + "operator": "||", "range": Array [ - 27, - 38, + 52, + 72, ], - "type": "VariableDeclaration", + "right": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 70, + 72, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + "type": "LogicalExpression", }, - Object { - "label": null, + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "operator": "||", + "range": Array [ + 52, + 86, + ], + "right": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 77, + 79, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, "loc": Object { "end": Object { - "column": 45, - "line": 1, + "column": 41, + "line": 2, }, "start": Object { - "column": 39, - "line": 1, + "column": 33, + "line": 2, }, }, + "operator": "||", "range": Array [ - 39, - 45, + 77, + 85, ], - "type": "BreakStatement", + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 39, + "line": 2, + }, + }, + "range": Array [ + 83, + 85, + ], + "type": "ArrayExpression", + }, + "type": "LogicalExpression", }, - ], + "type": "LogicalExpression", + }, "loc": Object { "end": Object { - "column": 45, - "line": 1, + "column": 42, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 18, - 45, + 48, + 86, ], - "test": Object { + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 43, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 44, + 87, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 23, - "line": 1, + "column": 4, + "line": 3, }, }, + "name": "z", "range": Array [ - 23, - 25, + 92, + 93, ], - "raw": "42", - "type": "Literal", - "value": 42, + "type": "Identifier", }, - "type": "SwitchCase", + "init": Object { + "left": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 96, + 98, + ], + "type": "ArrayExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "operator": "||", + "range": Array [ + 96, + 104, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 102, + 104, + ], + "type": "ArrayExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 92, + 104, + ], + "type": "VariableDeclarator", }, ], - "discriminant": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, + "kind": "var", + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 88, + 105, + ], + "type": "VariableDeclaration", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "name": "y", + "range": Array [ + 110, + 111, + ], + "type": "Identifier", }, - "start": Object { - "column": 8, - "line": 1, + "init": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "properties": Array [], + "range": Array [ + 114, + 116, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "operator": "||", + "range": Array [ + 114, + 122, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "properties": Array [], + "range": Array [ + 120, + 122, + ], + "type": "ObjectExpression", + }, + "type": "LogicalExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, }, + "range": Array [ + 110, + 122, + ], + "type": "VariableDeclarator", }, - "name": "answer", - "range": Array [ - 8, - 14, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 47, - "line": 1, + "column": 17, + "line": 4, }, "start": Object { "column": 0, - "line": 1, + "line": 4, }, }, "range": Array [ - 0, - 47, + 106, + 123, ], - "type": "SwitchStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 5, }, "start": Object { "column": 0, @@ -13558,14 +14407,14 @@ Object { }, "range": Array [ 0, - 48, + 124, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 3, "line": 1, }, "start": Object { @@ -13575,1282 +14424,907 @@ Object { }, "range": Array [ 0, - 6, + 3, ], "type": "Keyword", - "value": "switch", + "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": "v", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 7, "line": 1, }, "start": Object { - "column": 8, + "column": 6, "line": 1, }, }, "range": Array [ - 8, - 14, + 6, + 7, ], - "type": "Identifier", - "value": "answer", - }, + "type": "Punctuator", + "value": "=", + }, 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": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 10, "line": 1, }, "start": Object { - "column": 16, + "column": 9, "line": 1, }, }, "range": Array [ - 16, - 17, + 9, + 10, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 13, "line": 1, }, "start": Object { - "column": 18, + "column": 11, "line": 1, }, }, "range": Array [ - 18, - 22, + 11, + 13, ], - "type": "Keyword", - "value": "case", + "type": "Punctuator", + "value": "||", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 15, "line": 1, }, "start": Object { - "column": 23, + "column": 14, "line": 1, }, }, "range": Array [ - 23, - 25, + 14, + 15, ], - "type": "Numeric", - "value": "42", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 16, "line": 1, }, "start": Object { - "column": 25, + "column": 15, "line": 1, }, }, "range": Array [ - 25, - 26, + 15, + 16, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 19, "line": 1, }, "start": Object { - "column": 27, + "column": 17, "line": 1, }, }, "range": Array [ - 27, - 30, + 17, + 19, ], - "type": "Keyword", - "value": "let", + "type": "Punctuator", + "value": "||", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 21, "line": 1, }, "start": Object { - "column": 31, + "column": 20, "line": 1, }, }, "range": Array [ - 31, - 32, + 20, + 21, ], - "type": "Identifier", - "value": "t", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 22, "line": 1, }, "start": Object { - "column": 33, + "column": 21, "line": 1, }, }, "range": Array [ - 33, - 34, + 21, + 22, ], "type": "Punctuator", - "value": "=", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 25, "line": 1, }, "start": Object { - "column": 35, + "column": 23, "line": 1, }, }, "range": Array [ - 35, - 37, + 23, + 25, ], - "type": "Numeric", - "value": "42", + "type": "Punctuator", + "value": "||", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 28, "line": 1, }, "start": Object { - "column": 37, + "column": 26, "line": 1, }, }, "range": Array [ - 37, - 38, + 26, + 28, ], - "type": "Punctuator", - "value": ";", + "type": "String", + "value": "\\"\\"", }, Object { "loc": Object { "end": Object { - "column": 44, + "column": 31, "line": 1, }, "start": Object { - "column": 39, + "column": 29, "line": 1, }, }, "range": Array [ - 39, - 44, + 29, + 31, ], - "type": "Keyword", - "value": "break", + "type": "Punctuator", + "value": "||", }, Object { "loc": Object { "end": Object { - "column": 45, + "column": 33, "line": 1, }, "start": Object { - "column": 44, + "column": 32, "line": 1, }, }, "range": Array [ - 44, - 45, + 32, + 33, ], "type": "Punctuator", - "value": ";", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 47, + "column": 35, "line": 1, }, "start": Object { - "column": 46, + "column": 33, "line": 1, }, }, "range": Array [ - 46, - 47, + 33, + 35, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"\\"", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/classes/class-accessor-properties.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 18, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 14, - 18, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 23, - 24, - ], - "type": "Identifier", - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 29, - ], - "static": false, - "type": "MethodDefinition", - "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": 24, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 24, - 29, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 31, - ], - "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": 31, + "column": 38, "line": 1, }, "start": Object { - "column": 0, + "column": 36, "line": 1, }, }, "range": Array [ - 0, - 31, + 36, + 38, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "Punctuator", + "value": "||", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 40, "line": 1, }, "start": Object { - "column": 31, + "column": 39, "line": 1, }, }, "range": Array [ - 31, - 32, + 39, + 40, ], - "type": "EmptyStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "{", }, - }, - "range": Array [ - 0, - 32, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 41, "line": 1, }, "start": Object { - "column": 0, + "column": 40, "line": 1, }, }, "range": Array [ - 0, - 5, + 40, + 41, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 42, "line": 1, }, "start": Object { - "column": 6, + "column": 41, "line": 1, }, }, "range": Array [ - 6, - 7, + 41, + 42, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 43, "line": 1, }, "start": Object { - "column": 8, + "column": 42, "line": 1, }, }, "range": Array [ - 8, - 9, + 42, + 43, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 3, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 9, - 12, + 44, + 47, ], - "type": "Identifier", - "value": "get", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 13, - 14, + 48, + 49, ], "type": "Identifier", - "value": "a", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 6, + "line": 2, }, }, "range": Array [ - 14, - 15, + 50, + 51, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 15, - 16, + 52, + 53, ], "type": "Punctuator", - "value": ")", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ - 16, - 17, + 53, + 54, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 17, - 18, + 55, + 57, ], "type": "Punctuator", - "value": "}", + "value": "||", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 19, - 22, + 58, + 59, ], - "type": "Identifier", - "value": "set", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 23, - 24, + 59, + 60, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 17, + "line": 2, }, }, "range": Array [ - 24, - 25, + 61, + 63, ], "type": "Punctuator", - "value": "(", + "value": "||", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 21, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 20, + "line": 2, }, }, "range": Array [ - 25, - 26, + 64, + 65, ], - "type": "Identifier", - "value": "c", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 26, - "line": 1, + "column": 21, + "line": 2, }, }, "range": Array [ - 26, - 27, + 65, + 66, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 27, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ - 27, - 28, + 67, + 69, ], "type": "Punctuator", - "value": "{", + "value": "||", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 28, + "line": 2, }, "start": Object { - "column": 28, - "line": 1, + "column": 26, + "line": 2, }, }, "range": Array [ - 28, - 29, + 70, + 72, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"\\"", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 31, + "line": 2, }, "start": Object { "column": 29, - "line": 1, + "line": 2, }, }, "range": Array [ - 29, - 30, + 73, + 75, ], "type": "Punctuator", - "value": ";", + "value": "||", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 33, + "line": 2, }, "start": Object { - "column": 30, - "line": 1, + "column": 32, + "line": 2, }, }, "range": Array [ - 30, - 31, + 76, + 77, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 35, + "line": 2, }, "start": Object { - "column": 31, - "line": 1, + "column": 33, + "line": 2, }, }, "range": Array [ - 31, - 32, + 77, + 79, ], - "type": "Punctuator", - "value": ";", + "type": "String", + "value": "\\"\\"", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/classes/class-computed-static-method.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 23, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 19, - 23, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 25, - ], - "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": 25, - "line": 1, + "column": 38, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 36, + "line": 2, }, }, "range": Array [ - 0, - 25, + 80, + 82, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "Punctuator", + "value": "||", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 40, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 39, + "line": 2, }, }, "range": Array [ - 25, - 26, + 83, + 84, ], - "type": "EmptyStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "[", }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 41, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 40, + "line": 2, }, }, "range": Array [ - 0, - 5, + 84, + 85, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 42, + "line": 2, }, "start": Object { - "column": 6, - "line": 1, + "column": 41, + "line": 2, }, }, "range": Array [ - 6, - 7, + 85, + 86, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 43, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 42, + "line": 2, }, }, "range": Array [ - 8, - 9, + 86, + 87, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 3, + "line": 3, }, "start": Object { - "column": 9, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 9, - 15, + 88, + 91, ], "type": "Keyword", - "value": "static", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 16, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 16, - 17, + 92, + 93, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 17, - "line": 1, + "column": 6, + "line": 3, }, }, "range": Array [ - 17, - 18, + 94, + 95, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 9, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 18, - 19, + 96, + 97, ], "type": "Punctuator", - "value": "]", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 10, + "line": 3, }, "start": Object { - "column": 19, - "line": 1, + "column": 9, + "line": 3, }, }, "range": Array [ - 19, - 20, + 97, + 98, ], "type": "Punctuator", - "value": "(", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 13, + "line": 3, }, "start": Object { - "column": 20, - "line": 1, + "column": 11, + "line": 3, }, }, "range": Array [ - 20, - 21, + 99, + 101, ], "type": "Punctuator", - "value": ")", + "value": "||", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 15, + "line": 3, }, "start": Object { - "column": 21, - "line": 1, + "column": 14, + "line": 3, }, }, "range": Array [ - 21, - 22, + 102, + 103, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 16, + "line": 3, }, "start": Object { - "column": 22, - "line": 1, + "column": 15, + "line": 3, }, }, "range": Array [ - 22, - 23, + 103, + 104, ], "type": "Punctuator", - "value": "}", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 17, + "line": 3, }, "start": Object { - "column": 23, - "line": 1, + "column": 16, + "line": 3, }, }, "range": Array [ - 23, - 24, + 104, + 105, ], "type": "Punctuator", "value": ";", @@ -14858,54 +15332,179 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 3, + "line": 4, }, "start": Object { - "column": 24, - "line": 1, + "column": 0, + "line": 4, }, }, "range": Array [ - 24, - 25, + 106, + 109, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 25, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 25, - 26, + 110, + 111, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "y", }, - ], - "type": "Program", + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "range": Array [ + 112, + 113, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "range": Array [ + 114, + 115, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "range": Array [ + 115, + 116, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 11, + "line": 4, + }, + }, + "range": Array [ + 117, + 119, + ], + "type": "Punctuator", + "value": "||", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "range": Array [ + 120, + 121, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 4, + }, + }, + "range": Array [ + 121, + 122, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "range": Array [ + 122, + 123, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", } `; -exports[`javascript fixtures/classes/class-expression.src 1`] = ` +exports[`javascript fixtures/basics/typeof-expression.src 1`] = ` Object { "body": Array [ Object { "expression": Object { - "body": Object { - "body": Array [], + "argument": Object { "loc": Object { "end": Object { - "column": 9, + "column": 12, "line": 1, }, "start": Object { @@ -14915,31 +15514,33 @@ Object { }, "range": Array [ 7, - 9, + 12, ], - "type": "ClassBody", + "raw": "'str'", + "type": "Literal", + "value": "str", }, - "id": null, "loc": Object { "end": Object { - "column": 9, + "column": 12, "line": 1, }, "start": Object { - "column": 1, + "column": 0, "line": 1, }, }, + "operator": "typeof", + "prefix": true, "range": Array [ - 1, - 9, + 0, + 12, ], - "superClass": null, - "type": "ClassExpression", + "type": "UnaryExpression", }, "loc": Object { "end": Object { - "column": 11, + "column": 12, "line": 1, }, "start": Object { @@ -14949,15 +15550,15 @@ Object { }, "range": Array [ 0, - 11, + 12, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -14966,14 +15567,14 @@ Object { }, "range": Array [ 0, - 11, + 13, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 6, "line": 1, }, "start": Object { @@ -14983,33 +15584,15 @@ Object { }, "range": Array [ 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, 6, ], "type": "Keyword", - "value": "class", + "value": "typeof", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 12, "line": 1, }, "start": Object { @@ -15019,228 +15602,263 @@ 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, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, + 12, ], - "type": "Punctuator", - "value": ";", + "type": "String", + "value": "'str'", }, ], "type": "Program", } `; -exports[`javascript fixtures/classes/class-method-named-prototype.src 1`] = ` +exports[`javascript fixtures/basics/update-expression.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, }, - "name": "prototype", - "range": Array [ - 9, - 18, - ], - "type": "Identifier", }, - "kind": "method", + "name": "i", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + "init": Object { "loc": Object { "end": Object { - "column": 22, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 8, "line": 1, }, }, "range": Array [ + 8, 9, - 22, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 9, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 10, + ], + "type": "VariableDeclaration", + }, + Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "argument": Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 3, + "line": 3, }, "start": Object { - "column": 20, - "line": 1, + "column": 2, + "line": 3, }, }, + "name": "i", "range": Array [ - 20, - 22, + 28, + 29, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 2, + "line": 3, }, }, - "params": Array [], + "operator": "++", + "prefix": false, "range": Array [ - 18, - 22, + 28, + 31, ], - "type": "FunctionExpression", + "type": "UpdateExpression", + }, + "loc": Object { + "end": Object { + "column": 6, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, }, + "range": Array [ + 28, + 32, + ], + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 8, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 8, - 23, + 24, + 34, ], - "type": "ClassBody", + "type": "BlockStatement", }, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 6, - "line": 1, + "column": 9, + "line": 2, }, }, - "name": "A", + "name": "f", "range": Array [ - 6, - 7, + 20, + 21, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, + "params": Array [], "range": Array [ - 0, - 23, + 11, + 34, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "FunctionDeclaration", }, Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "name": "f", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 35, + 38, + ], + "type": "CallExpression", + }, "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 4, + "line": 5, }, "start": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 23, - 24, + 35, + 39, ], - "type": "EmptyStatement", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 4, + "line": 5, }, "start": Object { "column": 0, @@ -15249,14 +15867,14 @@ Object { }, "range": Array [ 0, - 24, + 39, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -15266,128 +15884,128 @@ 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": "i", }, 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": 18, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 8, "line": 1, }, }, "range": Array [ + 8, 9, - 18, ], - "type": "Identifier", - "value": "prototype", + "type": "Numeric", + "value": "0", }, 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": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ + 11, 19, - 20, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 20, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ 20, 21, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ @@ -15395,17 +16013,17 @@ Object { 22, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ @@ -15413,22 +16031,166 @@ Object { 23, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 23, 24, + 25, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + "value": "i", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 3, + "line": 3, + }, + }, + "range": Array [ + 29, + 31, + ], + "type": "Punctuator", + "value": "++", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 5, + }, + "start": Object { + "column": 1, + "line": 5, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 5, + }, + "start": Object { + "column": 3, + "line": 5, + }, + }, + "range": Array [ + 38, + 39, ], "type": "Punctuator", "value": ";", @@ -15438,128 +16200,51 @@ Object { } `; -exports[`javascript fixtures/classes/class-method-named-static.src 1`] = ` +exports[`javascript fixtures/basics/void-expression.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "static", - "range": Array [ - 9, - 15, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "expression": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, }, - "range": Array [ - 9, - 19, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 19, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 15, - 19, - ], - "type": "FunctionExpression", + "start": Object { + "column": 5, + "line": 1, }, }, - ], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, + "range": Array [ + 5, + 6, + ], + "raw": "4", + "type": "Literal", + "value": 4, }, - "range": Array [ - 8, - 21, - ], - "type": "ClassBody", - }, - "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 6, "line": 1, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, - "name": "A", + "operator": "void", + "prefix": true, "range": Array [ + 0, 6, - 7, ], - "type": "Identifier", + "type": "UnaryExpression", }, "loc": Object { "end": Object { - "column": 21, + "column": 7, "line": 1, }, "start": Object { @@ -15569,33 +16254,70 @@ Object { }, "range": Array [ 0, - 21, + 7, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, Object { + "expression": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 13, + 14, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "operator": "void", + "prefix": true, + "range": Array [ + 8, + 15, + ], + "type": "UnaryExpression", + }, "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 21, - 22, + 8, + 16, ], - "type": "EmptyStatement", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 3, }, "start": Object { "column": 0, @@ -15604,14 +16326,14 @@ Object { }, "range": Array [ 0, - 22, + 17, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 4, "line": 1, }, "start": Object { @@ -15621,79 +16343,79 @@ Object { }, "range": Array [ 0, - 5, + 4, ], "type": "Keyword", - "value": "class", + "value": "void", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 6, "line": 1, }, "start": Object { - "column": 6, + "column": 5, "line": 1, }, }, "range": Array [ + 5, 6, - 7, ], - "type": "Identifier", - "value": "A", + "type": "Numeric", + "value": "4", }, 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": 1, + "column": 4, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 9, - 15, + 8, + 12, ], "type": "Keyword", - "value": "static", + "value": "void", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 15, - 16, + 12, + 13, ], "type": "Punctuator", "value": "(", @@ -15701,107 +16423,150 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 6, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 5, + "line": 2, }, }, "range": Array [ - 16, - 17, + 13, + 14, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "3", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 6, + "line": 2, }, }, "range": Array [ - 17, - 18, + 14, + 15, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 18, - 19, + 15, + 16, ], "type": "Punctuator", - "value": "}", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/bigIntLiterals/binary.src 1`] = ` +Object { + "body": Array [ Object { - "loc": 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": 20, + "column": 5, "line": 1, }, "start": Object { - "column": 19, + "column": 0, "line": 1, }, }, "range": Array [ - 19, - 20, + 0, + 5, ], - "type": "Punctuator", - "value": ";", + "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": 21, + "column": 4, "line": 1, }, "start": Object { - "column": 20, + "column": 0, "line": 1, }, }, "range": Array [ - 20, - 21, + 0, + 4, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "0b1n", }, 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": ";", @@ -15811,128 +16576,32 @@ Object { } `; -exports[`javascript fixtures/classes/class-method-named-with-space.src 1`] = ` +exports[`javascript fixtures/bigIntLiterals/decimal.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "withSpace", - "range": Array [ - 9, - 18, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 24, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 19, - 24, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 25, - ], - "type": "ClassBody", - }, - "id": Object { + "expression": Object { "loc": Object { "end": Object { - "column": 7, + "column": 2, "line": 1, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, - "name": "A", "range": Array [ - 6, - 7, + 0, + 2, ], - "type": "Identifier", + "raw": "1n", + "type": "BigIntLiteral", + "value": "1", }, "loc": Object { "end": Object { - "column": 25, + "column": 3, "line": 1, }, "start": Object { @@ -15942,10 +16611,9 @@ Object { }, "range": Array [ 0, - 25, + 3, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { @@ -15960,14 +16628,14 @@ Object { }, "range": Array [ 0, - 26, + 4, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 2, "line": 1, }, "start": Object { @@ -15977,283 +16645,257 @@ Object { }, "range": Array [ 0, - 5, + 2, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "1n", }, 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": "Identifier", - "value": "A", + "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": 9, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 0, "line": 1, }, }, "range": Array [ - 8, - 9, + 0, + 5, ], - "type": "Punctuator", - "value": "{", + "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": 18, + "column": 4, "line": 1, }, "start": Object { - "column": 9, + "column": 0, "line": 1, }, }, "range": Array [ - 9, - 18, + 0, + 4, ], "type": "Identifier", - "value": "withSpace", + "value": "0x1n", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 5, "line": 1, }, "start": Object { - "column": 19, + "column": 4, "line": 1, }, }, "range": Array [ - 19, - 20, + 4, + 5, ], "type": "Punctuator", - "value": "(", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/bigIntLiterals/octal.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, + "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", }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ")", - }, - Object { "loc": Object { "end": Object { - "column": 23, + "column": 5, "line": 1, }, "start": Object { - "column": 22, + "column": 0, "line": 1, }, }, "range": Array [ - 22, - 23, + 0, + 5, ], - "type": "Punctuator", - "value": "{", + "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": 24, + "column": 4, "line": 1, }, "start": Object { - "column": 23, + "column": 0, "line": 1, }, }, "range": Array [ - 23, - 24, + 0, + 4, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "0o1n", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 5, "line": 1, }, "start": Object { - "column": 24, + "column": 4, "line": 1, }, }, "range": Array [ - 24, - 25, + 4, + 5, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/classes/class-one-method.src 1`] = ` +exports[`javascript fixtures/binaryLiterals/invalid.src 1`] = `"';' expected."`; + +exports[`javascript fixtures/binaryLiterals/lowercase.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "a", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 19, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 19, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 15, - 19, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 21, - ], - "type": "ClassBody", - }, - "id": Object { + "expression": Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, - "name": "A", "range": Array [ - 6, - 7, + 0, + 5, ], - "type": "Identifier", + "raw": "0b101", + "type": "Literal", + "value": 5, }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 6, + "line": 1, }, "start": Object { "column": 0, @@ -16262,33 +16904,15 @@ Object { }, "range": Array [ 0, - 21, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 21, - 22, + 6, ], - "type": "EmptyStatement", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -16297,7 +16921,7 @@ Object { }, "range": Array [ 0, - 22, + 7, ], "sourceType": "script", "tokens": Array [ @@ -16316,167 +16940,308 @@ Object { 0, 5, ], - "type": "Keyword", - "value": "class", + "type": "Numeric", + "value": "0b101", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 6, "line": 1, }, "start": Object { - "column": 6, + "column": 5, "line": 1, }, }, "range": Array [ + 5, 6, - 7, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/binaryLiterals/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": "0B101", + "type": "Literal", + "value": 5, + }, "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { - "column": 8, + "column": 0, "line": 1, }, }, "range": Array [ - 8, - 9, + 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": 5, - "line": 2, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 14, - 15, + 0, + 5, ], - "type": "Identifier", - "value": "a", + "type": "Numeric", + "value": "0B101", }, Object { "loc": Object { "end": Object { "column": 6, - "line": 2, + "line": 1, }, "start": Object { "column": 5, - "line": 2, + "line": 1, }, }, "range": Array [ - 15, - 16, + 5, + 6, ], "type": "Punctuator", - "value": "(", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/blockBindings/const.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 { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 12, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 15, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 6, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ + 0, 16, - 17, ], - "type": "Punctuator", - "value": ")", + "type": "VariableDeclaration", }, + ], + "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": 8, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 17, - 18, + 0, + 5, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { "column": 9, - "line": 2, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ - 18, - 19, + 6, + 9, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 11, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 10, + "line": 1, }, }, "range": Array [ - 20, - 21, + 10, + 11, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 1, - "line": 3, + "column": 12, + "line": 1, }, }, "range": Array [ - 21, - 22, + 12, + 15, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, ], "type": "Punctuator", "value": ";", @@ -16486,182 +17251,70 @@ Object { } `; -exports[`javascript fixtures/classes/class-one-method-super.src 1`] = ` +exports[`javascript fixtures/blockBindings/let.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "a", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "kind": "method", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 7, + "line": 1, }, "start": Object { "column": 4, - "line": 2, + "line": 1, }, }, + "name": "foo", "range": Array [ - 14, - 41, + 4, + 7, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "arguments": Array [], - "callee": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 27, - 32, - ], - "type": "Super", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 27, - 34, - ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 27, - 35, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 41, - ], - "type": "BlockStatement", + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 5, - "line": 2, - }, + "start": Object { + "column": 10, + "line": 1, }, - "params": Array [], - "range": Array [ - 15, - 41, - ], - "type": "FunctionExpression", }, + "name": "bar", + "range": Array [ + 10, + 13, + ], + "type": "Identifier", }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 43, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 13, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 14, + "line": 1, }, "start": Object { "column": 0, @@ -16670,33 +17323,15 @@ Object { }, "range": Array [ 0, - 43, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 43, - 44, + 14, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 2, }, "start": Object { "column": 0, @@ -16705,14 +17340,14 @@ Object { }, "range": Array [ 0, - 45, + 15, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -16722,10 +17357,10 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", + "value": "let", }, Object { "loc": Object { @@ -16734,16 +17369,16 @@ Object { "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, + 4, 7, ], "type": "Identifier", - "value": "A", + "value": "foo", }, Object { "loc": Object { @@ -16761,202 +17396,40 @@ Object { 9, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 14, - 15, + 10, + 13, ], "type": "Identifier", - "value": "a", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 27, - 32, - ], - "type": "Keyword", - "value": "super", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { "column": 13, - "line": 3, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 42, - 43, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, + "line": 1, }, }, "range": Array [ - 43, - 44, + 13, + 14, ], "type": "Punctuator", "value": ";", @@ -16966,128 +17439,163 @@ Object { } `; -exports[`javascript fixtures/classes/class-static-method.src 1`] = ` +exports[`javascript fixtures/blockBindings/let-in-switchcase.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { + "cases": Array [ + Object { + "consequent": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "name": "t", + "range": Array [ + 31, + 32, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 37, + ], + "raw": "42", + "type": "Literal", + "value": 42, + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 17, + "column": 38, "line": 1, }, "start": Object { - "column": 16, + "column": 27, "line": 1, }, }, - "name": "a", "range": Array [ - 16, - 17, + 27, + 38, ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "type": "VariableDeclaration", }, - "range": Array [ - 9, - 21, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, + Object { + "label": null, "loc": Object { "end": Object { - "column": 21, + "column": 45, "line": 1, }, "start": Object { - "column": 17, + "column": 39, "line": 1, }, }, - "params": Array [], "range": Array [ - 17, - 21, + 39, + 45, ], - "type": "FunctionExpression", + "type": "BreakStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, }, }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "range": Array [ + 18, + 45, + ], + "test": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "raw": "42", + "type": "Literal", + "value": 42, }, + "type": "SwitchCase", }, - "range": Array [ - 8, - 23, - ], - "type": "ClassBody", - }, - "id": Object { + ], + "discriminant": Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 8, "line": 1, }, }, - "name": "A", + "name": "answer", "range": Array [ - 6, - 7, + 8, + 14, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 23, + "column": 47, "line": 1, }, "start": Object { @@ -17097,33 +17605,15 @@ Object { }, "range": Array [ 0, - 23, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, + 47, ], - "type": "EmptyStatement", + "type": "SwitchStatement", }, ], "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -17132,14 +17622,14 @@ Object { }, "range": Array [ 0, - 24, + 48, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 6, "line": 1, }, "start": Object { @@ -17149,33 +17639,33 @@ Object { }, "range": Array [ 0, - 5, + 6, ], "type": "Keyword", - "value": "class", + "value": "switch", }, 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": "A", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 14, "line": 1, }, "start": Object { @@ -17185,10 +17675,10 @@ Object { }, "range": Array [ 8, - 9, + 14, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "answer", }, Object { "loc": Object { @@ -17197,16 +17687,16 @@ Object { "line": 1, }, "start": Object { - "column": 9, + "column": 14, "line": 1, }, }, "range": Array [ - 9, + 14, 15, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { @@ -17223,263 +17713,274 @@ Object { 16, 17, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "{", }, 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": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "case", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 25, "line": 1, }, "start": Object { - "column": 18, + "column": 23, "line": 1, }, }, "range": Array [ - 18, - 19, + 23, + 25, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "42", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 26, "line": 1, }, "start": Object { - "column": 19, + "column": 25, "line": 1, }, }, "range": Array [ - 19, - 20, + 25, + 26, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 30, "line": 1, }, "start": Object { - "column": 20, + "column": 27, "line": 1, }, }, "range": Array [ - 20, - 21, + 27, + 30, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 32, "line": 1, }, "start": Object { - "column": 21, + "column": 31, "line": 1, }, }, "range": Array [ - 21, - 22, + 31, + 32, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "t", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 34, "line": 1, }, "start": Object { - "column": 22, + "column": 33, "line": 1, }, }, "range": Array [ - 22, - 23, + 33, + 34, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 37, "line": 1, }, "start": Object { - "column": 23, + "column": 35, "line": 1, }, }, "range": Array [ - 23, - 24, + 35, + 37, ], - "type": "Punctuator", - "value": ";", + "type": "Numeric", + "value": "42", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/classes/class-static-method-named-prototype.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 44, + ], + "type": "Keyword", + "value": "break", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/callExpression/call-expression-with-array.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 28, - ], - "raw": "\\"prototype\\"", - "type": "Literal", - "value": "prototype", - }, - "kind": "method", + "elements": Array [], "loc": Object { "end": Object { - "column": 33, + "column": 6, "line": 1, }, "start": Object { - "column": 9, + "column": 4, "line": 1, }, }, "range": Array [ - 9, - 33, + 4, + 6, ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 33, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 29, - 33, - ], - "type": "FunctionExpression", - }, + "type": "ArrayExpression", }, ], - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "callee": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, }, + "name": "foo", + "range": Array [ + 0, + 3, + ], + "type": "Identifier", }, - "range": Array [ - 8, - 34, - ], - "type": "ClassBody", - }, - "id": Object { "loc": Object { "end": Object { "column": 7, "line": 1, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, - "name": "A", "range": Array [ - 6, + 0, 7, ], - "type": "Identifier", + "type": "CallExpression", }, "loc": Object { "end": Object { - "column": 34, + "column": 8, "line": 1, }, "start": Object { @@ -17489,33 +17990,15 @@ Object { }, "range": Array [ 0, - 34, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 35, + 8, ], - "type": "EmptyStatement", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -17524,14 +18007,14 @@ Object { }, "range": Array [ 0, - 35, + 9, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -17541,169 +18024,248 @@ Object { }, "range": Array [ 0, - 5, + 3, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 4, "line": 1, }, "start": Object { - "column": 6, + "column": 3, "line": 1, }, }, "range": Array [ - 6, - 7, + 3, + 4, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "(", }, 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": "{", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 6, "line": 1, }, "start": Object { - "column": 9, + "column": 5, "line": 1, }, }, "range": Array [ - 9, - 15, + 5, + 6, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 7, "line": 1, }, "start": Object { - "column": 16, + "column": 6, "line": 1, }, }, "range": Array [ - 16, - 17, + 6, + 7, ], "type": "Punctuator", - "value": "[", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 8, "line": 1, }, "start": Object { - "column": 17, + "column": 7, "line": 1, }, }, "range": Array [ - 17, - 28, + 7, + 8, ], - "type": "String", - "value": "\\"prototype\\"", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/callExpression/call-expression-with-object.src 1`] = ` +Object { + "body": Array [ Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 4, + 6, + ], + "type": "ObjectExpression", + }, + ], + "callee": Object { + "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": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "CallExpression", + }, "loc": Object { "end": Object { - "column": 29, + "column": 8, "line": 1, }, "start": Object { - "column": 28, + "column": 0, "line": 1, }, }, "range": Array [ - 28, - 29, + 0, + 8, ], - "type": "Punctuator", - "value": "]", + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 9, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 30, + "column": 3, "line": 1, }, "start": Object { - "column": 29, + "column": 0, "line": 1, }, }, "range": Array [ - 29, - 30, + 0, + 3, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 4, "line": 1, }, "start": Object { - "column": 30, + "column": 3, "line": 1, }, }, "range": Array [ - 30, - 31, + 3, + 4, ], "type": "Punctuator", - "value": ")", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 5, "line": 1, }, "start": Object { - "column": 31, + "column": 4, "line": 1, }, }, "range": Array [ - 31, - 32, + 4, + 5, ], "type": "Punctuator", "value": "{", @@ -17711,17 +18273,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 33, + "column": 6, "line": 1, }, "start": Object { - "column": 32, + "column": 5, "line": 1, }, }, "range": Array [ - 32, - 33, + 5, + 6, ], "type": "Punctuator", "value": "}", @@ -17729,35 +18291,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 34, + "column": 7, "line": 1, }, "start": Object { - "column": 33, + "column": 6, "line": 1, }, }, "range": Array [ - 33, - 34, + 6, + 7, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 8, "line": 1, }, "start": Object { - "column": 34, + "column": 7, "line": 1, }, }, "range": Array [ - 34, - 35, + 7, + 8, ], "type": "Punctuator", "value": ";", @@ -17767,129 +18329,312 @@ Object { } `; -exports[`javascript fixtures/classes/class-static-method-named-static.src 1`] = ` +exports[`javascript fixtures/callExpression/mixed-expression.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ + "expression": Object { + "arguments": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "static", - "range": Array [ - 16, - 22, - ], - "type": "Identifier", - }, - "kind": "method", "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 9, - "line": 1, + "column": 3, + "line": 5, }, }, + "properties": Array [], "range": Array [ - 9, - 26, + 67, + 69, ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 26, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 22, - 26, - ], - "type": "FunctionExpression", - }, + "type": "ObjectExpression", }, ], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, + "callee": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 7, + "line": 4, + }, + "start": Object { + "column": 5, + "line": 4, + }, + }, + "range": Array [ + 59, + 61, + ], + "type": "ArrayExpression", + }, + ], + "callee": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "properties": Array [], + "range": Array [ + 46, + 48, + ], + "type": "ObjectExpression", + }, + Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 50, + 52, + ], + "type": "ArrayExpression", + }, + ], + "callee": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 36, + 40, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "call", + "range": Array [ + 41, + 45, + ], + "type": "Identifier", + }, + "range": Array [ + 36, + 45, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 36, + 53, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 36, + 53, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 30, + 57, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 18, + 57, + ], + "type": "FunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 17, + 62, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 17, + 63, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 65, + ], + "type": "BlockStatement", }, - "start": Object { - "column": 8, - "line": 1, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 1, + "line": 1, + }, }, + "params": Array [], + "range": Array [ + 1, + 65, + ], + "type": "FunctionExpression", }, - "range": Array [ - 8, - 28, - ], - "type": "ClassBody", - }, - "id": Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 6, + "line": 5, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, - "name": "A", "range": Array [ - 6, - 7, + 0, + 70, ], - "type": "Identifier", + "type": "CallExpression", }, "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 7, + "line": 5, }, "start": Object { "column": 0, @@ -17898,33 +18643,15 @@ Object { }, "range": Array [ 0, - 28, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, + 71, ], - "type": "EmptyStatement", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 0, + "line": 6, }, "start": Object { "column": 0, @@ -17933,14 +18660,14 @@ Object { }, "range": Array [ 0, - 29, + 72, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -17950,97 +18677,133 @@ Object { }, "range": Array [ 0, - 5, + 1, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 1, }, "start": Object { - "column": 6, + "column": 1, "line": 1, }, }, "range": Array [ - 6, - 7, + 1, + 9, ], - "type": "Identifier", - "value": "A", + "type": "Keyword", + "value": "function", }, 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": 15, + "column": 12, "line": 1, }, "start": Object { - "column": 9, + "column": 11, "line": 1, }, }, "range": Array [ - 9, - 15, + 11, + 12, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 14, "line": 1, }, "start": Object { - "column": 16, + "column": 13, "line": 1, }, }, "range": Array [ - 16, - 22, + 13, + 14, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "range": Array [ + 18, + 26, ], "type": "Keyword", - "value": "static", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 12, + "line": 2, }, }, "range": Array [ - 22, - 23, + 27, + 28, ], "type": "Punctuator", "value": "(", @@ -18048,17 +18811,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 23, - 24, + 28, + 29, ], "type": "Punctuator", "value": ")", @@ -18066,17 +18829,17 @@ Object { 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, + 30, + 31, ], "type": "Punctuator", "value": "{", @@ -18084,53 +18847,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 25, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 25, - 26, + 36, + 40, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 40, + 41, ], "type": "Punctuator", - "value": "}", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 13, + "line": 3, }, "start": Object { - "column": 26, - "line": 1, + "column": 9, + "line": 3, }, }, "range": Array [ - 26, - 27, + 41, + 45, + ], + "type": "Identifier", + "value": "call", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 3, + }, + }, + "range": Array [ + 45, + 46, ], "type": "Punctuator", - "value": ";", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 15, + "line": 3, }, "start": Object { - "column": 27, - "line": 1, + "column": 14, + "line": 3, }, }, "range": Array [ - 27, - 28, + 46, + 47, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, ], "type": "Punctuator", "value": "}", @@ -18138,493 +18955,179 @@ Object { Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 17, + "line": 3, }, "start": Object { - "column": 28, - "line": 1, + "column": 16, + "line": 3, }, }, "range": Array [ - 28, - 29, + 48, + 49, ], "type": "Punctuator", - "value": ";", + "value": ",", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/classes/class-static-methods-and-accessor-properties.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": 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": "method", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 21, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 17, - 21, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 33, - 34, - ], - "type": "Identifier", - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 38, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 38, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 34, - 38, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 1, - }, - "start": Object { - "column": 50, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 50, - 51, - ], - "type": "Identifier", - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 56, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 54, - "line": 1, - }, - }, - "range": Array [ - 54, - 56, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 51, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 1, - }, - "start": Object { - "column": 52, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 52, - 53, - ], - "type": "Identifier", - }, - ], - "range": Array [ - 51, - 56, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 58, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 58, - ], - "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": 58, - "line": 1, + "column": 19, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 18, + "line": 3, }, }, "range": Array [ - 0, - 58, + 50, + 51, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 59, - "line": 1, + "column": 20, + "line": 3, }, "start": Object { - "column": 58, - "line": 1, + "column": 19, + "line": 3, }, }, "range": Array [ - 58, - 59, + 51, + 52, ], - "type": "EmptyStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 59, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "]", }, - }, - "range": Array [ - 0, - 59, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 21, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 20, + "line": 3, }, }, "range": Array [ - 0, - 5, + 52, + 53, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 3, + "line": 4, }, "start": Object { - "column": 6, - "line": 1, + "column": 2, + "line": 4, }, }, "range": Array [ - 6, - 7, + 56, + 57, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 4, + "line": 4, }, "start": Object { - "column": 8, - "line": 1, + "column": 3, + "line": 4, }, }, "range": Array [ - 8, - 9, + 57, + 58, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 9, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 9, - 15, + 58, + 59, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 6, + "line": 4, }, "start": Object { - "column": 16, - "line": 1, + "column": 5, + "line": 4, }, }, "range": Array [ - 16, - 17, + 59, + 60, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 7, + "line": 4, }, "start": Object { - "column": 17, - "line": 1, + "column": 6, + "line": 4, }, }, "range": Array [ - 17, - 18, + 60, + 61, ], "type": "Punctuator", - "value": "(", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 8, + "line": 4, }, "start": Object { - "column": 18, - "line": 1, + "column": 7, + "line": 4, }, }, "range": Array [ - 18, - 19, + 61, + 62, ], "type": "Punctuator", "value": ")", @@ -18632,35 +19135,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 9, + "line": 4, }, "start": Object { - "column": 19, - "line": 1, + "column": 8, + "line": 4, }, }, "range": Array [ - 19, - 20, + 62, + 63, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 20, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 20, - 21, + 64, + 65, ], "type": "Punctuator", "value": "}", @@ -18668,89 +19171,89 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 2, + "line": 5, }, "start": Object { - "column": 22, - "line": 1, + "column": 1, + "line": 5, }, }, "range": Array [ - 22, - 28, + 65, + 66, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { - "column": 29, - "line": 1, + "column": 2, + "line": 5, }, }, "range": Array [ - 29, - 32, + 66, + 67, ], - "type": "Identifier", - "value": "get", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 4, + "line": 5, }, "start": Object { - "column": 33, - "line": 1, + "column": 3, + "line": 5, }, }, "range": Array [ - 33, - 34, + 67, + 68, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 34, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 34, - 35, + 68, + 69, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 6, + "line": 5, }, "start": Object { - "column": 35, - "line": 1, + "column": 5, + "line": 5, }, }, "range": Array [ - 35, - 36, + 69, + 70, ], "type": "Punctuator", "value": ")", @@ -18758,143 +19261,332 @@ Object { Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 7, + "line": 5, }, "start": Object { - "column": 36, - "line": 1, + "column": 6, + "line": 5, }, }, "range": Array [ - 36, - 37, + 70, + 71, ], "type": "Punctuator", - "value": "{", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/callExpression/new-expression-with-array.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, + "expression": Object { + "arguments": Array [ + Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 10, + ], + "type": "ArrayExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "type": "NewExpression", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, "start": Object { - "column": 37, + "column": 0, "line": 1, }, }, "range": Array [ - 37, - 38, + 0, + 12, ], - "type": "Punctuator", - "value": "}", + "type": "ExpressionStatement", + }, + Object { + "expression": Object { + "arguments": Array [ + Object { + "elements": Array [ + Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "properties": Array [], + "range": Array [ + 23, + 25, + ], + "type": "ObjectExpression", + }, + ], + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 22, + 26, + ], + "type": "ArrayExpression", + }, + ], + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 21, + 27, + ], + "type": "ArrayExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 13, + 28, + ], + "type": "NewExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 13, + 29, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 30, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 45, + "column": 3, "line": 1, }, "start": Object { - "column": 39, + "column": 0, "line": 1, }, }, "range": Array [ - 39, - 45, + 0, + 3, ], "type": "Keyword", - "value": "static", + "value": "new", }, Object { "loc": Object { "end": Object { - "column": 49, + "column": 7, "line": 1, }, "start": Object { - "column": 46, + "column": 4, "line": 1, }, }, "range": Array [ - 46, - 49, + 4, + 7, ], "type": "Identifier", - "value": "set", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 51, + "column": 8, "line": 1, }, "start": Object { - "column": 50, + "column": 7, "line": 1, }, }, "range": Array [ - 50, - 51, + 7, + 8, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 52, + "column": 9, "line": 1, }, "start": Object { - "column": 51, + "column": 8, "line": 1, }, }, "range": Array [ - 51, - 52, + 8, + 9, ], "type": "Punctuator", - "value": "(", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 53, + "column": 10, "line": 1, }, "start": Object { - "column": 52, + "column": 9, "line": 1, }, }, "range": Array [ - 52, - 53, + 9, + 10, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 54, + "column": 11, "line": 1, }, "start": Object { - "column": 53, + "column": 10, "line": 1, }, }, "range": Array [ - 53, - 54, + 10, + 11, ], "type": "Punctuator", "value": ")", @@ -18902,17 +19594,125 @@ Object { Object { "loc": Object { "end": Object { - "column": 55, + "column": 12, "line": 1, }, "start": Object { - "column": 54, + "column": 11, "line": 1, }, }, "range": Array [ - 54, - 55, + 11, + 12, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, ], "type": "Punctuator", "value": "{", @@ -18920,17 +19720,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 56, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 55, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 55, - 56, + 24, + 25, ], "type": "Punctuator", "value": "}", @@ -18938,35 +19738,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 58, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 57, - "line": 1, + "column": 12, + "line": 2, }, }, "range": Array [ - 57, - 58, + 25, + 26, ], "type": "Punctuator", - "value": "}", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 59, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 58, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 58, - 59, + 26, + 27, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, ], "type": "Punctuator", "value": ";", @@ -18976,126 +19812,349 @@ Object { } `; -exports[`javascript fixtures/classes/class-two-computed-static-methods.src 1`] = ` +exports[`javascript fixtures/callExpression/new-expression-with-object.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ + "expression": Object { + "arguments": Array [ Object { - "computed": true, - "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": "method", "loc": Object { "end": Object { - "column": 22, + "column": 10, "line": 1, }, "start": Object { - "column": 9, + "column": 8, "line": 1, }, }, + "properties": Array [], "range": Array [ - 9, - 22, + 8, + 10, ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 18, + "type": "ObjectExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "type": "NewExpression", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 14, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-accessor-properties.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "kind": "get", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 18, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 14, "line": 1, }, }, "params": Array [], "range": Array [ + 14, 18, - 22, ], "type": "FunctionExpression", }, }, Object { - "computed": true, + "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 32, + "column": 24, "line": 1, }, "start": Object { - "column": 31, + "column": 23, "line": 1, }, }, "name": "b", "range": Array [ - 31, - 32, + 23, + 24, ], "type": "Identifier", }, - "kind": "method", + "kind": "set", "loc": Object { "end": Object { - "column": 37, + "column": 29, "line": 1, }, "start": Object { - "column": 24, + "column": 19, "line": 1, }, }, "range": Array [ - 24, - 37, + 19, + 29, ], - "static": true, + "static": false, "type": "MethodDefinition", "value": Object { "async": false, @@ -19103,17 +20162,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 37, + "column": 29, "line": 1, }, "start": Object { - "column": 35, + "column": 27, "line": 1, }, }, "range": Array [ - 35, - 37, + 27, + 29, ], "type": "BlockStatement", }, @@ -19122,18 +20181,37 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 37, + "column": 29, "line": 1, }, "start": Object { - "column": 33, + "column": 24, "line": 1, }, }, - "params": Array [], + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + ], "range": Array [ - 33, - 37, + 24, + 29, ], "type": "FunctionExpression", }, @@ -19141,7 +20219,7 @@ Object { ], "loc": Object { "end": Object { - "column": 38, + "column": 31, "line": 1, }, "start": Object { @@ -19151,7 +20229,7 @@ Object { }, "range": Array [ 8, - 38, + 31, ], "type": "ClassBody", }, @@ -19175,7 +20253,7 @@ Object { }, "loc": Object { "end": Object { - "column": 38, + "column": 31, "line": 1, }, "start": Object { @@ -19185,7 +20263,7 @@ Object { }, "range": Array [ 0, - 38, + 31, ], "superClass": null, "type": "ClassDeclaration", @@ -19193,24 +20271,24 @@ Object { Object { "loc": Object { "end": Object { - "column": 39, + "column": 32, "line": 1, }, "start": Object { - "column": 38, + "column": 31, "line": 1, }, }, "range": Array [ - 38, - 39, + 31, + 32, ], "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 39, + "column": 32, "line": 1, }, "start": Object { @@ -19220,7 +20298,7 @@ Object { }, "range": Array [ 0, - 39, + 32, ], "sourceType": "script", "tokens": Array [ @@ -19281,7 +20359,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 12, "line": 1, }, "start": Object { @@ -19291,43 +20369,25 @@ Object { }, "range": Array [ 9, - 15, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, + 12, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 14, "line": 1, }, "start": Object { - "column": 16, + "column": 13, "line": 1, }, }, "range": Array [ - 16, - 17, + 13, + 14, ], "type": "Identifier", "value": "a", @@ -19335,74 +20395,74 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 15, "line": 1, }, "start": Object { - "column": 17, + "column": 14, "line": 1, }, }, "range": Array [ - 17, - 18, + 14, + 15, ], "type": "Punctuator", - "value": "]", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 16, "line": 1, }, "start": Object { - "column": 18, + "column": 15, "line": 1, }, }, "range": Array [ - 18, - 19, + 15, + 16, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 17, "line": 1, }, "start": Object { - "column": 19, + "column": 16, "line": 1, }, }, "range": Array [ - 19, - 20, + 16, + 17, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 18, "line": 1, }, "start": Object { - "column": 20, + "column": 17, "line": 1, }, }, "range": Array [ - 20, - 21, + 17, + 18, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { @@ -19411,39 +20471,39 @@ Object { "line": 1, }, "start": Object { - "column": 21, + "column": 19, "line": 1, }, }, "range": Array [ - 21, + 19, 22, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 24, "line": 1, }, "start": Object { - "column": 22, + "column": 23, "line": 1, }, }, "range": Array [ - 22, 23, + 24, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 25, "line": 1, }, "start": Object { @@ -19453,151 +20513,115 @@ Object { }, "range": Array [ 24, - 30, + 25, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 26, "line": 1, }, "start": Object { - "column": 30, + "column": 25, "line": 1, }, }, "range": Array [ - 30, - 31, + 25, + 26, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 27, "line": 1, }, "start": Object { - "column": 31, + "column": 26, "line": 1, }, }, "range": Array [ - 31, - 32, + 26, + 27, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 33, + "column": 28, "line": 1, }, "start": Object { - "column": 32, + "column": 27, "line": 1, }, }, "range": Array [ - 32, - 33, + 27, + 28, ], "type": "Punctuator", - "value": "]", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 29, "line": 1, }, "start": Object { - "column": 33, + "column": 28, "line": 1, }, }, "range": Array [ - 33, - 34, + 28, + 29, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 30, "line": 1, }, "start": Object { - "column": 34, + "column": 29, "line": 1, }, }, "range": Array [ - 34, - 35, + 29, + 30, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 31, "line": 1, }, "start": Object { - "column": 35, + "column": 30, "line": 1, }, }, "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, + 30, + 31, ], "type": "Punctuator", "value": "}", @@ -19605,17 +20629,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 39, + "column": 32, "line": 1, }, "start": Object { - "column": 38, + "column": 31, "line": 1, }, }, "range": Array [ - 38, - 39, + 31, + 32, ], "type": "Punctuator", "value": ";", @@ -19625,36 +20649,36 @@ Object { } `; -exports[`javascript fixtures/classes/class-two-methods.src 1`] = ` +exports[`javascript fixtures/classes/class-computed-static-method.src 1`] = ` Object { "body": Array [ Object { "body": Object { "body": Array [ Object { - "computed": false, + "computed": true, "key": Object { "loc": Object { "end": Object { - "column": 10, + "column": 18, "line": 1, }, "start": Object { - "column": 9, + "column": 17, "line": 1, }, }, "name": "a", "range": Array [ - 9, - 10, + 17, + 18, ], "type": "Identifier", }, "kind": "method", "loc": Object { "end": Object { - "column": 14, + "column": 23, "line": 1, }, "start": Object { @@ -19664,9 +20688,9 @@ Object { }, "range": Array [ 9, - 14, + 23, ], - "static": false, + "static": true, "type": "MethodDefinition", "value": Object { "async": false, @@ -19674,17 +20698,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 14, + "column": 23, "line": 1, }, "start": Object { - "column": 12, + "column": 21, "line": 1, }, }, "range": Array [ - 12, - 14, + 21, + 23, ], "type": "BlockStatement", }, @@ -19693,96 +20717,18 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 10, - 14, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, + "column": 23, "line": 1, }, "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 19, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 19, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { "column": 19, "line": 1, }, - "start": Object { - "column": 15, - "line": 1, - }, }, "params": Array [], "range": Array [ - 15, 19, + 23, ], "type": "FunctionExpression", }, @@ -19790,7 +20736,7 @@ Object { ], "loc": Object { "end": Object { - "column": 20, + "column": 25, "line": 1, }, "start": Object { @@ -19800,7 +20746,7 @@ Object { }, "range": Array [ 8, - 20, + 25, ], "type": "ClassBody", }, @@ -19824,7 +20770,7 @@ Object { }, "loc": Object { "end": Object { - "column": 20, + "column": 25, "line": 1, }, "start": Object { @@ -19834,7 +20780,7 @@ Object { }, "range": Array [ 0, - 20, + 25, ], "superClass": null, "type": "ClassDeclaration", @@ -19842,24 +20788,24 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 26, "line": 1, }, "start": Object { - "column": 20, + "column": 25, "line": 1, }, }, "range": Array [ - 20, - 21, + 25, + 26, ], "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 21, + "column": 26, "line": 1, }, "start": Object { @@ -19869,7 +20815,7 @@ Object { }, "range": Array [ 0, - 21, + 26, ], "sourceType": "script", "tokens": Array [ @@ -19930,7 +20876,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 1, }, "start": Object { @@ -19940,7 +20886,43 @@ Object { }, "range": Array [ 9, - 10, + 15, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, ], "type": "Identifier", "value": "a", @@ -19948,17 +20930,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 19, "line": 1, }, "start": Object { - "column": 10, + "column": 18, "line": 1, }, }, "range": Array [ - 10, - 11, + 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": "(", @@ -19966,17 +20966,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 21, "line": 1, }, "start": Object { - "column": 11, + "column": 20, "line": 1, }, }, "range": Array [ - 11, - 12, + 20, + 21, ], "type": "Punctuator", "value": ")", @@ -19984,17 +20984,17 @@ Object { 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": "{", @@ -20002,17 +21002,17 @@ Object { 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": "}", @@ -20020,71 +21020,186 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 24, "line": 1, }, "start": Object { - "column": 14, + "column": 23, "line": 1, }, }, "range": Array [ - 14, - 15, + 23, + 24, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 25, "line": 1, }, "start": Object { - "column": 15, + "column": 24, "line": 1, }, }, "range": Array [ - 15, - 16, + 24, + 25, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 26, "line": 1, }, "start": Object { - "column": 16, + "column": 25, "line": 1, }, }, "range": Array [ - 16, - 17, + 25, + 26, ], "type": "Punctuator", - "value": ")", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 9, + ], + "type": "ClassBody", + }, + "id": null, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 9, + ], + "superClass": null, + "type": "ClassExpression", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 11, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 18, + "column": 1, "line": 1, }, "start": Object { - "column": 17, + "column": 0, "line": 1, }, }, "range": Array [ - 17, - 18, + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 6, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, ], "type": "Punctuator", "value": "{", @@ -20092,17 +21207,17 @@ Object { 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": "}", @@ -20110,35 +21225,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 10, "line": 1, }, "start": Object { - "column": 19, + "column": 9, "line": 1, }, }, "range": Array [ - 19, - 20, + 9, + 10, ], "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": ";", @@ -20148,7 +21263,7 @@ Object { } `; -exports[`javascript fixtures/classes/class-two-methods-computed-constructor.src 1`] = ` +exports[`javascript fixtures/classes/class-method-named-prototype.src 1`] = ` Object { "body": Array [ Object { @@ -20159,7 +21274,7 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 22, + "column": 18, "line": 1, }, "start": Object { @@ -20167,18 +21282,17 @@ Object { "line": 1, }, }, + "name": "prototype", "range": Array [ 9, - 22, + 18, ], - "raw": "\\"constructor\\"", - "type": "Literal", - "value": "constructor", + "type": "Identifier", }, - "kind": "constructor", + "kind": "method", "loc": Object { "end": Object { - "column": 26, + "column": 22, "line": 1, }, "start": Object { @@ -20188,7 +21302,7 @@ Object { }, "range": Array [ 9, - 26, + 22, ], "static": false, "type": "MethodDefinition", @@ -20198,17 +21312,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 26, + "column": 22, "line": 1, }, "start": Object { - "column": 24, + "column": 20, "line": 1, }, }, "range": Array [ - 24, - 26, + 20, + 22, ], "type": "BlockStatement", }, @@ -20217,97 +21331,18 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 26, + "column": 22, "line": 1, }, "start": Object { - "column": 22, + "column": 18, "line": 1, }, }, "params": Array [], "range": Array [ + 18, 22, - 26, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 41, - ], - "raw": "\\"constructor\\"", - "type": "Literal", - "value": "constructor", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 46, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 46, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 42, - 46, ], "type": "FunctionExpression", }, @@ -20315,7 +21350,7 @@ Object { ], "loc": Object { "end": Object { - "column": 47, + "column": 23, "line": 1, }, "start": Object { @@ -20325,7 +21360,7 @@ Object { }, "range": Array [ 8, - 47, + 23, ], "type": "ClassBody", }, @@ -20349,7 +21384,7 @@ Object { }, "loc": Object { "end": Object { - "column": 47, + "column": 23, "line": 1, }, "start": Object { @@ -20359,7 +21394,7 @@ Object { }, "range": Array [ 0, - 47, + 23, ], "superClass": null, "type": "ClassDeclaration", @@ -20367,24 +21402,24 @@ Object { Object { "loc": Object { "end": Object { - "column": 48, + "column": 24, "line": 1, }, "start": Object { - "column": 47, + "column": 23, "line": 1, }, }, "range": Array [ - 47, - 48, + 23, + 24, ], "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 48, + "column": 24, "line": 1, }, "start": Object { @@ -20394,7 +21429,7 @@ Object { }, "range": Array [ 0, - 48, + 24, ], "sourceType": "script", "tokens": Array [ @@ -20455,7 +21490,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 18, "line": 1, }, "start": Object { @@ -20465,151 +21500,25 @@ Object { }, "range": Array [ 9, - 22, - ], - "type": "String", - "value": "\\"constructor\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 41, - ], - "type": "String", - "value": "\\"constructor\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, + 18, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "prototype", }, Object { "loc": Object { "end": Object { - "column": 43, + "column": 19, "line": 1, }, "start": Object { - "column": 42, + "column": 18, "line": 1, }, }, "range": Array [ - 42, - 43, + 18, + 19, ], "type": "Punctuator", "value": "(", @@ -20617,17 +21526,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 44, + "column": 20, "line": 1, }, "start": Object { - "column": 43, + "column": 19, "line": 1, }, }, "range": Array [ - 43, - 44, + 19, + 20, ], "type": "Punctuator", "value": ")", @@ -20635,17 +21544,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 45, + "column": 21, "line": 1, }, "start": Object { - "column": 44, + "column": 20, "line": 1, }, }, "range": Array [ - 44, - 45, + 20, + 21, ], "type": "Punctuator", "value": "{", @@ -20653,17 +21562,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 46, + "column": 22, "line": 1, }, "start": Object { - "column": 45, + "column": 21, "line": 1, }, }, "range": Array [ - 45, - 46, + 21, + 22, ], "type": "Punctuator", "value": "}", @@ -20671,17 +21580,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 47, + "column": 23, "line": 1, }, "start": Object { - "column": 46, + "column": 22, "line": 1, }, }, "range": Array [ - 46, - 47, + 22, + 23, ], "type": "Punctuator", "value": "}", @@ -20689,17 +21598,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 48, + "column": 24, "line": 1, }, "start": Object { - "column": 47, + "column": 23, "line": 1, }, }, "range": Array [ - 47, - 48, + 23, + 24, ], "type": "Punctuator", "value": ";", @@ -20709,7 +21618,7 @@ Object { } `; -exports[`javascript fixtures/classes/class-two-methods-semi.src 1`] = ` +exports[`javascript fixtures/classes/class-method-named-static.src 1`] = ` Object { "body": Array [ Object { @@ -20720,7 +21629,7 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 1, }, "start": Object { @@ -20728,17 +21637,17 @@ Object { "line": 1, }, }, - "name": "a", + "name": "static", "range": Array [ 9, - 10, + 15, ], "type": "Identifier", }, "kind": "method", "loc": Object { "end": Object { - "column": 14, + "column": 19, "line": 1, }, "start": Object { @@ -20748,7 +21657,7 @@ Object { }, "range": Array [ 9, - 14, + 19, ], "static": false, "type": "MethodDefinition", @@ -20758,17 +21667,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 14, + "column": 19, "line": 1, }, "start": Object { - "column": 12, + "column": 17, "line": 1, }, }, "range": Array [ - 12, - 14, + 17, + 19, ], "type": "BlockStatement", }, @@ -20777,28 +21686,7 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 10, - 14, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 16, + "column": 19, "line": 1, }, "start": Object { @@ -20806,67 +21694,10 @@ Object { "line": 1, }, }, - "name": "b", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "static": false, - "type": "MethodDefinition", - "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": 16, - "line": 1, - }, - }, "params": Array [], "range": Array [ - 16, - 20, + 15, + 19, ], "type": "FunctionExpression", }, @@ -21014,7 +21845,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 1, }, "start": Object { @@ -21024,100 +21855,10 @@ Object { }, "range": Array [ 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, 15, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "static", }, Object { "loc": Object { @@ -21134,8 +21875,8 @@ Object { 15, 16, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -21153,7 +21894,7 @@ Object { 17, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { @@ -21171,7 +21912,7 @@ Object { 18, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { @@ -21189,7 +21930,7 @@ Object { 19, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { @@ -21207,7 +21948,7 @@ Object { 20, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { @@ -21250,7 +21991,7 @@ Object { } `; -exports[`javascript fixtures/classes/class-two-methods-three-semi.src 1`] = ` +exports[`javascript fixtures/classes/class-method-named-with-space.src 1`] = ` Object { "body": Array [ Object { @@ -21261,35 +22002,35 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 11, + "column": 18, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, - "name": "a", + "name": "withSpace", "range": Array [ - 10, - 11, + 9, + 18, ], "type": "Identifier", }, "kind": "method", "loc": Object { "end": Object { - "column": 15, + "column": 24, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, "range": Array [ - 10, - 15, + 9, + 24, ], "static": false, "type": "MethodDefinition", @@ -21299,17 +22040,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 15, + "column": 24, "line": 1, }, "start": Object { - "column": 13, + "column": 22, "line": 1, }, }, "range": Array [ - 13, - 15, + 22, + 24, ], "type": "BlockStatement", }, @@ -21318,96 +22059,18 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 15, + "column": 24, "line": 1, }, "start": Object { - "column": 11, + "column": 19, "line": 1, }, }, "params": Array [], "range": Array [ - 11, - 15, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 17, - 21, + 19, + 24, ], "type": "FunctionExpression", }, @@ -21415,7 +22078,7 @@ Object { ], "loc": Object { "end": Object { - "column": 23, + "column": 25, "line": 1, }, "start": Object { @@ -21425,7 +22088,7 @@ Object { }, "range": Array [ 8, - 23, + 25, ], "type": "ClassBody", }, @@ -21449,7 +22112,7 @@ Object { }, "loc": Object { "end": Object { - "column": 23, + "column": 25, "line": 1, }, "start": Object { @@ -21459,33 +22122,16 @@ Object { }, "range": Array [ 0, - 23, + 25, ], "superClass": null, "type": "ClassDeclaration", }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "EmptyStatement", - }, ], "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -21494,7 +22140,7 @@ Object { }, "range": Array [ 0, - 24, + 26, ], "sourceType": "script", "tokens": Array [ @@ -21555,7 +22201,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 18, "line": 1, }, "start": Object { @@ -21565,172 +22211,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, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ 18, - 19, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "withSpace", }, Object { "loc": Object { @@ -21748,7 +22232,7 @@ Object { 20, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { @@ -21766,40 +22250,40 @@ Object { 21, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 23, "line": 1, }, "start": Object { - "column": 21, + "column": 22, "line": 1, }, }, "range": Array [ - 21, 22, + 23, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 24, "line": 1, }, "start": Object { - "column": 22, + "column": 23, "line": 1, }, }, "range": Array [ - 22, 23, + 24, ], "type": "Punctuator", "value": "}", @@ -21807,27 +22291,27 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, + "column": 25, "line": 1, }, "start": Object { - "column": 23, + "column": 24, "line": 1, }, }, "range": Array [ - 23, 24, + 25, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/classes/class-two-methods-two-semi.src 1`] = ` +exports[`javascript fixtures/classes/class-one-method.src 1`] = ` Object { "body": Array [ Object { @@ -21838,113 +22322,35 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 4, + "line": 2, }, }, "name": "a", "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 14, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 10, 14, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "b", - "range": Array [ 15, - 16, ], "type": "Identifier", }, "kind": "method", "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 15, - 20, + 14, + 19, ], "static": false, "type": "MethodDefinition", @@ -21954,17 +22360,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 18, - 20, + 17, + 19, ], "type": "BlockStatement", }, @@ -21973,18 +22379,18 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 5, + "line": 2, }, }, "params": Array [], "range": Array [ - 16, - 20, + 15, + 19, ], "type": "FunctionExpression", }, @@ -21992,8 +22398,8 @@ Object { ], "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 8, @@ -22002,7 +22408,7 @@ Object { }, "range": Array [ 8, - 22, + 21, ], "type": "ClassBody", }, @@ -22026,8 +22432,8 @@ Object { }, "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -22036,7 +22442,7 @@ Object { }, "range": Array [ 0, - 22, + 21, ], "superClass": null, "type": "ClassDeclaration", @@ -22044,25 +22450,25 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { - "column": 22, - "line": 1, + "column": 1, + "line": 3, }, }, "range": Array [ + 21, 22, - 23, ], "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { "column": 0, @@ -22071,7 +22477,7 @@ Object { }, "range": Array [ 0, - 23, + 22, ], "sourceType": "script", "tokens": Array [ @@ -22132,17 +22538,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 9, - 10, + 14, + 15, ], "type": "Identifier", "value": "a", @@ -22150,17 +22556,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 6, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 5, + "line": 2, }, }, "range": Array [ - 10, - 11, + 15, + 16, ], "type": "Punctuator", "value": "(", @@ -22168,17 +22574,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 6, + "line": 2, }, }, "range": Array [ - 11, - 12, + 16, + 17, ], "type": "Punctuator", "value": ")", @@ -22186,17 +22592,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 12, - 13, + 17, + 18, ], "type": "Punctuator", "value": "{", @@ -22204,17 +22610,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 13, - 14, + 18, + 19, ], "type": "Punctuator", "value": "}", @@ -22222,138 +22628,30 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 14, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 14, - 15, + 20, + 21, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { - "column": 21, - "line": 1, + "column": 1, + "line": 3, }, }, "range": Array [ @@ -22361,24 +22659,6 @@ Object { 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": ";", }, ], @@ -22386,7 +22666,7 @@ Object { } `; -exports[`javascript fixtures/classes/class-two-static-methods-named-constructor.src 1`] = ` +exports[`javascript fixtures/classes/class-one-method-super.src 1`] = ` Object { "body": Array [ Object { @@ -22397,133 +22677,108 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 4, + "line": 2, }, }, - "name": "constructor", + "name": "a", "range": Array [ - 16, - 27, + 14, + 15, ], "type": "Identifier", }, "kind": "method", "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 9, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 9, - 31, + 14, + 41, ], - "static": true, + "static": false, "type": "MethodDefinition", "value": Object { "async": false, "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, + "body": Array [ + Object { + "expression": Object { + "arguments": Array [], + "callee": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 27, + 32, + ], + "type": "Super", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 27, + 34, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 27, + 35, + ], + "type": "ExpressionStatement", }, - }, - "range": Array [ - 29, - 31, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "params": Array [], - "range": Array [ - 27, - 31, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "name": "constructor", - "range": Array [ - 39, - 50, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 54, - ], - "static": true, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], "loc": Object { "end": Object { - "column": 54, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 52, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 52, - 54, + 17, + 41, ], "type": "BlockStatement", }, @@ -22532,18 +22787,18 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 54, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 50, - "line": 1, + "column": 5, + "line": 2, }, }, "params": Array [], "range": Array [ - 50, - 54, + 15, + 41, ], "type": "FunctionExpression", }, @@ -22551,8 +22806,8 @@ Object { ], "loc": Object { "end": Object { - "column": 55, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { "column": 8, @@ -22561,7 +22816,7 @@ Object { }, "range": Array [ 8, - 55, + 43, ], "type": "ClassBody", }, @@ -22585,8 +22840,8 @@ Object { }, "loc": Object { "end": Object { - "column": 55, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { "column": 0, @@ -22595,7 +22850,7 @@ Object { }, "range": Array [ 0, - 55, + 43, ], "superClass": null, "type": "ClassDeclaration", @@ -22603,25 +22858,25 @@ Object { Object { "loc": Object { "end": Object { - "column": 56, - "line": 1, + "column": 2, + "line": 5, }, "start": Object { - "column": 55, - "line": 1, + "column": 1, + "line": 5, }, }, "range": Array [ - 55, - 56, + 43, + 44, ], "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 56, - "line": 1, + "column": 0, + "line": 6, }, "start": Object { "column": 0, @@ -22630,7 +22885,7 @@ Object { }, "range": Array [ 0, - 56, + 45, ], "sourceType": "script", "tokens": Array [ @@ -22691,53 +22946,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 9, + 14, 15, ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 27, - ], "type": "Identifier", - "value": "constructor", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 6, + "line": 2, }, "start": Object { - "column": 27, - "line": 1, + "column": 5, + "line": 2, }, }, "range": Array [ - 27, - 28, + 15, + 16, ], "type": "Punctuator", "value": "(", @@ -22745,17 +22982,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 28, - "line": 1, + "column": 6, + "line": 2, }, }, "range": Array [ - 28, - 29, + 16, + 17, ], "type": "Punctuator", "value": ")", @@ -22763,17 +23000,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 29, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 29, - 30, + 17, + 18, ], "type": "Punctuator", "value": "{", @@ -22781,161 +23018,125 @@ Object { Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 13, + "line": 3, }, "start": Object { - "column": 30, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 30, - 31, + 27, + 32, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "super", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 14, + "line": 3, }, "start": Object { - "column": 32, - "line": 1, + "column": 13, + "line": 3, }, }, "range": Array [ 32, - 38, + 33, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 50, - "line": 1, + "column": 15, + "line": 3, }, "start": Object { - "column": 39, - "line": 1, + "column": 14, + "line": 3, }, }, "range": Array [ - 39, - 50, + 33, + 34, ], - "type": "Identifier", - "value": "constructor", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 51, - "line": 1, + "column": 16, + "line": 3, }, "start": Object { - "column": 50, - "line": 1, + "column": 15, + "line": 3, }, }, "range": Array [ - 50, - 51, + 34, + 35, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 52, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 51, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 51, - 52, + 40, + 41, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 53, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 52, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 52, - 53, + 42, + 43, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 54, - "line": 1, + "column": 2, + "line": 5, }, "start": Object { - "column": 53, - "line": 1, + "column": 1, + "line": 5, }, }, "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 1, - }, - "start": Object { - "column": 54, - "line": 1, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 1, - }, - "start": Object { - "column": 55, - "line": 1, - }, - }, - "range": Array [ - 55, - 56, + 43, + 44, ], "type": "Punctuator", "value": ";", @@ -22945,7 +23146,7 @@ Object { } `; -exports[`javascript fixtures/classes/class-with-constructor.src 1`] = ` +exports[`javascript fixtures/classes/class-static-method.src 1`] = ` Object { "body": Array [ Object { @@ -22956,25 +23157,25 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 20, + "column": 17, "line": 1, }, "start": Object { - "column": 9, + "column": 16, "line": 1, }, }, - "name": "constructor", + "name": "a", "range": Array [ - 9, - 20, + 16, + 17, ], "type": "Identifier", }, - "kind": "constructor", + "kind": "method", "loc": Object { "end": Object { - "column": 24, + "column": 21, "line": 1, }, "start": Object { @@ -22984,9 +23185,9 @@ Object { }, "range": Array [ 9, - 24, + 21, ], - "static": false, + "static": true, "type": "MethodDefinition", "value": Object { "async": false, @@ -22994,17 +23195,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 24, + "column": 21, "line": 1, }, "start": Object { - "column": 22, + "column": 19, "line": 1, }, }, "range": Array [ - 22, - 24, + 19, + 21, ], "type": "BlockStatement", }, @@ -23013,18 +23214,18 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 24, + "column": 21, "line": 1, }, "start": Object { - "column": 20, + "column": 17, "line": 1, }, }, "params": Array [], "range": Array [ - 20, - 24, + 17, + 21, ], "type": "FunctionExpression", }, @@ -23032,7 +23233,7 @@ Object { ], "loc": Object { "end": Object { - "column": 25, + "column": 23, "line": 1, }, "start": Object { @@ -23042,7 +23243,7 @@ Object { }, "range": Array [ 8, - 25, + 23, ], "type": "ClassBody", }, @@ -23066,7 +23267,7 @@ Object { }, "loc": Object { "end": Object { - "column": 25, + "column": 23, "line": 1, }, "start": Object { @@ -23076,7 +23277,7 @@ Object { }, "range": Array [ 0, - 25, + 23, ], "superClass": null, "type": "ClassDeclaration", @@ -23084,24 +23285,24 @@ Object { Object { "loc": Object { "end": Object { - "column": 26, + "column": 24, "line": 1, }, "start": Object { - "column": 25, + "column": 23, "line": 1, }, }, "range": Array [ - 25, - 26, + 23, + 24, ], "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 26, + "column": 24, "line": 1, }, "start": Object { @@ -23111,7 +23312,7 @@ Object { }, "range": Array [ 0, - 26, + 24, ], "sourceType": "script", "tokens": Array [ @@ -23172,7 +23373,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 15, "line": 1, }, "start": Object { @@ -23182,25 +23383,43 @@ Object { }, "range": Array [ 9, - 20, + 15, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, ], "type": "Identifier", - "value": "constructor", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 18, "line": 1, }, "start": Object { - "column": 20, + "column": 17, "line": 1, }, }, "range": Array [ - 20, - 21, + 17, + 18, ], "type": "Punctuator", "value": "(", @@ -23208,17 +23427,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 19, "line": 1, }, "start": Object { - "column": 21, + "column": 18, "line": 1, }, }, "range": Array [ - 21, - 22, + 18, + 19, ], "type": "Punctuator", "value": ")", @@ -23226,17 +23445,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 1, }, "start": Object { - "column": 22, + "column": 19, "line": 1, }, }, "range": Array [ - 22, - 23, + 19, + 20, ], "type": "Punctuator", "value": "{", @@ -23244,17 +23463,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, + "column": 21, "line": 1, }, "start": Object { - "column": 23, + "column": 20, "line": 1, }, }, "range": Array [ - 23, - 24, + 20, + 21, ], "type": "Punctuator", "value": "}", @@ -23262,17 +23481,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, + "column": 22, "line": 1, }, "start": Object { - "column": 24, + "column": 21, "line": 1, }, }, "range": Array [ - 24, - 25, + 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": "}", @@ -23280,17 +23517,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 26, + "column": 24, "line": 1, }, "start": Object { - "column": 25, + "column": 23, "line": 1, }, }, "range": Array [ - 25, - 26, + 23, + 24, ], "type": "Punctuator", "value": ";", @@ -23300,36 +23537,37 @@ Object { } `; -exports[`javascript fixtures/classes/class-with-constructor-parameters.src 1`] = ` +exports[`javascript fixtures/classes/class-static-method-named-prototype.src 1`] = ` Object { "body": Array [ Object { "body": Object { "body": Array [ Object { - "computed": false, + "computed": true, "key": Object { "loc": Object { "end": Object { - "column": 20, + "column": 28, "line": 1, }, "start": Object { - "column": 9, + "column": 17, "line": 1, }, }, - "name": "constructor", "range": Array [ - 9, - 20, + 17, + 28, ], - "type": "Identifier", + "raw": "\\"prototype\\"", + "type": "Literal", + "value": "prototype", }, - "kind": "constructor", + "kind": "method", "loc": Object { "end": Object { - "column": 32, + "column": 33, "line": 1, }, "start": Object { @@ -23339,9 +23577,9 @@ Object { }, "range": Array [ 9, - 32, + 33, ], - "static": false, + "static": true, "type": "MethodDefinition", "value": Object { "async": false, @@ -23349,17 +23587,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 32, + "column": 33, "line": 1, }, "start": Object { - "column": 30, + "column": 31, "line": 1, }, }, "range": Array [ - 30, - 32, + 31, + 33, ], "type": "BlockStatement", }, @@ -23368,55 +23606,18 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 32, + "column": 33, "line": 1, }, "start": Object { - "column": 20, + "column": 29, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "foo", - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - }, - ], + "params": Array [], "range": Array [ - 20, - 32, + 29, + 33, ], "type": "FunctionExpression", }, @@ -23424,7 +23625,7 @@ Object { ], "loc": Object { "end": Object { - "column": 33, + "column": 34, "line": 1, }, "start": Object { @@ -23434,7 +23635,7 @@ Object { }, "range": Array [ 8, - 33, + 34, ], "type": "ClassBody", }, @@ -23458,7 +23659,7 @@ Object { }, "loc": Object { "end": Object { - "column": 33, + "column": 34, "line": 1, }, "start": Object { @@ -23468,16 +23669,33 @@ Object { }, "range": Array [ 0, - 33, + 34, ], "superClass": null, "type": "ClassDeclaration", }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "EmptyStatement", + }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 35, + "line": 1, }, "start": Object { "column": 0, @@ -23486,7 +23704,7 @@ Object { }, "range": Array [ 0, - 34, + 35, ], "sourceType": "script", "tokens": Array [ @@ -23547,7 +23765,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 15, "line": 1, }, "start": Object { @@ -23557,97 +23775,97 @@ Object { }, "range": Array [ 9, - 20, + 15, ], - "type": "Identifier", - "value": "constructor", + "type": "Keyword", + "value": "static", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 17, "line": 1, }, "start": Object { - "column": 20, + "column": 16, "line": 1, }, }, "range": Array [ - 20, - 21, + 16, + 17, ], "type": "Punctuator", - "value": "(", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 28, "line": 1, }, "start": Object { - "column": 21, + "column": 17, "line": 1, }, }, "range": Array [ - 21, - 24, + 17, + 28, ], - "type": "Identifier", - "value": "foo", + "type": "String", + "value": "\\"prototype\\"", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 29, "line": 1, }, "start": Object { - "column": 24, + "column": 28, "line": 1, }, }, "range": Array [ - 24, - 25, + 28, + 29, ], "type": "Punctuator", - "value": ",", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 30, "line": 1, }, "start": Object { - "column": 26, + "column": 29, "line": 1, }, }, "range": Array [ - 26, 29, + 30, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 31, "line": 1, }, "start": Object { - "column": 29, + "column": 30, "line": 1, }, }, "range": Array [ - 29, 30, + 31, ], "type": "Punctuator", "value": ")", @@ -23655,17 +23873,17 @@ Object { 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": "{", @@ -23673,17 +23891,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 32, + "column": 33, "line": 1, }, "start": Object { - "column": 31, + "column": 32, "line": 1, }, }, "range": Array [ - 31, 32, + 33, ], "type": "Punctuator", "value": "}", @@ -23691,27 +23909,45 @@ Object { Object { "loc": Object { "end": Object { - "column": 33, + "column": 34, "line": 1, }, "start": Object { - "column": 32, + "column": 33, "line": 1, }, }, "range": Array [ - 32, 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[`javascript fixtures/classes/class-with-constructor-with-space.src 1`] = ` +exports[`javascript fixtures/classes/class-static-method-named-static.src 1`] = ` Object { "body": Array [ Object { @@ -23722,25 +23958,25 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 20, + "column": 22, "line": 1, }, "start": Object { - "column": 9, + "column": 16, "line": 1, }, }, - "name": "constructor", + "name": "static", "range": Array [ - 9, - 20, + 16, + 22, ], "type": "Identifier", }, - "kind": "constructor", + "kind": "method", "loc": Object { "end": Object { - "column": 25, + "column": 26, "line": 1, }, "start": Object { @@ -23750,9 +23986,9 @@ Object { }, "range": Array [ 9, - 25, + 26, ], - "static": false, + "static": true, "type": "MethodDefinition", "value": Object { "async": false, @@ -23760,17 +23996,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 25, + "column": 26, "line": 1, }, "start": Object { - "column": 23, + "column": 24, "line": 1, }, }, "range": Array [ - 23, - 25, + 24, + 26, ], "type": "BlockStatement", }, @@ -23779,18 +24015,18 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 25, + "column": 26, "line": 1, }, "start": Object { - "column": 21, + "column": 22, "line": 1, }, }, "params": Array [], "range": Array [ - 21, - 25, + 22, + 26, ], "type": "FunctionExpression", }, @@ -23798,7 +24034,7 @@ Object { ], "loc": Object { "end": Object { - "column": 26, + "column": 28, "line": 1, }, "start": Object { @@ -23808,7 +24044,7 @@ Object { }, "range": Array [ 8, - 26, + 28, ], "type": "ClassBody", }, @@ -23832,7 +24068,7 @@ Object { }, "loc": Object { "end": Object { - "column": 26, + "column": 28, "line": 1, }, "start": Object { @@ -23842,7 +24078,7 @@ Object { }, "range": Array [ 0, - 26, + 28, ], "superClass": null, "type": "ClassDeclaration", @@ -23850,25 +24086,25 @@ Object { Object { "loc": Object { "end": Object { - "column": 27, + "column": 29, "line": 1, }, "start": Object { - "column": 26, + "column": 28, "line": 1, }, }, "range": Array [ - 26, - 27, + 28, + 29, ], "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { "column": 0, @@ -23877,7 +24113,7 @@ Object { }, "range": Array [ 0, - 28, + 29, ], "sourceType": "script", "tokens": Array [ @@ -23938,7 +24174,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 15, "line": 1, }, "start": Object { @@ -23948,10 +24184,10 @@ Object { }, "range": Array [ 9, - 20, + 15, ], - "type": "Identifier", - "value": "constructor", + "type": "Keyword", + "value": "static", }, Object { "loc": Object { @@ -23960,16 +24196,16 @@ Object { "line": 1, }, "start": Object { - "column": 21, + "column": 16, "line": 1, }, }, "range": Array [ - 21, + 16, 22, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "static", }, Object { "loc": Object { @@ -23987,7 +24223,7 @@ Object { 23, ], "type": "Punctuator", - "value": ")", + "value": "(", }, Object { "loc": Object { @@ -24005,7 +24241,7 @@ Object { 24, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { @@ -24023,7 +24259,7 @@ Object { 25, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { @@ -24061,128 +24297,344 @@ Object { "type": "Punctuator", "value": ";", }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ";", + }, ], "type": "Program", } `; -exports[`javascript fixtures/classes/derived-class-assign-to-var.src 1`] = ` +exports[`javascript fixtures/classes/class-static-methods-and-accessor-properties.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": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "kind": "method", "loc": Object { "end": Object { - "column": 5, + "column": 21, "line": 1, }, "start": Object { - "column": 4, + "column": 9, "line": 1, }, }, - "name": "x", "range": Array [ - 4, - 5, + 9, + 21, ], - "type": "Identifier", - }, - "init": Object { - "body": Object { - "body": Array [], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 21, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 27, + "column": 21, "line": 1, }, "start": Object { - "column": 25, + "column": 17, "line": 1, }, }, + "params": Array [], "range": Array [ - 25, - 27, + 17, + 21, ], - "type": "ClassBody", + "type": "FunctionExpression", }, - "id": Object { + }, + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 15, + "column": 34, "line": 1, }, "start": Object { - "column": 14, + "column": 33, "line": 1, }, }, - "name": "A", + "name": "a", "range": Array [ - 14, - 15, + 33, + 34, ], "type": "Identifier", }, + "kind": "get", "loc": Object { "end": Object { - "column": 27, + "column": 38, "line": 1, }, "start": Object { - "column": 8, + "column": 22, "line": 1, }, }, "range": Array [ - 8, - 27, + 22, + 38, ], - "superClass": Object { + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 38, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 25, + "column": 38, "line": 1, }, "start": Object { - "column": 24, + "column": 34, "line": 1, }, }, + "params": Array [], "range": Array [ - 24, - 25, + 34, + 38, ], - "raw": "0", - "type": "Literal", - "value": 0, + "type": "FunctionExpression", }, - "type": "ClassExpression", }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 51, + "line": 1, + }, + "start": Object { + "column": 50, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 50, + 51, + ], + "type": "Identifier", }, - "start": Object { - "column": 4, - "line": 1, + "kind": "set", + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 56, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 54, + "line": 1, + }, + }, + "range": Array [ + 54, + 56, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 51, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 1, + }, + "start": Object { + "column": 52, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 52, + 53, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 51, + 56, + ], + "type": "FunctionExpression", }, }, - "range": Array [ - 4, - 27, - ], - "type": "VariableDeclarator", + ], + "loc": Object { + "end": Object { + "column": 58, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, - ], - "kind": "var", + "range": Array [ + 8, + 58, + ], + "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": 28, + "column": 58, "line": 1, }, "start": Object { @@ -24192,45 +24644,45 @@ Object { }, "range": Array [ 0, - 28, + 58, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "superClass": null, + "type": "ClassDeclaration", }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 59, "line": 1, }, "start": Object { - "column": 0, + "column": 58, "line": 1, }, }, "range": Array [ - 0, - 3, + 58, + 59, ], - "type": "Keyword", - "value": "var", + "type": "EmptyStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 59, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 59, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { @@ -24238,16 +24690,16 @@ Object { "line": 1, }, "start": Object { - "column": 4, + "column": 0, "line": 1, }, }, "range": Array [ - 4, + 0, 5, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { @@ -24264,13 +24716,13 @@ Object { 6, 7, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 9, "line": 1, }, "start": Object { @@ -24280,10 +24732,10 @@ Object { }, "range": Array [ 8, - 13, + 9, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -24292,21 +24744,21 @@ Object { "line": 1, }, "start": Object { - "column": 14, + "column": 9, "line": 1, }, }, "range": Array [ - 14, + 9, 15, ], - "type": "Identifier", - "value": "A", + "type": "Keyword", + "value": "static", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 17, "line": 1, }, "start": Object { @@ -24316,266 +24768,187 @@ Object { }, "range": Array [ 16, - 23, + 17, ], - "type": "Keyword", - "value": "extends", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 18, "line": 1, }, "start": Object { - "column": 24, + "column": 17, "line": 1, }, }, "range": Array [ - 24, - 25, + 17, + 18, ], - "type": "Numeric", - "value": "0", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 19, "line": 1, }, "start": Object { - "column": 25, + "column": 18, "line": 1, }, }, "range": Array [ - 25, - 26, + 18, + 19, ], "type": "Punctuator", - "value": "{", + "value": ")", }, 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": "{", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 21, "line": 1, }, "start": Object { - "column": 27, + "column": 20, "line": 1, }, }, "range": Array [ - 27, - 28, + 20, + 21, ], "type": "Punctuator", - "value": ";", + "value": "}", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/classes/derived-class-expression.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "type": "ClassBody", - }, - "id": null, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 18, - ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "type": "ClassExpression", - }, "loc": Object { "end": Object { - "column": 20, + "column": 28, "line": 1, }, "start": Object { - "column": 0, + "column": 22, "line": 1, }, }, "range": Array [ - 0, - 20, + 22, + 28, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Keyword", + "value": "static", }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 32, "line": 1, }, "start": Object { - "column": 0, + "column": 29, "line": 1, }, }, "range": Array [ - 0, - 1, + 29, + 32, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 34, "line": 1, }, "start": Object { - "column": 1, + "column": 33, "line": 1, }, }, "range": Array [ - 1, - 6, + 33, + 34, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 35, "line": 1, }, "start": Object { - "column": 7, + "column": 34, "line": 1, }, }, "range": Array [ - 7, - 14, + 34, + 35, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 36, "line": 1, }, "start": Object { - "column": 15, + "column": 35, "line": 1, }, }, "range": Array [ - 15, - 16, + 35, + 36, ], - "type": "Numeric", - "value": "0", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 37, "line": 1, }, "start": Object { - "column": 16, + "column": 36, "line": 1, }, }, "range": Array [ - 16, - 17, + 36, + 37, ], "type": "Punctuator", "value": "{", @@ -24583,17 +24956,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 38, "line": 1, }, "start": Object { - "column": 17, + "column": 37, "line": 1, }, }, "range": Array [ - 17, - 18, + 37, + 38, ], "type": "Punctuator", "value": "}", @@ -24601,185 +24974,125 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 45, "line": 1, }, "start": Object { - "column": 18, + "column": 39, "line": 1, }, }, "range": Array [ - 18, - 19, + 39, + 45, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "static", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 49, "line": 1, }, "start": Object { - "column": 19, + "column": 46, "line": 1, }, }, "range": Array [ - 19, - 20, + 46, + 49, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "set", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/classes/empty-class.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 10, - ], - "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": 10, + "column": 51, "line": 1, }, "start": Object { - "column": 0, + "column": 50, "line": 1, }, }, "range": Array [ - 0, - 10, + 50, + 51, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 52, "line": 1, }, "start": Object { - "column": 10, + "column": 51, "line": 1, }, }, "range": Array [ - 10, - 11, + 51, + 52, ], - "type": "EmptyStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "(", }, - }, - "range": Array [ - 0, - 11, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 53, "line": 1, }, "start": Object { - "column": 0, + "column": 52, "line": 1, }, }, "range": Array [ - 0, - 5, + 52, + 53, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 54, "line": 1, }, "start": Object { - "column": 6, + "column": 53, "line": 1, }, }, "range": Array [ - 6, - 7, + 53, + 54, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 55, "line": 1, }, "start": Object { - "column": 8, + "column": 54, "line": 1, }, }, "range": Array [ - 8, - 9, + 54, + 55, ], "type": "Punctuator", "value": "{", @@ -24787,17 +25100,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 56, "line": 1, }, "start": Object { - "column": 9, + "column": 55, "line": 1, }, }, "range": Array [ - 9, - 10, + 55, + 56, ], "type": "Punctuator", "value": "}", @@ -24805,221 +25118,210 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 58, "line": 1, }, "start": Object { - "column": 10, + "column": 57, "line": 1, }, }, "range": Array [ - 10, - 11, + 57, + 58, ], "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/classes/empty-class-double-semi.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 10, - ], - "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": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 10, - ], - "superClass": null, - "type": "ClassDeclaration", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 59, "line": 1, }, "start": Object { - "column": 10, + "column": 58, "line": 1, }, }, "range": Array [ - 10, - 11, + 58, + 59, ], - "type": "EmptyStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ";", + "type": "Punctuator", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/classes/empty-class-semi.src 1`] = ` +exports[`javascript fixtures/classes/class-two-computed-static-methods.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [], + "body": Array [ + Object { + "computed": true, + "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": "method", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 22, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 18, + 22, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 31, + 32, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 37, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 37, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 33, + 37, + ], + "type": "FunctionExpression", + }, + }, + ], "loc": Object { "end": Object { - "column": 11, + "column": 38, "line": 1, }, "start": Object { @@ -25029,7 +25331,7 @@ Object { }, "range": Array [ 8, - 11, + 38, ], "type": "ClassBody", }, @@ -25053,7 +25355,7 @@ Object { }, "loc": Object { "end": Object { - "column": 11, + "column": 38, "line": 1, }, "start": Object { @@ -25063,7 +25365,7 @@ Object { }, "range": Array [ 0, - 11, + 38, ], "superClass": null, "type": "ClassDeclaration", @@ -25071,24 +25373,24 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 39, "line": 1, }, "start": Object { - "column": 11, + "column": 38, "line": 1, }, }, "range": Array [ - 11, - 12, + 38, + 39, ], "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 12, + "column": 39, "line": 1, }, "start": Object { @@ -25098,7 +25400,7 @@ Object { }, "range": Array [ 0, - 12, + 39, ], "sourceType": "script", "tokens": Array [ @@ -25159,7 +25461,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 1, }, "start": Object { @@ -25169,126 +25471,100 @@ Object { }, "range": Array [ 9, - 10, + 15, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "static", }, 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": "}", + "value": "[", }, 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": "Identifier", + "value": "a", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/classes/empty-literal-derived-class.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, }, - "range": Array [ - 18, - 20, - ], - "type": "ClassBody", }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "(", + }, + Object { "loc": Object { "end": Object { "column": 20, "line": 1, }, "start": Object { - "column": 0, + "column": 19, "line": 1, }, }, "range": Array [ - 0, + 19, 20, ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "type": "ClassDeclaration", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { @@ -25305,280 +25581,203 @@ Object { 20, 21, ], - "type": "EmptyStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "{", }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 22, "line": 1, }, "start": Object { - "column": 0, + "column": 21, "line": 1, }, }, "range": Array [ - 0, - 5, + 21, + 22, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 23, "line": 1, }, "start": Object { - "column": 6, + "column": 22, "line": 1, }, }, "range": Array [ - 6, - 7, + 22, + 23, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 30, "line": 1, }, "start": Object { - "column": 8, + "column": 24, "line": 1, }, }, "range": Array [ - 8, - 15, + 24, + 30, ], "type": "Keyword", - "value": "extends", + "value": "static", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 31, "line": 1, }, "start": Object { - "column": 16, + "column": 30, "line": 1, }, }, "range": Array [ - 16, - 17, + 30, + 31, ], - "type": "Numeric", - "value": "0", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 32, "line": 1, }, "start": Object { - "column": 18, + "column": 31, "line": 1, }, }, "range": Array [ - 18, - 19, + 31, + 32, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 33, "line": 1, }, "start": Object { - "column": 19, + "column": 32, "line": 1, }, }, "range": Array [ - 19, - 20, + 32, + 33, ], "type": "Punctuator", - "value": "}", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 34, "line": 1, }, "start": Object { - "column": 20, + "column": 33, "line": 1, }, }, "range": Array [ - 20, - 21, + 33, + 34, ], "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/classes/invalid-class-declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "type": "ClassBody", - }, - "id": null, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "superClass": null, - "type": "ClassDeclaration", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 35, "line": 1, }, "start": Object { - "column": 8, + "column": 34, "line": 1, }, }, "range": Array [ - 8, - 9, + 34, + 35, ], - "type": "EmptyStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ")", }, - }, - "range": Array [ - 0, - 10, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 36, "line": 1, }, "start": Object { - "column": 0, + "column": 35, "line": 1, }, }, "range": Array [ - 0, - 5, + 35, + 36, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 37, "line": 1, }, "start": Object { - "column": 6, + "column": 36, "line": 1, }, }, "range": Array [ - 6, - 7, + 36, + 37, ], "type": "Punctuator", - "value": "{", + "value": "}", }, 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": "}", @@ -25586,17 +25785,17 @@ Object { 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": ";", @@ -25606,7 +25805,7 @@ Object { } `; -exports[`javascript fixtures/classes/invalid-class-setter-declaration.src 1`] = ` +exports[`javascript fixtures/classes/class-two-methods.src 1`] = ` Object { "body": Array [ Object { @@ -25617,7 +25816,85 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 17, + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 14, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 14, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 10, + 14, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, "line": 1, }, "start": Object { @@ -25625,27 +25902,27 @@ Object { "line": 1, }, }, - "name": "foo", + "name": "b", "range": Array [ 14, - 17, + 15, ], "type": "Identifier", }, - "kind": "set", + "kind": "method", "loc": Object { "end": Object { - "column": 22, + "column": 19, "line": 1, }, "start": Object { - "column": 10, + "column": 14, "line": 1, }, }, "range": Array [ - 10, - 22, + 14, + 19, ], "static": false, "type": "MethodDefinition", @@ -25655,17 +25932,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 22, + "column": 19, "line": 1, }, "start": Object { - "column": 20, + "column": 17, "line": 1, }, }, "range": Array [ - 20, - 22, + 17, + 19, ], "type": "BlockStatement", }, @@ -25674,18 +25951,18 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 22, + "column": 19, "line": 1, }, "start": Object { - "column": 17, + "column": 15, "line": 1, }, }, "params": Array [], "range": Array [ - 17, - 22, + 15, + 19, ], "type": "FunctionExpression", }, @@ -25693,7 +25970,7 @@ Object { ], "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 1, }, "start": Object { @@ -25703,7 +25980,7 @@ Object { }, "range": Array [ 8, - 23, + 20, ], "type": "ClassBody", }, @@ -25727,7 +26004,7 @@ Object { }, "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 1, }, "start": Object { @@ -25737,7 +26014,7 @@ Object { }, "range": Array [ 0, - 23, + 20, ], "superClass": null, "type": "ClassDeclaration", @@ -25745,25 +26022,25 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, + "column": 21, "line": 1, }, "start": Object { - "column": 23, + "column": 20, "line": 1, }, }, "range": Array [ - 23, - 24, + 20, + 21, ], "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { "column": 0, @@ -25772,7 +26049,7 @@ Object { }, "range": Array [ 0, - 25, + 21, ], "sourceType": "script", "tokens": Array [ @@ -25833,53 +26110,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { "column": 10, "line": 1, }, - }, - "range": Array [ - 10, - 13, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, "start": Object { - "column": 14, + "column": 9, "line": 1, }, }, "range": Array [ - 14, - 17, + 9, + 10, ], "type": "Identifier", - "value": "foo", + "value": "a", }, 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": "(", @@ -25887,17 +26146,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": ")", @@ -25905,17 +26164,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 13, "line": 1, }, "start": Object { - "column": 20, + "column": 12, "line": 1, }, }, "range": Array [ - 20, - 21, + 12, + 13, ], "type": "Punctuator", "value": "{", @@ -25923,35 +26182,17 @@ Object { 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, + "column": 14, "line": 1, }, "start": Object { - "column": 22, + "column": 13, "line": 1, }, }, "range": Array [ - 22, - 23, + 13, + 14, ], "type": "Punctuator", "value": "}", @@ -25959,133 +26200,35 @@ Object { 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/classes/invalid-class-two-super-classes.src 1`] = `"Classes can only extend a single class."`; - -exports[`javascript fixtures/classes/named-class-expression.src 1`] = ` -Object { - "body": Array [ - Object { - "expression": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "ClassBody", - }, - "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": 11, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 11, - ], - "superClass": null, - "type": "ClassExpression", - }, - "loc": Object { - "end": Object { - "column": 13, + "column": 15, "line": 1, }, "start": Object { - "column": 0, + "column": 14, "line": 1, }, }, "range": Array [ - 0, - 13, + 14, + 15, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "b", }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 16, "line": 1, }, "start": Object { - "column": 0, + "column": 15, "line": 1, }, }, "range": Array [ - 0, - 1, + 15, + 16, ], "type": "Punctuator", "value": "(", @@ -26093,53 +26236,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 6, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, + "column": 17, "line": 1, }, "start": Object { - "column": 7, + "column": 16, "line": 1, }, }, "range": Array [ - 7, - 8, + 16, + 17, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 18, "line": 1, }, "start": Object { - "column": 9, + "column": 17, "line": 1, }, }, "range": Array [ - 9, - 10, + 17, + 18, ], "type": "Punctuator", "value": "{", @@ -26147,17 +26272,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 19, "line": 1, }, "start": Object { - "column": 10, + "column": 18, "line": 1, }, }, "range": Array [ - 10, - 11, + 18, + 19, ], "type": "Punctuator", "value": "}", @@ -26165,35 +26290,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 20, "line": 1, }, "start": Object { - "column": 11, + "column": 19, "line": 1, }, }, "range": Array [ - 11, - 12, + 19, + 20, ], "type": "Punctuator", - "value": ")", + "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": ";", @@ -26203,85 +26328,208 @@ Object { } `; -exports[`javascript fixtures/classes/named-derived-class-expression.src 1`] = ` +exports[`javascript fixtures/classes/class-two-methods-computed-constructor.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 22, + ], + "raw": "\\"constructor\\"", + "type": "Literal", + "value": "constructor", }, - "start": Object { - "column": 7, - "line": 1, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 26, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 26, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 22, + 26, + ], + "type": "FunctionExpression", }, }, - "name": "A", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 41, + ], + "raw": "\\"constructor\\"", + "type": "Literal", + "value": "constructor", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 46, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 46, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 42, + 46, + ], + "type": "FunctionExpression", + }, + }, + ], "loc": Object { "end": Object { - "column": 20, + "column": 47, "line": 1, }, "start": Object { - "column": 1, + "column": 8, "line": 1, }, }, "range": Array [ - 1, - 20, + 8, + 47, ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, }, - "range": Array [ - 17, - 18, - ], - "raw": "0", - "type": "Literal", - "value": 0, }, - "type": "ClassExpression", + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 22, + "column": 47, "line": 1, }, "start": Object { @@ -26291,14 +26539,32 @@ Object { }, "range": Array [ 0, - 22, + 47, ], - "type": "ExpressionStatement", + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 22, + "column": 48, "line": 1, }, "start": Object { @@ -26308,14 +26574,14 @@ Object { }, "range": Array [ 0, - 22, + 48, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 5, "line": 1, }, "start": Object { @@ -26325,51 +26591,51 @@ Object { }, "range": Array [ 0, - 1, + 5, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 7, "line": 1, }, "start": Object { - "column": 1, + "column": 6, "line": 1, }, }, "range": Array [ - 1, 6, + 7, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "A", }, 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": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 22, "line": 1, }, "start": Object { @@ -26379,43 +26645,61 @@ Object { }, "range": Array [ 9, - 16, + 22, ], - "type": "Keyword", - "value": "extends", + "type": "String", + "value": "\\"constructor\\"", }, 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": "Numeric", - "value": "0", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 24, "line": 1, }, "start": Object { - "column": 18, + "column": 23, "line": 1, }, }, "range": Array [ - 18, - 19, + 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": "{", @@ -26423,17 +26707,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 26, "line": 1, }, "start": Object { - "column": 19, + "column": 25, "line": 1, }, }, "range": Array [ - 19, - 20, + 25, + 26, ], "type": "Punctuator", "value": "}", @@ -26441,17 +26725,89 @@ Object { 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": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 41, + ], + "type": "String", + "value": "\\"constructor\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "range": Array [ + 43, + 44, ], "type": "Punctuator", "value": ")", @@ -26459,17 +26815,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 45, "line": 1, }, "start": Object { - "column": 21, + "column": 44, "line": 1, }, }, "range": Array [ - 21, - 22, + 44, + 45, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 48, ], "type": "Punctuator", "value": ";", @@ -26479,7 +26889,7 @@ Object { } `; -exports[`javascript fixtures/defaultParams/class-constructor.src 1`] = ` +exports[`javascript fixtures/classes/class-two-methods-semi.src 1`] = ` Object { "body": Array [ Object { @@ -26490,35 +26900,35 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 1, }, }, - "name": "constructor", + "name": "a", "range": Array [ - 14, - 25, + 9, + 10, ], "type": "Identifier", }, - "kind": "constructor", + "kind": "method", "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ + 9, 14, - 44, ], "static": false, "type": "MethodDefinition", @@ -26528,17 +26938,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 27, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 37, - 44, + 12, + 14, ], "type": "BlockStatement", }, @@ -26547,73 +26957,96 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 10, + "line": 1, }, }, - "params": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, + "params": Array [], + "range": Array [ + 10, + 14, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 20, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, }, - "range": Array [ - 26, - 35, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 35, - ], - "raw": "'bar'", - "type": "Literal", - "value": "bar", + "start": Object { + "column": 18, + "line": 1, }, - "type": "AssignmentPattern", }, - ], + "range": Array [ + 18, + 20, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "params": Array [], "range": Array [ - 25, - 44, + 16, + 20, ], "type": "FunctionExpression", }, @@ -26621,8 +27054,8 @@ Object { ], "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 21, + "line": 1, }, "start": Object { "column": 8, @@ -26631,7 +27064,7 @@ Object { }, "range": Array [ 8, - 46, + 21, ], "type": "ClassBody", }, @@ -26655,8 +27088,8 @@ Object { }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 21, + "line": 1, }, "start": Object { "column": 0, @@ -26665,16 +27098,33 @@ Object { }, "range": Array [ 0, - 46, + 21, ], "superClass": null, "type": "ClassDeclaration", }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "EmptyStatement", + }, ], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 22, + "line": 1, }, "start": Object { "column": 0, @@ -26683,7 +27133,7 @@ Object { }, "range": Array [ 0, - 47, + 22, ], "sourceType": "script", "tokens": Array [ @@ -26744,35 +27194,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 14, - 25, + 9, + 10, ], "type": "Identifier", - "value": "constructor", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 25, - 26, + 10, + 11, ], "type": "Punctuator", "value": "(", @@ -26780,71 +27230,125 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 26, - 29, + 11, + 12, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 29, - 30, + 12, + 13, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 30, - 35, + 13, + 14, ], - "type": "String", - "value": "'bar'", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 35, - 36, + 14, + 15, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, ], "type": "Punctuator", "value": ")", @@ -26852,17 +27356,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 27, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 37, - 38, + 18, + 19, ], "type": "Punctuator", "value": "{", @@ -26870,17 +27374,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 19, + "line": 1, }, }, "range": Array [ - 43, - 44, + 19, + 20, ], "type": "Punctuator", "value": "}", @@ -26888,27 +27392,45 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 21, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 20, + "line": 1, }, }, "range": Array [ - 45, - 46, + 20, + 21, ], "type": "Punctuator", "value": "}", }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ";", + }, ], "type": "Program", } `; -exports[`javascript fixtures/defaultParams/class-method.src 1`] = ` +exports[`javascript fixtures/classes/class-two-methods-three-semi.src 1`] = ` Object { "body": Array [ Object { @@ -26919,35 +27441,35 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, }, }, - "name": "foo", + "name": "a", "range": Array [ - 14, - 17, + 10, + 11, ], "type": "Identifier", }, "kind": "method", "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 14, - 36, + 10, + 15, ], "static": false, "type": "MethodDefinition", @@ -26957,17 +27479,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 29, - 36, + 13, + 15, ], "type": "BlockStatement", }, @@ -26976,134 +27498,174 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 11, + "line": 1, }, }, - "params": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 18, - 21, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 18, - 27, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 27, - ], - "raw": "'baz'", - "type": "Literal", - "value": "baz", - }, - "type": "AssignmentPattern", - }, - ], + "params": Array [], "range": Array [ - 17, - 36, + 11, + 15, ], "type": "FunctionExpression", }, }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 38, - ], - "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": 4, - }, - "start": Object { + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 21, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 21, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 17, + 21, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 23, + ], + "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": 23, + "line": 1, + }, + "start": Object { "column": 0, "line": 1, }, }, "range": Array [ 0, - 38, + 23, ], "superClass": null, "type": "ClassDeclaration", }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "EmptyStatement", + }, ], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 24, + "line": 1, }, "start": Object { "column": 0, @@ -27112,7 +27674,7 @@ Object { }, "range": Array [ 0, - 39, + 24, ], "sourceType": "script", "tokens": Array [ @@ -27173,107 +27735,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 17, - 18, + 9, + 10, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 2, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 18, - 21, + 10, + 11, ], "type": "Identifier", - "value": "bar", + "value": "a", }, Object { "loc": Object { "end": Object { "column": 12, - "line": 2, + "line": 1, }, "start": Object { "column": 11, - "line": 2, + "line": 1, }, }, "range": Array [ - 21, - 22, + 11, + 12, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 27, - ], - "type": "String", - "value": "'baz'", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, + "line": 1, }, }, "range": Array [ - 27, - 28, + 12, + 13, ], "type": "Punctuator", "value": ")", @@ -27281,17 +27807,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 29, - 30, + 13, + 14, ], "type": "Punctuator", "value": "{", @@ -27299,226 +27825,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 4, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/defaultParams/declaration.src 1`] = ` -Object { - "body": Array [ - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 20, - ], - "type": "BlockStatement", - }, - "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": 20, + "column": 15, "line": 1, }, "start": Object { - "column": 0, + "column": 14, "line": 1, }, }, - "params": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 16, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "AssignmentPattern", - }, - ], "range": Array [ - 0, - 20, + 14, + 15, ], - "type": "FunctionDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "}", }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 16, "line": 1, }, "start": Object { - "column": 0, + "column": 15, "line": 1, }, }, "range": Array [ - 0, - 8, + 15, + 16, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 17, "line": 1, }, "start": Object { - "column": 9, + "column": 16, "line": 1, }, }, "range": Array [ - 9, - 10, + 16, + 17, ], "type": "Identifier", - "value": "f", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 18, "line": 1, }, "start": Object { - "column": 10, + "column": 17, "line": 1, }, }, "range": Array [ - 10, - 11, + 17, + 18, ], "type": "Punctuator", "value": "(", @@ -27526,250 +27897,312 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 19, "line": 1, }, "start": Object { - "column": 11, + "column": 18, "line": 1, }, }, "range": Array [ - 11, - 12, + 18, + 19, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 20, "line": 1, }, "start": Object { - "column": 13, + "column": 19, "line": 1, }, }, "range": Array [ - 13, - 14, + 19, + 20, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 21, "line": 1, }, "start": Object { - "column": 15, + "column": 20, "line": 1, }, }, "range": Array [ - 15, - 16, + 20, + 21, ], - "type": "Numeric", - "value": "1", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 22, "line": 1, }, "start": Object { - "column": 16, + "column": 21, "line": 1, }, }, "range": Array [ - 16, - 17, + 21, + 22, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 23, "line": 1, }, "start": Object { - "column": 18, + "column": 22, "line": 1, }, }, "range": Array [ - 18, - 19, + 22, + 23, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 24, "line": 1, }, "start": Object { - "column": 19, + "column": 23, "line": 1, }, }, "range": Array [ - 19, - 20, + 23, + 24, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/defaultParams/expression.src 1`] = ` +exports[`javascript fixtures/classes/class-two-methods-two-semi.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": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 22, - ], - "right": Object { - "async": false, - "body": Object { - "body": Array [], + "body": Object { + "body": 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": "method", "loc": Object { "end": Object { - "column": 22, + "column": 14, "line": 1, }, "start": Object { - "column": 20, + "column": 9, "line": 1, }, }, "range": Array [ - 20, - 22, + 9, + 14, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "params": Array [ - Object { - "left": Object { + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { "column": 14, "line": 1, }, "start": Object { - "column": 13, + "column": 12, "line": 1, }, }, - "name": "y", "range": Array [ - 13, + 12, 14, ], - "type": "Identifier", + "type": "BlockStatement", }, + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 18, + "column": 14, "line": 1, }, "start": Object { - "column": 13, + "column": 10, "line": 1, }, }, + "params": Array [], "range": Array [ - 13, - 18, + 10, + 14, ], - "right": Object { + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 20, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 18, + "column": 20, "line": 1, }, "start": Object { - "column": 17, + "column": 18, "line": 1, }, }, "range": Array [ - 17, 18, + 20, ], - "raw": "1", - "type": "Literal", - "value": 1, + "type": "BlockStatement", }, - "type": "AssignmentPattern", + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 16, + 20, + ], + "type": "FunctionExpression", }, - ], - "range": Array [ - 4, - 22, - ], - "type": "FunctionExpression", + }, + ], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, - "type": "AssignmentExpression", + "range": Array [ + 8, + 22, + ], + "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 { @@ -27785,12 +28218,30 @@ Object { 0, 22, ], - "type": "ExpressionStatement", + "superClass": null, + "type": "ClassDeclaration", + }, + 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": 22, + "column": 23, "line": 1, }, "start": Object { @@ -27800,14 +28251,14 @@ Object { }, "range": Array [ 0, - 22, + 23, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 5, "line": 1, }, "start": Object { @@ -27817,28 +28268,82 @@ Object { }, "range": Array [ 0, - 1, + 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", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 9, "line": 1, }, "start": Object { - "column": 2, + "column": 8, "line": 1, }, }, "range": Array [ - 2, - 3, + 8, + 9, ], "type": "Punctuator", - "value": "=", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -27847,16 +28352,16 @@ Object { "line": 1, }, "start": Object { - "column": 4, + "column": 11, "line": 1, }, }, "range": Array [ - 4, + 11, 12, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { @@ -27874,7 +28379,7 @@ Object { 13, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { @@ -27891,8 +28396,26 @@ Object { 13, 14, ], - "type": "Identifier", - "value": "y", + "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 { @@ -27909,8 +28432,26 @@ Object { 15, 16, ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { @@ -27927,8 +28468,8 @@ Object { 17, 18, ], - "type": "Numeric", - "value": "1", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { @@ -27946,7 +28487,25 @@ Object { 19, ], "type": "Punctuator", - "value": ")", + "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 { @@ -27964,7 +28523,7 @@ Object { 21, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { @@ -27984,207 +28543,229 @@ Object { "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/defaultParams/method.src 1`] = ` +exports[`javascript fixtures/classes/class-two-static-methods-named-constructor.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": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 27, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "constructor", + "range": Array [ + 16, + 27, + ], + "type": "Identifier", }, - "start": Object { - "column": 4, - "line": 1, + "kind": "method", + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { + "range": Array [ + 9, + 31, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 7, + "column": 31, "line": 1, }, "start": Object { - "column": 6, + "column": 29, "line": 1, }, }, - "name": "f", "range": Array [ - 6, - 7, + 29, + 31, ], - "type": "Identifier", + "type": "BlockStatement", }, - "kind": "init", + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 25, + "column": 31, "line": 1, }, "start": Object { - "column": 6, + "column": 27, "line": 1, }, }, - "method": false, + "params": Array [], "range": Array [ - 6, - 25, + 27, + 31, ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "BlockStatement", + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, }, - "expression": false, - "generator": false, - "id": null, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "name": "constructor", + "range": Array [ + 39, + 50, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 54, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 54, + ], + "static": true, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 25, + "column": 54, "line": 1, }, "start": Object { - "column": 9, + "column": 52, "line": 1, }, }, - "params": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 21, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "AssignmentPattern", - }, - ], "range": Array [ - 9, - 25, + 52, + 54, ], - "type": "FunctionExpression", + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 54, + "line": 1, + }, + "start": Object { + "column": 50, + "line": 1, + }, }, + "params": Array [], + "range": Array [ + 50, + 54, + ], + "type": "FunctionExpression", }, - ], - "range": Array [ - 4, - 27, - ], - "type": "ObjectExpression", + }, + ], + "loc": Object { + "end": Object { + "column": 55, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, - "type": "AssignmentExpression", + "range": Array [ + 8, + 55, + ], + "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": 27, + "column": 55, "line": 1, }, "start": Object { @@ -28194,14 +28775,32 @@ Object { }, "range": Array [ 0, - 27, + 55, ], - "type": "ExpressionStatement", + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 55, + "line": 1, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 27, + "column": 56, "line": 1, }, "start": Object { @@ -28211,14 +28810,14 @@ Object { }, "range": Array [ 0, - 27, + 56, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 5, "line": 1, }, "start": Object { @@ -28228,43 +28827,43 @@ Object { }, "range": Array [ 0, - 1, + 5, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "class", }, 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": "=", + "type": "Identifier", + "value": "A", }, 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": "{", @@ -28272,143 +28871,179 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 15, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, "range": Array [ - 6, - 7, + 9, + 15, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 27, ], "type": "Identifier", - "value": "f", + "value": "constructor", }, 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": 17, + "column": 29, "line": 1, }, "start": Object { - "column": 9, + "column": 28, "line": 1, }, }, "range": Array [ - 9, - 17, + 28, + 29, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 30, "line": 1, }, "start": Object { - "column": 17, + "column": 29, "line": 1, }, }, "range": Array [ - 17, - 18, + 29, + 30, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 31, "line": 1, }, "start": Object { - "column": 18, + "column": 30, "line": 1, }, }, "range": Array [ - 18, - 19, + 30, + 31, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 38, "line": 1, }, "start": Object { - "column": 19, + "column": 32, "line": 1, }, }, "range": Array [ - 19, - 20, + 32, + 38, ], - "type": "Punctuator", - "value": "=", + "type": "Keyword", + "value": "static", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 50, "line": 1, }, "start": Object { - "column": 20, + "column": 39, "line": 1, }, }, "range": Array [ - 20, - 21, + 39, + 50, ], - "type": "Numeric", - "value": "1", + "type": "Identifier", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 51, "line": 1, }, "start": Object { - "column": 21, + "column": 50, "line": 1, }, }, "range": Array [ - 21, - 22, + 50, + 51, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 52, + "line": 1, + }, + "start": Object { + "column": 51, + "line": 1, + }, + }, + "range": Array [ + 51, + 52, ], "type": "Punctuator", "value": ")", @@ -28416,17 +29051,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, + "column": 53, "line": 1, }, "start": Object { - "column": 23, + "column": 52, "line": 1, }, }, "range": Array [ - 23, - 24, + 52, + 53, ], "type": "Punctuator", "value": "{", @@ -28434,17 +29069,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, + "column": 54, "line": 1, }, "start": Object { - "column": 24, + "column": 53, "line": 1, }, }, "range": Array [ - 24, - 25, + 53, + 54, ], "type": "Punctuator", "value": "}", @@ -28452,202 +29087,166 @@ Object { Object { "loc": Object { "end": Object { - "column": 27, + "column": 55, "line": 1, }, "start": Object { - "column": 26, + "column": 54, "line": 1, }, }, "range": Array [ - 26, - 27, + 54, + 55, ], "type": "Punctuator", "value": "}", }, + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 55, + "line": 1, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": ";", + }, ], "type": "Program", } `; -exports[`javascript fixtures/defaultParams/not-all-params.src 1`] = ` +exports[`javascript fixtures/classes/class-with-constructor.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 { - "async": false, - "body": Object { - "body": Array [], + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 35, + "column": 20, "line": 1, }, "start": Object { - "column": 33, + "column": 9, "line": 1, }, }, + "name": "constructor", "range": Array [ - 33, - 35, + 9, + 20, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, + "kind": "constructor", "loc": Object { "end": Object { - "column": 35, + "column": 24, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, - "params": Array [ - Object { + "range": Array [ + 9, + 24, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 20, + "column": 24, "line": 1, }, "start": Object { - "column": 19, + "column": 22, "line": 1, }, }, - "name": "a", "range": Array [ - 19, - 20, + 22, + 24, ], - "type": "Identifier", + "type": "BlockStatement", }, - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "raw": "42", - "type": "Literal", - "value": 42, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, }, - "type": "AssignmentPattern", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, + "start": Object { + "column": 20, + "line": 1, }, - "name": "c", - "range": Array [ - 30, - 31, - ], - "type": "Identifier", }, - ], - "range": Array [ - 10, - 35, - ], - "type": "FunctionExpression", - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, + "params": Array [], + "range": Array [ + 20, + 24, + ], + "type": "FunctionExpression", }, }, - "range": Array [ - 4, - 35, - ], - "type": "VariableDeclarator", + ], + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, - ], - "kind": "var", + "range": Array [ + 8, + 25, + ], + "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": 36, + "column": 25, "line": 1, }, "start": Object { @@ -28657,14 +29256,32 @@ Object { }, "range": Array [ 0, - 36, + 25, ], - "type": "VariableDeclaration", + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 36, + "column": 26, "line": 1, }, "start": Object { @@ -28674,14 +29291,14 @@ Object { }, "range": Array [ 0, - 36, + 26, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -28691,10 +29308,10 @@ Object { }, "range": Array [ 0, - 3, + 5, ], "type": "Keyword", - "value": "var", + "value": "class", }, Object { "loc": Object { @@ -28703,16 +29320,16 @@ Object { "line": 1, }, "start": Object { - "column": 4, + "column": 6, "line": 1, }, }, "range": Array [ - 4, + 6, 7, ], "type": "Identifier", - "value": "foo", + "value": "A", }, Object { "loc": Object { @@ -28730,40 +29347,40 @@ Object { 9, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 20, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, "range": Array [ - 10, - 18, + 9, + 20, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "constructor", }, 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": "(", @@ -28771,56 +29388,56 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 22, "line": 1, }, "start": Object { - "column": 19, + "column": 21, "line": 1, }, }, "range": Array [ - 19, - 20, + 21, + 22, ], - "type": "Identifier", - "value": "a", + "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": "{", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 24, "line": 1, }, "start": Object { - "column": 22, + "column": 23, "line": 1, }, }, "range": Array [ - 22, 23, + 24, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { @@ -28838,94 +29455,271 @@ Object { 25, ], "type": "Punctuator", - "value": "=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 26, "line": 1, }, "start": Object { - "column": 26, + "column": 25, "line": 1, }, }, "range": Array [ + 25, 26, - 28, ], - "type": "Numeric", - "value": "42", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/class-with-constructor-parameters.src 1`] = ` +Object { + "body": Array [ Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "constructor", + "range": Array [ + 9, + 20, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 32, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 32, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + }, + 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 [ + 20, + 32, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 33, + ], + "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": 29, + "column": 33, "line": 1, }, "start": Object { - "column": 28, + "column": 0, "line": 1, }, }, "range": Array [ - 28, - 29, + 0, + 33, ], - "type": "Punctuator", - "value": ",", + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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": 31, + "column": 5, "line": 1, }, "start": Object { - "column": 30, + "column": 0, "line": 1, }, }, "range": Array [ - 30, - 31, + 0, + 5, ], - "type": "Identifier", - "value": "c", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 7, "line": 1, }, "start": Object { - "column": 31, + "column": 6, "line": 1, }, }, "range": Array [ - 31, - 32, + 6, + 7, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 9, "line": 1, }, "start": Object { - "column": 33, + "column": 8, "line": 1, }, }, "range": Array [ - 33, - 34, + 8, + 9, ], "type": "Punctuator", "value": "{", @@ -28933,475 +29727,292 @@ Object { Object { "loc": Object { "end": Object { - "column": 35, + "column": 20, "line": 1, }, "start": Object { - "column": 34, + "column": 9, "line": 1, }, }, "range": Array [ - 34, - 35, + 9, + 20, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 21, "line": 1, }, "start": Object { - "column": 35, + "column": 20, "line": 1, }, }, "range": Array [ - 35, - 36, + 20, + 21, ], "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring/array-member.src 1`] = ` -Object { - "body": Array [ - Object { - "expression": Object { - "left": Object { - "elements": Array [ - Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "name": "ok", - "range": Array [ - 1, - 3, - ], - "type": "Identifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "v", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - }, - "range": Array [ - 1, - 5, - ], - "type": "MemberExpression", - }, - ], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "ArrayPattern", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "20", - "type": "Literal", - "value": 20, - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 12, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "[", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 24, "line": 1, }, "start": Object { - "column": 1, + "column": 21, "line": 1, }, }, "range": Array [ - 1, - 3, + 21, + 24, ], "type": "Identifier", - "value": "ok", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 25, "line": 1, }, "start": Object { - "column": 3, + "column": 24, "line": 1, }, }, "range": Array [ - 3, - 4, + 24, + 25, ], "type": "Punctuator", - "value": ".", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 29, "line": 1, }, "start": Object { - "column": 4, + "column": 26, "line": 1, }, }, "range": Array [ - 4, - 5, + 26, + 29, ], "type": "Identifier", - "value": "v", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 30, "line": 1, }, "start": Object { - "column": 5, + "column": 29, "line": 1, }, }, "range": Array [ - 5, - 6, + 29, + 30, ], "type": "Punctuator", - "value": "]", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 31, "line": 1, }, "start": Object { - "column": 7, + "column": 30, "line": 1, }, }, "range": Array [ - 7, - 8, + 30, + 31, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 32, "line": 1, }, "start": Object { - "column": 9, + "column": 31, "line": 1, }, }, "range": Array [ - 9, - 11, + 31, + 32, ], - "type": "Numeric", - "value": "20", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 33, "line": 1, }, "start": Object { - "column": 11, + "column": 32, "line": 1, }, }, "range": Array [ - 11, - 12, + 32, + 33, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/array-to-array.src 1`] = ` +exports[`javascript fixtures/classes/class-with-constructor-with-space.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "elements": Array [ - Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 2, + "column": 20, "line": 1, }, "start": Object { - "column": 1, + "column": 9, "line": 1, }, }, - "name": "a", + "name": "constructor", "range": Array [ - 1, - 2, + 9, + 20, ], "type": "Identifier", }, - Object { + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 25, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 5, + "column": 25, "line": 1, }, "start": Object { - "column": 4, + "column": 21, "line": 1, }, }, - "name": "b", + "params": Array [], "range": Array [ - 4, - 5, + 21, + 25, ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "FunctionExpression", }, }, - "range": Array [ - 0, - 6, - ], - "type": "ArrayPattern", - }, + ], "loc": Object { "end": Object { - "column": 15, + "column": 26, "line": 1, }, "start": Object { - "column": 0, + "column": 8, "line": 1, }, }, - "operator": "=", "range": Array [ - 0, - 15, + 8, + 26, ], - "right": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, }, - "range": Array [ - 9, - 15, - ], - "type": "ArrayExpression", }, - "type": "AssignmentExpression", + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 16, + "column": 26, "line": 1, }, "start": Object { @@ -29411,15 +30022,33 @@ Object { }, "range": Array [ 0, - 16, + 26, ], - "type": "ExpressionStatement", + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -29428,14 +30057,14 @@ Object { }, "range": Array [ 0, - 16, + 28, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 5, "line": 1, }, "start": Object { @@ -29445,244 +30074,188 @@ Object { }, "range": Array [ 0, - 1, + 5, ], - "type": "Punctuator", - "value": "[", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 7, "line": 1, }, "start": Object { - "column": 1, + "column": 6, "line": 1, }, }, "range": Array [ - 1, - 2, + 6, + 7, ], "type": "Identifier", - "value": "a", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 9, "line": 1, }, "start": Object { - "column": 2, + "column": 8, "line": 1, }, }, "range": Array [ - 2, - 3, + 8, + 9, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 20, "line": 1, }, "start": Object { - "column": 4, + "column": 9, "line": 1, }, }, "range": Array [ - 4, - 5, + 9, + 20, ], "type": "Identifier", - "value": "b", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 22, "line": 1, }, "start": Object { - "column": 5, + "column": 21, "line": 1, }, }, "range": Array [ - 5, - 6, + 21, + 22, ], "type": "Punctuator", - "value": "]", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 23, "line": 1, }, "start": Object { - "column": 7, + "column": 22, "line": 1, }, }, "range": Array [ - 7, - 8, + 22, + 23, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 24, "line": 1, }, "start": Object { - "column": 9, + "column": 23, "line": 1, }, }, "range": Array [ - 9, - 10, + 23, + 24, ], "type": "Punctuator", - "value": "[", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 25, "line": 1, }, "start": Object { - "column": 10, + "column": 24, "line": 1, }, }, "range": Array [ - 10, - 11, + 24, + 25, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 26, "line": 1, }, "start": Object { - "column": 11, + "column": 25, "line": 1, }, }, "range": Array [ - 11, - 12, + 25, + 26, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 27, "line": 1, }, "start": Object { - "column": 13, + "column": 26, "line": 1, }, }, "range": Array [ - 13, - 14, + 26, + 27, ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ";", + "type": "Punctuator", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/array-var-undefined.src 1`] = ` +exports[`javascript fixtures/classes/derived-class-assign-to-var.src 1`] = ` Object { "body": Array [ Object { "declarations": Array [ Object { "id": Object { - "elements": Array [ - 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": 7, + "column": 5, "line": 1, }, "start": Object { @@ -29690,33 +30263,88 @@ Object { "line": 1, }, }, + "name": "x", "range": Array [ 4, - 7, + 5, ], - "type": "ArrayPattern", + "type": "Identifier", }, "init": Object { - "elements": Array [], + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 27, + ], + "type": "ClassBody", + }, + "id": 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": 12, + "column": 27, "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, - 12, + 8, + 27, ], - "type": "ArrayExpression", + "superClass": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "type": "ClassExpression", }, "loc": Object { "end": Object { - "column": 12, + "column": 27, "line": 1, }, "start": Object { @@ -29726,7 +30354,7 @@ Object { }, "range": Array [ 4, - 12, + 27, ], "type": "VariableDeclarator", }, @@ -29734,7 +30362,7 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 13, + "column": 28, "line": 1, }, "start": Object { @@ -29744,14 +30372,14 @@ Object { }, "range": Array [ 0, - 13, + 28, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 13, + "column": 28, "line": 1, }, "start": Object { @@ -29761,7 +30389,7 @@ Object { }, "range": Array [ 0, - 13, + 28, ], "sourceType": "script", "tokens": Array [ @@ -29798,113 +30426,149 @@ Object { 4, 5, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "x", }, 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": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 13, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, ], "type": "Identifier", - "value": "a", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 23, "line": 1, }, "start": Object { - "column": 6, + "column": 16, "line": 1, }, }, "range": Array [ - 6, - 7, + 16, + 23, ], - "type": "Punctuator", - "value": "]", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 25, "line": 1, }, "start": Object { - "column": 8, + "column": 24, "line": 1, }, }, "range": Array [ - 8, - 9, + 24, + 25, ], - "type": "Punctuator", - "value": "=", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 26, "line": 1, }, "start": Object { - "column": 10, + "column": 25, "line": 1, }, }, "range": Array [ - 10, - 11, + 25, + 26, ], "type": "Punctuator", - "value": "[", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 27, "line": 1, }, "start": Object { - "column": 11, + "column": 26, "line": 1, }, }, "range": Array [ - 11, - 12, + 26, + 27, ], "type": "Punctuator", - "value": "]", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 28, "line": 1, }, "start": Object { - "column": 12, + "column": 27, "line": 1, }, }, "range": Array [ - 12, - 13, + 27, + 28, ], "type": "Punctuator", "value": ";", @@ -29914,185 +30578,69 @@ Object { } `; -exports[`javascript fixtures/destructuring/class-constructor-params-array.src 1`] = ` +exports[`javascript fixtures/classes/derived-class-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": "consturctor", - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "expression": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 18, + "line": 1, }, - "range": Array [ - 14, - 45, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 45, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 36, - ], - "type": "ArrayPattern", - }, - ], - "range": Array [ - 25, - 45, - ], - "type": "FunctionExpression", + "start": Object { + "column": 16, + "line": 1, }, }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, + "range": Array [ + 16, + 18, + ], + "type": "ClassBody", }, - "range": Array [ - 8, - 47, - ], - "type": "ClassBody", - }, - "id": Object { + "id": null, "loc": Object { "end": Object { - "column": 7, + "column": 18, "line": 1, }, "start": Object { - "column": 6, + "column": 1, "line": 1, }, }, - "name": "A", "range": Array [ - 6, - 7, + 1, + 18, ], - "type": "Identifier", + "superClass": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "type": "ClassExpression", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 20, + "line": 1, }, "start": Object { "column": 0, @@ -30101,16 +30649,15 @@ Object { }, "range": Array [ 0, - 47, + 20, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 20, + "line": 1, }, "start": Object { "column": 0, @@ -30119,14 +30666,14 @@ Object { }, "range": Array [ 0, - 48, + 20, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -30136,205 +30683,283 @@ Object { }, "range": Array [ 0, - 5, + 1, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 6, "line": 1, }, "start": Object { - "column": 6, + "column": 1, "line": 1, }, }, "range": Array [ + 1, 6, - 7, ], - "type": "Identifier", - "value": "A", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 14, "line": 1, }, "start": Object { - "column": 8, + "column": 7, "line": 1, }, }, "range": Array [ - 8, - 9, + 7, + 14, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 14, - 25, + 15, + 16, ], - "type": "Identifier", - "value": "consturctor", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 25, - 26, + 16, + 17, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 26, - 27, + 17, + 18, ], "type": "Punctuator", - "value": "[", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 27, - 30, + 18, + 19, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ - 30, - 31, + 19, + 20, ], "type": "Punctuator", - "value": ",", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/empty-class.src 1`] = ` +Object { + "body": Array [ Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 10, + ], + "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": 25, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 32, - 35, + 0, + 10, ], - "type": "Identifier", - "value": "bar", + "superClass": null, + "type": "ClassDeclaration", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 35, - 36, + 10, + 11, ], - "type": "Punctuator", - "value": "]", + "type": "EmptyStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 11, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 27, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 26, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 36, - 37, + 0, + 5, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 2, + "column": 7, + "line": 1, }, "start": Object { - "column": 28, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ - 38, - 39, + 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": "{", @@ -30342,17 +30967,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 10, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 9, + "line": 1, }, }, "range": Array [ - 44, - 45, + 9, + 10, ], "type": "Punctuator", "value": "}", @@ -30360,243 +30985,36 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 11, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 10, + "line": 1, }, }, "range": Array [ - 46, - 47, + 10, + 11, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/class-constructor-params-defaults-array.src 1`] = ` +exports[`javascript fixtures/classes/empty-class-double-semi.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": "consturctor", - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 49, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 42, - 49, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "elements": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 32, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "AssignmentPattern", - }, - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 39, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "type": "AssignmentPattern", - }, - ], - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 40, - ], - "type": "ArrayPattern", - }, - ], - "range": Array [ - 25, - 49, - ], - "type": "FunctionExpression", - }, - }, - ], + "body": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 10, + "line": 1, }, "start": Object { "column": 8, @@ -30605,7 +31023,7 @@ Object { }, "range": Array [ 8, - 51, + 10, ], "type": "ClassBody", }, @@ -30629,8 +31047,8 @@ Object { }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 10, + "line": 1, }, "start": Object { "column": 0, @@ -30639,16 +31057,33 @@ Object { }, "range": Array [ 0, - 51, + 10, ], "superClass": null, "type": "ClassDeclaration", }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "EmptyStatement", + }, ], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 11, + "line": 1, }, "start": Object { "column": 0, @@ -30657,7 +31092,7 @@ Object { }, "range": Array [ 0, - 52, + 11, ], "sourceType": "script", "tokens": Array [ @@ -30718,233 +31153,443 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "consturctor", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 25, - 26, + 9, + 10, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 26, - 27, + 10, + 11, ], "type": "Punctuator", - "value": "[", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/empty-class-semi.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 11, + ], + "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": 11, + "line": 1, + }, "start": Object { - "column": 17, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 27, - 30, + 0, + 11, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "EmptyStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, ], "type": "Identifier", - "value": "foo", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 9, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 30, - 31, + 8, + 9, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 31, - 32, + 9, + 10, ], - "type": "Numeric", - "value": "3", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 32, - 33, + 10, + 11, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 34, - 37, + 11, + 12, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/empty-literal-derived-class.src 1`] = ` +Object { + "body": Array [ Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 20, + ], + "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": 28, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 27, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 37, - 38, + 0, + 20, ], - "type": "Punctuator", - "value": "=", + "superClass": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "type": "ClassDeclaration", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 28, - "line": 2, + "column": 20, + "line": 1, }, }, "range": Array [ - 38, - 39, + 20, + 21, ], - "type": "Numeric", - "value": "4", + "type": "EmptyStatement", + }, + ], + "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": 30, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 29, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 39, - 40, + 0, + 5, ], - "type": "Punctuator", - "value": "]", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 2, + "column": 7, + "line": 1, }, "start": Object { - "column": 30, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ - 40, - 41, + 6, + 7, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 32, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 42, - 43, + 8, + 15, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, ], "type": "Punctuator", "value": "{", @@ -30952,17 +31597,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 19, + "line": 1, }, }, "range": Array [ - 48, - 49, + 19, + 20, ], "type": "Punctuator", "value": "}", @@ -30970,312 +31615,257 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 21, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 20, + "line": 1, }, }, "range": Array [ - 50, - 51, + 20, + 21, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/class-constructor-params-defaults-object.src 1`] = ` +exports[`javascript fixtures/classes/invalid-class-declaration.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": "consturctor", - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 49, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 42, - 49, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 27, - 32, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 32, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 34, - 39, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 39, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 38, - 39, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "type": "AssignmentPattern", - }, - }, - ], - "range": Array [ - 26, - 40, - ], - "type": "ObjectPattern", + "body": Array [], + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 8, + ], + "type": "ClassBody", + }, + "id": null, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "EmptyStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 10, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/invalid-class-setter-declaration.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, }, + }, + "name": "foo", + "range": Array [ + 14, + 17, ], + "type": "Identifier", + }, + "kind": "set", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 22, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "params": Array [], "range": Array [ - 25, - 49, + 17, + 22, ], "type": "FunctionExpression", }, @@ -31283,8 +31873,8 @@ Object { ], "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 23, + "line": 1, }, "start": Object { "column": 8, @@ -31293,7 +31883,7 @@ Object { }, "range": Array [ 8, - 51, + 23, ], "type": "ClassBody", }, @@ -31317,8 +31907,8 @@ Object { }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 23, + "line": 1, }, "start": Object { "column": 0, @@ -31327,16 +31917,33 @@ Object { }, "range": Array [ 0, - 51, + 23, ], "superClass": null, "type": "ClassDeclaration", }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "EmptyStatement", + }, ], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 2, }, "start": Object { "column": 0, @@ -31345,7 +31952,7 @@ Object { }, "range": Array [ 0, - 52, + 25, ], "sourceType": "script", "tokens": Array [ @@ -31406,197 +32013,331 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 14, - 25, + 10, + 13, ], "type": "Identifier", - "value": "consturctor", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 25, - 26, + 14, + 17, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 26, - 27, + 17, + 18, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 27, - 30, + 18, + 19, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { "column": 21, - "line": 2, + "line": 1, }, "start": Object { "column": 20, - "line": 2, + "line": 1, }, }, "range": Array [ - 30, - 31, + 20, + 21, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 22, - "line": 2, + "line": 1, }, "start": Object { "column": 21, - "line": 2, + "line": 1, }, }, "range": Array [ - 31, - 32, + 21, + 22, ], - "type": "Numeric", - "value": "3", + "type": "Punctuator", + "value": "}", }, 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": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 34, - 37, + 23, + 24, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/invalid-class-two-super-classes.src 1`] = `"Classes can only extend a single class."`; + +exports[`javascript fixtures/classes/named-class-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "type": "ClassBody", + }, + "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": 11, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 11, + ], + "superClass": null, + "type": "ClassExpression", + }, + "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": 28, - "line": 2, + "column": 1, + "line": 1, }, "start": Object { - "column": 27, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 37, - 38, + 0, + 1, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 28, - "line": 2, + "column": 1, + "line": 1, }, }, "range": Array [ - 38, - 39, + 1, + 6, ], - "type": "Numeric", - "value": "4", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 29, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 39, - 40, + 7, + 8, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, ], "type": "Punctuator", "value": "}", @@ -31604,17 +32345,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 31, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 30, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 40, - 41, + 11, + 12, ], "type": "Punctuator", "value": ")", @@ -31622,63 +32363,303 @@ Object { Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 32, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 42, - 43, + 12, + 13, ], "type": "Punctuator", - "value": "{", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/classes/named-derived-class-expression.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 20, + ], + "type": "ClassBody", + }, + "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": 20, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 20, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "type": "ClassExpression", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 22, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 22, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 1, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 48, - 49, + 0, + 1, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { "column": 1, - "line": 4, + "line": 1, + }, + }, + "range": Array [ + 1, + 6, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 7, + "line": 1, }, }, "range": Array [ - 50, - 51, + 7, + 8, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 16, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, ], "type": "Punctuator", "value": "}", }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ";", + }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/class-constructor-params-object.src 1`] = ` +exports[`javascript fixtures/defaultParams/class-constructor.src 1`] = ` Object { "body": Array [ Object { @@ -31697,14 +32678,14 @@ Object { "line": 2, }, }, - "name": "consturctor", + "name": "constructor", "range": Array [ 14, 25, ], "type": "Identifier", }, - "kind": "method", + "kind": "constructor", "loc": Object { "end": Object { "column": 5, @@ -31717,7 +32698,7 @@ Object { }, "range": Array [ 14, - 45, + 44, ], "static": false, "type": "MethodDefinition", @@ -31731,13 +32712,13 @@ Object { "line": 3, }, "start": Object { - "column": 28, + "column": 27, "line": 2, }, }, "range": Array [ - 38, - 45, + 37, + 44, ], "type": "BlockStatement", }, @@ -31756,142 +32737,63 @@ Object { }, "params": Array [ Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, + "left": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, }, - "start": Object { + "name": "foo", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { "column": 16, "line": 2, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 27, - 30, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 27, - 30, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 32, - 35, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 32, - 35, - ], - "type": "Identifier", - }, - }, - ], "range": Array [ 26, - 36, + 35, ], - "type": "ObjectPattern", + "right": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 35, + ], + "raw": "'bar'", + "type": "Literal", + "value": "bar", + }, + "type": "AssignmentPattern", }, ], "range": Array [ 25, - 45, + 44, ], "type": "FunctionExpression", }, @@ -31909,7 +32811,7 @@ Object { }, "range": Array [ 8, - 47, + 46, ], "type": "ClassBody", }, @@ -31943,7 +32845,7 @@ Object { }, "range": Array [ 0, - 47, + 46, ], "superClass": null, "type": "ClassDeclaration", @@ -31961,7 +32863,7 @@ Object { }, "range": Array [ 0, - 48, + 47, ], "sourceType": "script", "tokens": Array [ @@ -32035,7 +32937,7 @@ Object { 25, ], "type": "Identifier", - "value": "consturctor", + "value": "constructor", }, Object { "loc": Object { @@ -32058,7 +32960,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, + "column": 19, "line": 2, }, "start": Object { @@ -32068,25 +32970,7 @@ Object { }, "range": Array [ 26, - 27, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 27, - 30, + 29, ], "type": "Identifier", "value": "foo", @@ -32094,20 +32978,20 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 20, "line": 2, }, "start": Object { - "column": 20, + "column": 19, "line": 2, }, }, "range": Array [ + 29, 30, - 31, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { @@ -32116,16 +33000,16 @@ Object { "line": 2, }, "start": Object { - "column": 22, + "column": 20, "line": 2, }, }, "range": Array [ - 32, + 30, 35, ], - "type": "Identifier", - "value": "bar", + "type": "String", + "value": "'bar'", }, Object { "loc": Object { @@ -32143,40 +33027,22 @@ Object { 36, ], "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", "value": ")", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 28, "line": 2, }, "start": Object { - "column": 28, + "column": 27, "line": 2, }, }, "range": Array [ + 37, 38, - 39, ], "type": "Punctuator", "value": "{", @@ -32193,8 +33059,8 @@ Object { }, }, "range": Array [ + 43, 44, - 45, ], "type": "Punctuator", "value": "}", @@ -32211,8 +33077,8 @@ Object { }, }, "range": Array [ + 45, 46, - 47, ], "type": "Punctuator", "value": "}", @@ -32222,7 +33088,7 @@ Object { } `; -exports[`javascript fixtures/destructuring/class-method-params-array.src 1`] = ` +exports[`javascript fixtures/defaultParams/class-method.src 1`] = ` Object { "body": Array [ Object { @@ -32261,7 +33127,7 @@ Object { }, "range": Array [ 14, - 37, + 36, ], "static": false, "type": "MethodDefinition", @@ -32275,13 +33141,13 @@ Object { "line": 3, }, "start": Object { - "column": 20, + "column": 19, "line": 2, }, }, "range": Array [ - 30, - 37, + 29, + 36, ], "type": "BlockStatement", }, @@ -32300,47 +33166,27 @@ Object { }, "params": Array [ Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, + "left": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, }, - "name": "bar", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, + "start": Object { + "column": 8, + "line": 2, }, - "name": "baz", - "range": Array [ - 24, - 27, - ], - "type": "Identifier", }, - ], + "name": "bar", + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 18, + "column": 17, "line": 2, }, "start": Object { @@ -32350,14 +33196,33 @@ Object { }, "range": Array [ 18, - 28, + 27, ], - "type": "ArrayPattern", + "right": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 22, + 27, + ], + "raw": "'baz'", + "type": "Literal", + "value": "baz", + }, + "type": "AssignmentPattern", }, ], "range": Array [ 17, - 37, + 36, ], "type": "FunctionExpression", }, @@ -32375,7 +33240,7 @@ Object { }, "range": Array [ 8, - 39, + 38, ], "type": "ClassBody", }, @@ -32409,7 +33274,7 @@ Object { }, "range": Array [ 0, - 39, + 38, ], "superClass": null, "type": "ClassDeclaration", @@ -32427,7 +33292,7 @@ Object { }, "range": Array [ 0, - 40, + 39, ], "sourceType": "script", "tokens": Array [ @@ -32524,7 +33389,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 11, "line": 2, }, "start": Object { @@ -32534,25 +33399,7 @@ Object { }, "range": Array [ 18, - 19, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 22, + 21, ], "type": "Identifier", "value": "bar", @@ -32560,20 +33407,20 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 12, "line": 2, }, "start": Object { - "column": 12, + "column": 11, "line": 2, }, }, "range": Array [ + 21, 22, - 23, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { @@ -32582,16 +33429,16 @@ Object { "line": 2, }, "start": Object { - "column": 14, + "column": 12, "line": 2, }, }, "range": Array [ - 24, + 22, 27, ], - "type": "Identifier", - "value": "baz", + "type": "String", + "value": "'baz'", }, Object { "loc": Object { @@ -32609,40 +33456,22 @@ Object { 28, ], "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", "value": ")", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 20, "line": 2, }, "start": Object { - "column": 20, + "column": 19, "line": 2, }, }, "range": Array [ + 29, 30, - 31, ], "type": "Punctuator", "value": "{", @@ -32659,8 +33488,8 @@ Object { }, }, "range": Array [ + 35, 36, - 37, ], "type": "Punctuator", "value": "}", @@ -32677,8 +33506,8 @@ Object { }, }, "range": Array [ + 37, 38, - 39, ], "type": "Punctuator", "value": "}", @@ -32688,275 +33517,126 @@ Object { } `; -exports[`javascript fixtures/destructuring/class-method-params-defaults-array.src 1`] = ` +exports[`javascript fixtures/defaultParams/declaration.src 1`] = ` Object { "body": Array [ Object { + "async": false, "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "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": 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": 20, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, }, - "name": "foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", }, - "kind": "method", + "name": "a", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "right": Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 16, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 14, - 41, + 15, + 16, ], - "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": 7, - "line": 2, - }, - }, - "params": Array [ - Object { - "elements": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 24, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "AssignmentPattern", - }, - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "baz", - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 31, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "raw": "4", - "type": "Literal", - "value": 4, - }, - "type": "AssignmentPattern", - }, - ], - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 18, - 32, - ], - "type": "ArrayPattern", - }, - ], - "range": Array [ - 17, - 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, - }, - "start": Object { - "column": 6, - "line": 1, + "raw": "1", + "type": "Literal", + "value": 1, }, + "type": "AssignmentPattern", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, + ], "range": Array [ 0, - 43, + 20, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 20, + "line": 1, }, "start": Object { "column": 0, @@ -32965,14 +33645,14 @@ Object { }, "range": Array [ 0, - 44, + 20, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -32982,205 +33662,79 @@ 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, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { "column": 9, "line": 1, }, - "start": Object { - "column": 8, - "line": 1, - }, }, "range": Array [ - 8, 9, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 17, + 10, ], "type": "Identifier", - "value": "foo", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 17, - 18, + 10, + 11, ], "type": "Punctuator", "value": "(", }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "[", - }, Object { "loc": Object { "end": Object { "column": 12, - "line": 2, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 19, - 22, + 11, + 12, ], "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "=", + "value": "a", }, Object { "loc": Object { "end": Object { "column": 14, - "line": 2, + "line": 1, }, "start": Object { "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Numeric", - "value": "3", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, + "line": 1, }, }, "range": Array [ - 29, - 30, + 13, + 14, ], "type": "Punctuator", "value": "=", @@ -33188,53 +33742,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 30, - 31, + 15, + 16, ], "type": "Numeric", - "value": "4", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "]", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 32, - 33, + 16, + 17, ], "type": "Punctuator", "value": ")", @@ -33242,17 +33778,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 34, - 35, + 18, + 19, ], "type": "Punctuator", "value": "{", @@ -33260,35 +33796,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, + "column": 20, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 19, + "line": 1, }, }, "range": Array [ - 42, - 43, + 19, + 20, ], "type": "Punctuator", "value": "}", @@ -33298,335 +33816,145 @@ Object { } `; -exports[`javascript fixtures/destructuring/class-method-params-defaults-object.src 1`] = ` +exports[`javascript fixtures/defaultParams/expression.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 [ - 14, - 17, - ], - "type": "Identifier", + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 22, + ], + "right": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, }, }, "range": Array [ - 14, - 41, + 20, + 22, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "params": Array [ + Object { + "left": Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 13, + "line": 1, }, }, + "name": "y", "range": Array [ - 34, - 41, + 13, + 14, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 18, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 13, + "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 19, - 24, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 19, - 24, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 24, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "baz", - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 26, - 31, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "baz", - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 31, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "AssignmentPattern", - }, - }, - ], - "range": Array [ - 18, - 32, - ], - "type": "ObjectPattern", - }, - ], "range": Array [ - 17, - 41, + 13, + 18, ], - "type": "FunctionExpression", + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "type": "AssignmentPattern", }, - }, - ], - "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, - }, - "start": Object { - "column": 6, - "line": 1, - }, + ], + "range": Array [ + 4, + 22, + ], + "type": "FunctionExpression", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", + "type": "AssignmentExpression", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 22, + "line": 1, }, "start": Object { "column": 0, @@ -33635,16 +33963,15 @@ Object { }, "range": Array [ 0, - 43, + 22, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 22, + "line": 1, }, "start": Object { "column": 0, @@ -33653,14 +33980,14 @@ Object { }, "range": Array [ 0, - 44, + 22, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -33670,205 +33997,436 @@ Object { }, "range": Array [ 0, - 5, + 1, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "x", }, 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": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 12, "line": 1, }, "start": Object { - "column": 8, + "column": 4, "line": 1, }, }, "range": Array [ - 8, - 9, + 4, + 12, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 14, - 17, + 12, + 13, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 17, - 18, + 13, + 14, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 18, - 19, + 15, + 16, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 19, - 22, + 17, + 18, ], - "type": "Identifier", - "value": "bar", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 22, - 23, + 18, + 19, ], "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": "Numeric", - "value": "3", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 24, - 25, + 21, + 22, ], "type": "Punctuator", - "value": ",", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/defaultParams/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": 27, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 27, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 6, + 25, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "params": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 21, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "type": "AssignmentPattern", + }, + ], + "range": Array [ + 9, + 25, + ], + "type": "FunctionExpression", + }, + }, + ], + "range": Array [ + 4, + 27, + ], + "type": "ObjectExpression", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 27, + ], + "type": "ExpressionStatement", + }, + ], + "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": 19, - "line": 2, + "column": 1, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 26, - 29, + 0, + 1, ], "type": "Identifier", - "value": "baz", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 3, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 2, + "line": 1, }, }, "range": Array [ - 29, - 30, + 2, + 3, ], "type": "Punctuator", "value": "=", @@ -33876,53 +34434,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 4, + "line": 1, }, }, "range": Array [ - 30, - 31, + 4, + 5, ], - "type": "Numeric", - "value": "3", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 7, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ - 31, - 32, + 6, + 7, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 17, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 17, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, }, "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { "column": 22, - "line": 2, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, }, }, "range": Array [ - 32, - 33, + 21, + 22, ], "type": "Punctuator", "value": ")", @@ -33930,17 +34596,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 34, - 35, + 23, + 24, ], "type": "Punctuator", "value": "{", @@ -33948,17 +34614,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 24, + "line": 1, }, }, "range": Array [ - 40, - 41, + 24, + 25, ], "type": "Punctuator", "value": "}", @@ -33966,17 +34632,17 @@ 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": "}", @@ -33986,263 +34652,183 @@ Object { } `; -exports[`javascript fixtures/destructuring/class-method-params-object.src 1`] = ` +exports[`javascript fixtures/defaultParams/not-all-params.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": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + }, + "init": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 35, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 33, + "line": 1, }, }, - "name": "foo", "range": Array [ - 14, - 17, + 33, + 35, ], - "type": "Identifier", + "type": "BlockStatement", }, - "kind": "method", + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 35, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, }, }, - "range": Array [ - 14, - 37, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 19, + "line": 1, }, }, + "name": "a", "range": Array [ - 30, - 37, + 19, + 20, ], - "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 { + Object { + "left": Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 22, + "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 19, - 22, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - }, + "name": "b", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 28, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "name": "baz", - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "method": false, - "range": Array [ - 24, - 27, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "name": "baz", - "range": Array [ - 24, - 27, - ], - "type": "Identifier", - }, + "start": Object { + "column": 26, + "line": 1, }, - ], + }, "range": Array [ - 18, + 26, 28, ], - "type": "ObjectPattern", + "raw": "42", + "type": "Literal", + "value": 42, }, - ], - "range": Array [ - 17, - 37, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 39, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, + "type": "AssignmentPattern", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 10, + 35, + ], + "type": "FunctionExpression", }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 35, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 36, + "line": 1, }, "start": Object { "column": 0, @@ -34251,16 +34837,15 @@ Object { }, "range": Array [ 0, - 39, + 36, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 5, + "column": 36, + "line": 1, }, "start": Object { "column": 0, @@ -34269,14 +34854,14 @@ Object { }, "range": Array [ 0, - 40, + 36, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -34286,10 +34871,10 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", + "value": "var", }, Object { "loc": Object { @@ -34298,16 +34883,16 @@ Object { "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, + 4, 7, ], "type": "Identifier", - "value": "A", + "value": "foo", }, Object { "loc": Object { @@ -34325,40 +34910,40 @@ Object { 9, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 14, - 17, + 10, + 18, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "function", }, 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": "(", @@ -34366,102 +34951,102 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ - 18, 19, + 20, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 20, + "line": 1, }, }, "range": Array [ - 19, - 22, + 20, + 21, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ 22, 23, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ 24, - 27, + 25, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 27, + 26, 28, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "42", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ @@ -34469,40 +35054,76 @@ Object { 29, ], "type": "Punctuator", - "value": ")", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 31, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 30, + "line": 1, }, }, "range": Array [ 30, 31, ], + "type": "Identifier", + "value": "c", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], "type": "Punctuator", "value": "{", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 35, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 34, + "line": 1, }, }, "range": Array [ - 36, - 37, + 34, + 35, ], "type": "Punctuator", "value": "}", @@ -34510,27 +35131,27 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 36, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 35, + "line": 1, }, }, "range": Array [ - 38, - 39, + 35, + 36, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/defaults-array.src 1`] = ` +exports[`javascript fixtures/destructuring/array-member.src 1`] = ` Object { "body": Array [ Object { @@ -34538,10 +35159,21 @@ Object { "left": Object { "elements": Array [ Object { - "left": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "object": Object { "loc": Object { "end": Object { - "column": 2, + "column": 3, "line": 1, }, "start": Object { @@ -34549,47 +35181,36 @@ Object { "line": 1, }, }, - "name": "x", + "name": "ok", "range": Array [ 1, - 2, + 3, ], "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 5, - ], - "right": Object { + "property": Object { "loc": Object { "end": Object { "column": 5, "line": 1, }, "start": Object { - "column": 3, + "column": 4, "line": 1, }, }, + "name": "v", "range": Array [ - 3, + 4, 5, ], - "raw": "10", - "type": "Literal", - "value": 10, + "type": "Identifier", }, - "type": "AssignmentPattern", + "range": Array [ + 1, + 5, + ], + "type": "MemberExpression", }, ], "loc": Object { @@ -34610,7 +35231,7 @@ Object { }, "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { @@ -34621,12 +35242,12 @@ Object { "operator": "=", "range": Array [ 0, - 10, + 11, ], "right": Object { "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { @@ -34634,18 +35255,19 @@ Object { "line": 1, }, }, - "name": "x", "range": Array [ 9, - 10, + 11, ], - "type": "Identifier", + "raw": "20", + "type": "Literal", + "value": 20, }, "type": "AssignmentExpression", }, "loc": Object { "end": Object { - "column": 10, + "column": 12, "line": 1, }, "start": Object { @@ -34655,14 +35277,14 @@ Object { }, "range": Array [ 0, - 10, + 12, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 10, + "column": 12, "line": 1, }, "start": Object { @@ -34672,7 +35294,7 @@ Object { }, "range": Array [ 0, - 10, + 12, ], "sourceType": "script", "tokens": Array [ @@ -34697,7 +35319,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 2, + "column": 3, "line": 1, }, "start": Object { @@ -34707,28 +35329,28 @@ Object { }, "range": Array [ 1, - 2, + 3, ], "type": "Identifier", - "value": "x", + "value": "ok", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 4, "line": 1, }, "start": Object { - "column": 2, + "column": 3, "line": 1, }, }, "range": Array [ - 2, 3, + 4, ], "type": "Punctuator", - "value": "=", + "value": ".", }, Object { "loc": Object { @@ -34737,16 +35359,16 @@ Object { "line": 1, }, "start": Object { - "column": 3, + "column": 4, "line": 1, }, }, "range": Array [ - 3, + 4, 5, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "v", }, Object { "loc": Object { @@ -34787,7 +35409,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { @@ -34797,242 +35419,169 @@ Object { }, "range": Array [ 9, - 10, + 11, ], - "type": "Identifier", - "value": "x", + "type": "Numeric", + "value": "20", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/defaults-array-all.src 1`] = ` +exports[`javascript fixtures/destructuring/array-to-array.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ - 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": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, }, - "range": Array [ - 5, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, + "start": Object { + "column": 1, + "line": 1, }, - "type": "AssignmentPattern", }, - 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, - }, + "name": "a", + "range": Array [ + 1, + 2, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 13, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "raw": "5", - "type": "Literal", - "value": 5, + "start": Object { + "column": 4, + "line": 1, }, - "type": "AssignmentPattern", }, - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, + "name": "b", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 15, + ], + "right": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, }, - "range": Array [ - 20, - 25, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "raw": "1", - "type": "Literal", - "value": 1, + "start": Object { + "column": 10, + "line": 1, }, - "type": "AssignmentPattern", - }, - ], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, }, + "name": "b", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", }, - "range": Array [ - 4, - 26, - ], - "type": "ArrayPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, }, + "name": "a", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", }, - "name": "a", - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - }, + ], "loc": Object { "end": Object { - "column": 30, + "column": 15, "line": 1, }, "start": Object { - "column": 4, + "column": 9, "line": 1, }, }, "range": Array [ - 4, - 30, + 9, + 15, ], - "type": "VariableDeclarator", + "type": "ArrayExpression", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 31, + "column": 16, "line": 1, }, "start": Object { @@ -35042,14 +35591,14 @@ Object { }, "range": Array [ 0, - 31, + 16, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 31, + "column": 16, "line": 1, }, "start": Object { @@ -35059,14 +35608,14 @@ Object { }, "range": Array [ 0, - 31, + 16, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -35076,10 +35625,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, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, 3, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { @@ -35096,8 +35681,8 @@ Object { 4, 5, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { @@ -35114,8 +35699,8 @@ Object { 5, 6, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { @@ -35138,7 +35723,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { @@ -35148,10 +35733,28 @@ 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, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { @@ -35187,235 +35790,61 @@ Object { 14, ], "type": "Identifier", - "value": "y", + "value": "a", }, 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": "]", }, 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": "Numeric", - "value": "5", + "type": "Punctuator", + "value": ";", }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Numeric", - "value": "1", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring/defaults-array-longform-nested-multi.src 1`] = ` -Object { - "body": Array [ + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/array-var-undefined.src 1`] = ` +Object { + "body": Array [ Object { "declarations": Array [ Object { "id": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ + "elements": 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": 9, + "column": 6, "line": 1, }, "start": Object { @@ -35423,268 +35852,51 @@ Object { "line": 1, }, }, - "method": false, + "name": "a", "range": Array [ 5, - 9, + 6, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - }, + "type": "Identifier", }, - 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": 15, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 11, - 15, - ], - "shorthand": false, - "type": "Property", - "value": 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": 7, + "line": 1, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 17, - 32, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 22, - 31, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 31, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - ], - "range": Array [ - 20, - 32, - ], - "type": "ObjectPattern", - }, + "start": Object { + "column": 4, + "line": 1, }, - ], + }, "range": Array [ 4, - 34, + 7, ], - "type": "ObjectPattern", + "type": "ArrayPattern", }, "init": Object { + "elements": Array [], "loc": Object { "end": Object { - "column": 38, + "column": 12, "line": 1, }, "start": Object { - "column": 37, + "column": 10, "line": 1, }, }, - "name": "b", "range": Array [ - 37, - 38, + 10, + 12, ], - "type": "Identifier", + "type": "ArrayExpression", }, "loc": Object { "end": Object { - "column": 38, + "column": 12, "line": 1, }, "start": Object { @@ -35694,7 +35906,7 @@ Object { }, "range": Array [ 4, - 38, + 12, ], "type": "VariableDeclarator", }, @@ -35702,7 +35914,7 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 39, + "column": 13, "line": 1, }, "start": Object { @@ -35712,14 +35924,14 @@ Object { }, "range": Array [ 0, - 39, + 13, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 39, + "column": 13, "line": 1, }, "start": Object { @@ -35729,7 +35941,7 @@ Object { }, "range": Array [ 0, - 39, + 13, ], "sourceType": "script", "tokens": Array [ @@ -35767,7 +35979,7 @@ Object { 5, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { @@ -35785,7 +35997,7 @@ Object { 6, ], "type": "Identifier", - "value": "x", + "value": "a", }, Object { "loc": Object { @@ -35803,7 +36015,7 @@ Object { 7, ], "type": "Punctuator", - "value": ":", + "value": "]", }, Object { "loc": Object { @@ -35820,26 +36032,26 @@ Object { 8, 9, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "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": "Punctuator", - "value": ",", + "value": "[", }, Object { "loc": Object { @@ -35856,8 +36068,8 @@ Object { 11, 12, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { @@ -35875,274 +36087,244 @@ Object { 13, ], "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "y", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/call-expression-destruction-array.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, + "expression": Object { + "arguments": Array [ + Object { + "argument": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 9, + ], + "type": "ArrayExpression", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 9, + ], + "type": "SpreadElement", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 0, + 3, + ], + "type": "Identifier", }, - "start": Object { - "column": 18, - "line": 1, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, }, + "range": Array [ + 0, + 10, + ], + "type": "CallExpression", }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ":", - }, - Object { "loc": Object { "end": Object { - "column": 21, + "column": 11, "line": 1, }, "start": Object { - "column": 20, + "column": 0, "line": 1, }, }, "range": Array [ - 20, - 21, + 0, + 11, ], - "type": "Punctuator", - "value": "{", + "type": "ExpressionStatement", }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "a", + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": ":", + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 12, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 26, + "column": 3, "line": 1, }, "start": Object { - "column": 25, + "column": 0, "line": 1, }, }, "range": Array [ - 25, - 26, + 0, + 3, ], "type": "Identifier", - "value": "a", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 4, "line": 1, }, "start": Object { - "column": 27, + "column": 3, "line": 1, }, }, "range": Array [ - 27, - 28, + 3, + 4, ], "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "type": "Numeric", - "value": "10", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 7, "line": 1, }, "start": Object { - "column": 31, + "column": 4, "line": 1, }, }, "range": Array [ - 31, - 32, + 4, + 7, ], "type": "Punctuator", - "value": "}", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 8, "line": 1, }, "start": Object { - "column": 33, + "column": 7, "line": 1, }, }, "range": Array [ - 33, - 34, + 7, + 8, ], "type": "Punctuator", - "value": "}", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 9, "line": 1, }, "start": Object { - "column": 35, + "column": 8, "line": 1, }, }, "range": Array [ - 35, - 36, + 8, + 9, ], "type": "Punctuator", - "value": "=", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 10, "line": 1, }, "start": Object { - "column": 37, + "column": 9, "line": 1, }, }, "range": Array [ - 37, - 38, + 9, + 10, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 39, + "column": 11, "line": 1, }, "start": Object { - "column": 38, + "column": 10, "line": 1, }, }, "range": Array [ - 38, - 39, + 10, + 11, ], "type": "Punctuator", "value": ";", @@ -36152,108 +36334,34 @@ Object { } `; -exports[`javascript fixtures/destructuring/defaults-array-multi.src 1`] = ` +exports[`javascript fixtures/destructuring/call-expression-destruction-object.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ - 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": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, + "expression": Object { + "arguments": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, }, - "name": "y", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, + "start": Object { + "column": 7, + "line": 1, }, - "name": "z", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", }, - ], + "properties": Array [], + "range": Array [ + 7, + 9, + ], + "type": "ObjectExpression", + }, "loc": Object { "end": Object { - "column": 18, + "column": 9, "line": 1, }, "start": Object { @@ -36263,49 +36371,48 @@ Object { }, "range": Array [ 4, - 18, - ], - "type": "ArrayPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 21, - 22, + 9, ], - "type": "Identifier", + "type": "SpreadElement", }, + ], + "callee": Object { "loc": Object { "end": Object { - "column": 22, + "column": 3, "line": 1, }, "start": Object { - "column": 4, + "column": 0, "line": 1, }, }, + "name": "foo", "range": Array [ - 4, - 22, + 0, + 3, ], - "type": "VariableDeclarator", + "type": "Identifier", }, - ], - "kind": "var", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 10, + ], + "type": "CallExpression", + }, "loc": Object { "end": Object { - "column": 23, + "column": 11, "line": 1, }, "start": Object { @@ -36315,15 +36422,15 @@ Object { }, "range": Array [ 0, - 23, + 11, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -36332,7 +36439,7 @@ Object { }, "range": Array [ 0, - 23, + 12, ], "sourceType": "script", "tokens": Array [ @@ -36351,44 +36458,44 @@ Object { 0, 3, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "foo", }, 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": 6, + "column": 7, "line": 1, }, "start": Object { - "column": 5, + "column": 4, "line": 1, }, }, "range": Array [ - 5, - 6, + 4, + 7, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { @@ -36406,367 +36513,246 @@ Object { 8, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { "column": 9, "line": 1, }, - }, - "range": Array [ - 9, - 11, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, "start": Object { - "column": 11, + "column": 8, "line": 1, }, }, "range": Array [ - 11, - 12, + 8, + 9, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 10, "line": 1, }, "start": Object { - "column": 13, + "column": 9, "line": 1, }, }, "range": Array [ - 13, - 14, + 9, + 10, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 11, "line": 1, }, "start": Object { - "column": 14, + "column": 10, "line": 1, }, }, "range": Array [ - 14, - 15, + 10, + 11, ], "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/defaults-array-nested-all.src 1`] = ` +exports[`javascript fixtures/destructuring/class-constructor-params-array.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ - 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", + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, }, + }, + "name": "consturctor", + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 45, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 5, - "line": 1, + "column": 28, + "line": 2, }, }, "range": Array [ - 5, - 11, + 38, + 45, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 2, }, - "type": "AssignmentPattern", }, - Object { - "elements": Array [ - Object { - "left": Object { + "params": Array [ + Object { + "elements": Array [ + Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 20, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 17, + "line": 2, }, }, - "name": "z", + "name": "foo", "range": Array [ - 15, - 16, + 27, + 30, ], "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 21, - ], - "right": Object { + Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 22, + "line": 2, }, }, + "name": "bar", "range": Array [ - 19, - 21, + 32, + 35, ], - "raw": "10", - "type": "Literal", - "value": 10, + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, }, - "type": "AssignmentPattern", - }, - ], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, }, + "range": Array [ + 26, + 36, + ], + "type": "ArrayPattern", }, - "range": Array [ - 13, - 22, - ], - "type": "ArrayPattern", - }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + ], + "range": Array [ + 25, + 45, + ], + "type": "FunctionExpression", }, - "range": Array [ - 4, - 23, - ], - "type": "ArrayPattern", }, - "init": 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": 1, + "line": 4, }, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + "start": Object { + "column": 8, + "line": 1, }, - "range": Array [ - 4, - 27, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 8, + 47, + ], + "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": 28, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, @@ -36775,15 +36761,16 @@ Object { }, "range": Array [ 0, - 28, + 47, ], - "type": "VariableDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -36792,14 +36779,14 @@ Object { }, "range": Array [ 0, - 28, + 48, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -36809,115 +36796,97 @@ 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, - "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": "Identifier", - "value": "x", + "value": "A", }, 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, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 9, - 11, + 14, + 25, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "consturctor", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 11, - 12, + 25, + 26, ], "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, + 26, + 27, ], "type": "Punctuator", "value": "[", @@ -36925,71 +36894,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 20, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 17, + "line": 2, }, }, "range": Array [ - 15, - 16, + 27, + 30, ], "type": "Identifier", - "value": "z", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 21, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 20, + "line": 2, }, }, "range": Array [ - 17, - 18, + 30, + 31, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 22, + "line": 2, }, }, "range": Array [ - 19, - 21, + 32, + 35, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 26, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 25, + "line": 2, }, }, "range": Array [ - 21, - 22, + 35, + 36, ], "type": "Punctuator", "value": "]", @@ -36997,236 +36966,331 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 27, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 26, + "line": 2, }, }, "range": Array [ - 22, - 23, + 36, + 37, ], "type": "Punctuator", - "value": "]", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 29, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 28, + "line": 2, }, }, "range": Array [ - 24, - 25, + 38, + 39, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 26, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 26, - 27, + 44, + 45, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 27, - "line": 1, + "column": 0, + "line": 4, }, }, "range": Array [ - 27, - 28, + 46, + 47, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/defaults-array-nested-multi.src 1`] = ` +exports[`javascript fixtures/destructuring/class-constructor-params-defaults-array.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ - 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", + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, }, + }, + "name": "consturctor", + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 49, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 5, - "line": 1, + "column": 32, + "line": 2, }, }, "range": Array [ - 5, - 11, + 42, + 49, ], - "right": Object { + "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 { + "elements": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 27, + 32, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 31, + 32, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + "type": "AssignmentPattern", + }, + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 34, + 37, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 34, + 39, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "raw": "4", + "type": "Literal", + "value": 4, + }, + "type": "AssignmentPattern", + }, + ], "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 30, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 9, - 11, + 26, + 40, ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - Object { - "elements": Array [ - 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": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, + "type": "ArrayPattern", }, - "range": Array [ - 13, - 18, - ], - "type": "ArrayPattern", - }, - ], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + ], + "range": Array [ + 25, + 49, + ], + "type": "FunctionExpression", }, - "range": Array [ - 4, - 19, - ], - "type": "ArrayPattern", }, - "init": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 22, - 23, - ], - "type": "Identifier", + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + "start": Object { + "column": 8, + "line": 1, }, - "range": Array [ - 4, - 23, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 8, + 51, + ], + "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": 24, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, @@ -37235,15 +37299,16 @@ Object { }, "range": Array [ 0, - 24, + 51, ], - "type": "VariableDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -37252,14 +37317,14 @@ Object { }, "range": Array [ 0, - 24, + 52, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -37269,115 +37334,97 @@ 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, - "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": "Identifier", - "value": "x", + "value": "A", }, 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, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 9, - 11, + 14, + 25, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "consturctor", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 11, - 12, + 25, + 26, ], "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, + 26, + 27, ], "type": "Punctuator", "value": "[", @@ -37385,71 +37432,35 @@ Object { 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, + "column": 20, + "line": 2, }, "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, + "line": 2, }, }, "range": Array [ - 18, - 19, + 27, + 30, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { "column": 21, - "line": 1, + "line": 2, }, "start": Object { "column": 20, - "line": 1, + "line": 2, }, }, "range": Array [ - 20, - 21, + 30, + 31, ], "type": "Punctuator", "value": "=", @@ -37457,724 +37468,517 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 21, + "line": 2, }, }, "range": Array [ - 23, - 24, + 31, + 32, ], - "type": "Punctuator", - "value": ";", + "type": "Numeric", + "value": "3", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring/defaults-object.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, - }, - }, - "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": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 5, - 11, - ], - "shorthand": true, - "type": "Property", - "value": 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": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - ], - "range": Array [ - 4, - 12, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - }, - "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": 16, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 22, + "line": 2, }, }, "range": Array [ - 0, - 16, + 32, + 33, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ",", }, - }, - "range": Array [ - 0, - 16, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 27, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 24, + "line": 2, }, }, "range": Array [ - 0, - 3, + 34, + 37, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 28, + "line": 2, }, "start": Object { - "column": 4, - "line": 1, + "column": 27, + "line": 2, }, }, "range": Array [ - 4, - 5, + 37, + 38, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 29, + "line": 2, }, "start": Object { - "column": 5, - "line": 1, + "column": 28, + "line": 2, }, }, "range": Array [ - 5, - 6, + 38, + 39, ], - "type": "Identifier", - "value": "x", + "type": "Numeric", + "value": "4", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 30, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 29, + "line": 2, }, }, "range": Array [ - 7, - 8, + 39, + 40, ], "type": "Punctuator", - "value": "=", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 31, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 30, + "line": 2, }, }, "range": Array [ - 9, - 11, + 40, + 41, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 33, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 32, + "line": 2, }, }, "range": Array [ - 11, - 12, + 42, + 43, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 13, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 13, - 14, + 48, + 49, ], "type": "Punctuator", - "value": "=", + "value": "}", }, 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, + 50, + 51, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/defaults-object-all.src 1`] = ` +exports[`javascript fixtures/destructuring/class-constructor-params-defaults-object.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": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "consturctor", + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + }, + "kind": "method", "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { "column": 4, - "line": 1, + "line": 2, }, }, - "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", + "range": Array [ + 14, + 49, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 5, - "line": 1, + "column": 32, + "line": 2, }, }, - "method": false, "range": Array [ - 5, - 11, + 42, + 49, ], - "shorthand": true, - "type": "Property", - "value": 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", - }, + "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 { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 30, + "line": 2, }, "start": Object { - "column": 5, - "line": 1, + "column": 16, + "line": 2, }, }, - "range": Array [ - 5, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 27, + 30, + ], + "type": "Identifier", }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 13, - 18, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, }, - "start": Object { - "column": 13, - "line": 1, + "method": false, + "range": Array [ + 27, + 32, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 27, + 32, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 31, + 32, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + "type": "AssignmentPattern", }, }, - "name": "y", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 34, + 37, + ], + "type": "Identifier", }, - }, - "range": Array [ - 17, - 18, - ], - "raw": "5", - "type": "Literal", - "value": 5, - }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 20, - 25, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, }, - "start": Object { - "column": 20, - "line": 1, + "method": false, + "range": Array [ + 34, + 39, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 34, + 37, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 34, + 39, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "raw": "4", + "type": "Literal", + "value": 4, + }, + "type": "AssignmentPattern", }, }, - "name": "z", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, + ], "range": Array [ - 20, - 25, + 26, + 40, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "type": "AssignmentPattern", + "type": "ObjectPattern", }, - }, - ], - "range": Array [ - 4, - 26, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, + ], + "range": Array [ + 25, + 49, + ], + "type": "FunctionExpression", }, - "name": "a", - "range": Array [ - 29, - 30, - ], - "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 30, - "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, - 30, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 8, + 51, + ], + "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": 31, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, @@ -38183,15 +37987,16 @@ Object { }, "range": Array [ 0, - 31, + 51, ], - "type": "VariableDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -38200,14 +38005,14 @@ Object { }, "range": Array [ 0, - 31, + 52, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -38217,133 +38022,133 @@ 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": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 9, "line": 1, }, "start": Object { - "column": 5, + "column": 8, "line": 1, }, }, "range": Array [ - 5, - 6, + 8, + 9, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 7, - 8, + 14, + 25, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "consturctor", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 9, - 11, + 25, + 26, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 11, - 12, + 26, + 27, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 20, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 17, + "line": 2, }, }, "range": Array [ - 13, - 14, + 27, + 30, ], "type": "Identifier", - "value": "y", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 21, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 20, + "line": 2, }, }, "range": Array [ - 15, - 16, + 30, + 31, ], "type": "Punctuator", "value": "=", @@ -38351,35 +38156,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 21, + "line": 2, }, }, "range": Array [ - 17, - 18, + 31, + 32, ], "type": "Numeric", - "value": "5", + "value": "3", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 22, + "line": 2, }, }, "range": Array [ - 18, - 19, + 32, + 33, ], "type": "Punctuator", "value": ",", @@ -38387,35 +38192,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 27, + "line": 2, }, "start": Object { - "column": 20, - "line": 1, + "column": 24, + "line": 2, }, }, "range": Array [ - 20, - 21, + 34, + 37, ], "type": "Identifier", - "value": "z", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 28, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 27, + "line": 2, }, }, "range": Array [ - 22, - 23, + 37, + 38, ], "type": "Punctuator", "value": "=", @@ -38423,35 +38228,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 29, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 28, + "line": 2, }, }, "range": Array [ - 24, - 25, + 38, + 39, ], "type": "Numeric", - "value": "1", + "value": "4", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 30, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 29, + "line": 2, }, }, "range": Array [ - 25, - 26, + 39, + 40, ], "type": "Punctuator", "value": "}", @@ -38459,220 +38264,337 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 31, + "line": 2, }, "start": Object { - "column": 27, - "line": 1, + "column": 30, + "line": 2, }, }, "range": Array [ - 27, - 28, + 40, + 41, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 33, + "line": 2, }, "start": Object { - "column": 29, - "line": 1, + "column": 32, + "line": 2, }, }, "range": Array [ - 29, - 30, + 42, + 43, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 30, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 30, - 31, + 48, + 49, ], "type": "Punctuator", - "value": ";", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/defaults-object-longform.src 1`] = ` +exports[`javascript fixtures/destructuring/class-constructor-params-object.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": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "consturctor", + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + }, + "kind": "method", "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { "column": 4, - "line": 1, + "line": 2, }, }, - "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", + "range": Array [ + 14, + 45, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 6, - "line": 1, + "column": 28, + "line": 2, }, }, - "method": false, "range": Array [ - 6, - 15, + 38, + 45, ], - "shorthand": false, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, + "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 { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 26, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 16, + "line": 2, }, }, - "range": Array [ - 9, - 15, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 27, + 30, + ], + "type": "Identifier", }, - "start": Object { - "column": 13, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 27, + 30, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 27, + 30, + ], + "type": "Identifier", }, }, - "range": Array [ - 13, - 15, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 32, + 35, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 32, + 35, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 32, + 35, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 26, + 36, + ], + "type": "ObjectPattern", }, - }, - ], - "range": Array [ - 4, - 17, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, + ], + "range": Array [ + 25, + 45, + ], + "type": "FunctionExpression", }, - "name": "x", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 21, - "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, - 21, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 8, + 47, + ], + "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": 22, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, @@ -38681,15 +38603,16 @@ Object { }, "range": Array [ 0, - 22, + 47, ], - "type": "VariableDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -38698,14 +38621,14 @@ Object { }, "range": Array [ 0, - 22, + 48, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -38715,133 +38638,169 @@ 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": "Punctuator", - "value": "{", + "type": "Identifier", + "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": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 25, ], "type": "Identifier", - "value": "x", + "value": "consturctor", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 7, - 8, + 25, + 26, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 9, - 10, + 26, + 27, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 27, + 30, ], "type": "Identifier", - "value": "x", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 21, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 20, + "line": 2, }, }, "range": Array [ - 11, - 12, + 30, + 31, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 22, + "line": 2, }, }, "range": Array [ - 13, - 15, + 32, + 35, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 26, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 25, + "line": 2, }, }, "range": Array [ - 16, - 17, + 35, + 36, ], "type": "Punctuator", "value": "}", @@ -38849,406 +38808,259 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 27, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 26, + "line": 2, }, }, "range": Array [ - 18, - 19, + 36, + 37, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 29, + "line": 2, }, "start": Object { - "column": 20, - "line": 1, + "column": 28, + "line": 2, }, }, "range": Array [ - 20, - 21, + 38, + 39, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 21, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 21, - 22, + 44, + 45, ], "type": "Punctuator", - "value": ";", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/defaults-object-longform-all.src 1`] = ` +exports[`javascript fixtures/destructuring/class-method-params-array.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": 37, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { "column": 4, - "line": 1, + "line": 2, }, }, - "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", + "range": Array [ + 14, + 37, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 5, - "line": 1, + "column": 20, + "line": 2, }, }, - "method": false, "range": Array [ - 5, - 14, + 30, + 37, ], - "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", - }, + "type": "BlockStatement", }, - 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", + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, + "start": Object { + "column": 7, + "line": 2, }, - "method": false, - "range": Array [ - 16, - 25, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, + }, + "params": Array [ + Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, }, - "start": Object { - "column": 19, - "line": 1, + "name": "bar", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, }, + "name": "baz", + "range": Array [ + 24, + 27, + ], + "type": "Identifier", }, - "name": "y", - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - }, + ], "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 19, - 25, + 18, + 28, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 27, - 28, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 27, - 36, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 36, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 36, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", + "type": "ArrayPattern", }, - }, - ], - "range": Array [ - 4, - 37, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, + ], + "range": Array [ + 17, + 37, + ], + "type": "FunctionExpression", }, - "name": "a", - "range": Array [ - 40, - 41, - ], - "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 41, - "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, - 41, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 8, + 39, + ], + "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": 42, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, @@ -39257,15 +39069,16 @@ Object { }, "range": Array [ 0, - 42, + 39, ], - "type": "VariableDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -39274,14 +39087,14 @@ Object { }, "range": Array [ 0, - 42, + 40, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -39291,46 +39104,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": "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", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { @@ -39347,8 +39124,8 @@ Object { 6, 7, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { @@ -39365,90 +39142,36 @@ Object { 8, 9, ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "Numeric", - "value": "10", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ 14, - 15, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, 17, ], "type": "Identifier", - "value": "y", + "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 [ @@ -39456,107 +39179,107 @@ Object { 18, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ + 18, 19, - 20, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ - 21, + 19, 22, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 12, + "line": 2, }, }, "range": Array [ + 22, 23, - 25, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 25, - 26, + 24, + 27, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { - "column": 27, - "line": 1, + "column": 17, + "line": 2, }, }, "range": Array [ 27, 28, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 28, - "line": 1, + "column": 18, + "line": 2, }, }, "range": Array [ @@ -39564,71 +39287,35 @@ Object { 29, ], "type": "Punctuator", - "value": ":", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 21, + "line": 2, }, "start": Object { - "column": 30, - "line": 1, + "column": 20, + "line": 2, }, }, "range": Array [ 30, 31, ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 33, - ], "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 36, - ], - "type": "Numeric", - "value": "10", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 36, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ @@ -39641,12 +39328,12 @@ Object { Object { "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 38, - "line": 1, + "column": 0, + "line": 4, }, }, "range": Array [ @@ -39654,321 +39341,264 @@ Object { 39, ], "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/defaults-object-longform-multi.src 1`] = ` +exports[`javascript fixtures/destructuring/class-method-params-defaults-array.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 27, - "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": "foo", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, }, "start": Object { "column": 4, - "line": 1, + "line": 2, }, }, - "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", + "range": Array [ + 14, + 41, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 5, - "line": 1, + "column": 24, + "line": 2, }, }, - "method": false, "range": Array [ - 5, - 9, + 34, + 41, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - }, + "type": "BlockStatement", }, - 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", + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, + "start": Object { + "column": 7, + "line": 2, }, - "method": false, - "range": Array [ - 11, - 20, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, + }, + "params": Array [ + Object { + "elements": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", }, - "start": Object { - "column": 14, - "line": 1, + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, }, + "range": Array [ + 19, + 24, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + "type": "AssignmentPattern", }, - "name": "y", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 20, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", }, - "start": Object { - "column": 18, - "line": 1, + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, }, + "range": Array [ + 26, + 31, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "raw": "4", + "type": "Literal", + "value": 4, + }, + "type": "AssignmentPattern", }, - "range": Array [ - 18, - 20, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 22, - 23, ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 22, - 26, - ], - "shorthand": false, - "type": "Property", - "value": Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 8, + "line": 2, }, }, - "name": "z", "range": Array [ - 25, - 26, + 18, + 32, ], - "type": "Identifier", + "type": "ArrayPattern", }, - }, - ], - "range": Array [ - 4, - 27, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, + ], + "range": Array [ + 17, + 41, + ], + "type": "FunctionExpression", }, - "name": "a", - "range": Array [ - 30, - 31, - ], - "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 31, - "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, - 31, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 8, + 43, + ], + "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": 32, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, @@ -39977,15 +39607,16 @@ Object { }, "range": Array [ 0, - 32, + 43, ], - "type": "VariableDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -39994,14 +39625,14 @@ Object { }, "range": Array [ 0, - 32, + 44, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -40011,612 +39642,651 @@ 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, - "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": "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": 9, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 8, - 9, + 14, + 17, ], "type": "Identifier", - "value": "x", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 9, - 10, + 17, + 18, ], "type": "Punctuator", - "value": ",", + "value": "(", }, 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, + 18, + 19, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ - 12, - 13, + 19, + 22, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 12, + "line": 2, }, }, "range": Array [ - 14, - 15, + 22, + 23, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 16, - 17, + 23, + 24, ], - "type": "Punctuator", - "value": "=", + "type": "Numeric", + "value": "3", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 18, - 20, + 24, + 25, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 20, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 20, - 21, + 26, + 29, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 20, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 19, + "line": 2, }, }, "range": Array [ - 22, - 23, + 29, + 30, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 21, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 20, + "line": 2, }, }, "range": Array [ - 23, - 24, + 30, + 31, ], - "type": "Punctuator", - "value": ":", + "type": "Numeric", + "value": "4", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 21, + "line": 2, }, }, "range": Array [ - 25, - 26, + 31, + 32, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 26, - "line": 1, + "column": 22, + "line": 2, }, }, "range": Array [ - 26, - 27, + 32, + 33, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 28, - "line": 1, + "column": 24, + "line": 2, }, }, "range": Array [ - 28, - 29, + 34, + 35, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 30, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 30, - 31, + 40, + 41, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 31, - "line": 1, + "column": 0, + "line": 4, }, }, "range": Array [ - 31, - 32, + 42, + 43, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/defaults-object-mixed-multi.src 1`] = ` +exports[`javascript fixtures/destructuring/class-method-params-defaults-object.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": 21, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { "column": 4, - "line": 1, + "line": 2, }, }, - "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", + "range": Array [ + 14, + 41, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 5, - "line": 1, + "column": 24, + "line": 2, }, }, - "method": false, "range": Array [ - 5, - 6, + 34, + 41, ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 2, }, }, - Object { - "computed": false, - "key": Object { + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { "column": 8, - "line": 1, + "line": 2, }, }, - "name": "y", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 8, - 17, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", }, - "start": Object { - "column": 11, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 19, + 24, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 19, + 24, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + "type": "AssignmentPattern", }, }, - "name": "y", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", }, - "start": Object { - "column": 15, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 26, + 31, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 31, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + "type": "AssignmentPattern", }, }, - "range": Array [ - 15, - 17, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 19, - 20, ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 19, - 20, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "z", "range": Array [ - 19, - 20, + 18, + 32, ], - "type": "Identifier", + "type": "ObjectPattern", }, - }, - ], - "range": Array [ - 4, - 21, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, + ], + "range": Array [ + 17, + 41, + ], + "type": "FunctionExpression", }, - "name": "a", - "range": Array [ - 24, - 25, - ], - "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 25, - "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, - 25, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 8, + 43, + ], + "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": 26, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, @@ -40625,15 +40295,16 @@ Object { }, "range": Array [ 0, - 26, + 43, ], - "type": "VariableDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -40642,14 +40313,14 @@ Object { }, "range": Array [ 0, - 26, + 44, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -40659,133 +40330,133 @@ 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": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 9, "line": 1, }, "start": Object { - "column": 5, + "column": 8, "line": 1, }, }, "range": Array [ - 5, - 6, + 8, + 9, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 7, - "line": 1, + "line": 2, }, "start": Object { - "column": 6, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 6, - 7, + 14, + 17, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 8, - 9, + 17, + 18, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 9, - 10, + 18, + 19, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 12, - "line": 1, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ - 11, - 12, + 19, + 22, ], "type": "Identifier", - "value": "y", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 12, + "line": 2, }, }, "range": Array [ - 13, - 14, + 22, + 23, ], "type": "Punctuator", "value": "=", @@ -40793,71 +40464,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 15, - 17, + 23, + 24, ], "type": "Numeric", - "value": "10", + "value": "3", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 17, - 18, + 24, + 25, ], "type": "Punctuator", "value": ",", }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + "value": "baz", + }, Object { "loc": Object { "end": Object { "column": 20, - "line": 1, + "line": 2, }, "start": Object { "column": 19, - "line": 1, + "line": 2, }, }, "range": Array [ - 19, - 20, + 29, + 30, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { "column": 21, - "line": 1, + "line": 2, }, "start": Object { "column": 20, - "line": 1, + "line": 2, }, }, "range": Array [ - 20, - 21, + 30, + 31, + ], + "type": "Numeric", + "value": "3", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 31, + 32, ], "type": "Punctuator", "value": "}", @@ -40866,333 +40573,336 @@ Object { "loc": Object { "end": Object { "column": 23, - "line": 1, + "line": 2, }, "start": Object { "column": 22, - "line": 1, + "line": 2, }, }, "range": Array [ - 22, - 23, + 32, + 33, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { "column": 25, - "line": 1, + "line": 2, }, "start": Object { "column": 24, - "line": 1, + "line": 2, }, }, "range": Array [ - 24, - 25, + 34, + 35, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 25, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 25, - 26, + 40, + 41, ], "type": "Punctuator", - "value": ";", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/defaults-object-multi.src 1`] = ` +exports[`javascript fixtures/destructuring/class-method-params-object.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": 18, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { "column": 4, - "line": 1, + "line": 2, }, }, - "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": 11, - "line": 1, + "range": Array [ + 14, + 37, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 3, }, "start": Object { - "column": 5, - "line": 1, + "column": 20, + "line": 2, }, }, - "method": false, "range": Array [ - 5, - 11, + 30, + 37, ], - "shorthand": true, - "type": "Property", - "value": 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": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, + "type": "BlockStatement", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, }, - "method": false, - "range": Array [ - 13, - 14, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", + "start": Object { + "column": 7, + "line": 2, }, }, - Object { - "computed": false, - "key": Object { + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 8, + "line": 2, }, }, - "name": "z", - "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, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 19, + 22, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, }, - "start": Object { - "column": 16, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 24, + 27, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "method": false, + "range": Array [ + 24, + 27, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 24, + 27, + ], + "type": "Identifier", + }, }, - }, - "name": "z", + ], "range": Array [ - 16, - 17, + 18, + 28, ], - "type": "Identifier", + "type": "ObjectPattern", }, - }, - ], - "range": Array [ - 4, - 18, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, + ], + "range": Array [ + 17, + 37, + ], + "type": "FunctionExpression", }, - "name": "a", - "range": Array [ - 21, - 22, - ], - "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 22, - "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, - 22, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 8, + 39, + ], + "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": 23, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, @@ -41201,15 +40911,16 @@ Object { }, "range": Array [ 0, - 23, + 39, ], - "type": "VariableDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -41218,14 +40929,14 @@ Object { }, "range": Array [ 0, - 23, + 40, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -41235,133 +40946,133 @@ 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": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 9, "line": 1, }, "start": Object { - "column": 5, + "column": 8, "line": 1, }, }, "range": Array [ - 5, - 6, + 8, + 9, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 7, - 8, + 14, + 17, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 9, - 11, + 17, + 18, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "(", }, 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, + 18, + 19, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ - 13, - 14, + 19, + 22, ], "type": "Identifier", - "value": "y", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 12, + "line": 2, }, }, "range": Array [ - 14, - 15, + 22, + 23, ], "type": "Punctuator", "value": ",", @@ -41370,34 +41081,34 @@ Object { "loc": Object { "end": Object { "column": 17, - "line": 1, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 16, - 17, + 24, + 27, ], "type": "Identifier", - "value": "z", + "value": "baz", }, Object { "loc": Object { "end": Object { "column": 18, - "line": 1, + "line": 2, }, "start": Object { "column": 17, - "line": 1, + "line": 2, }, }, "range": Array [ - 17, - 18, + 27, + 28, ], "type": "Punctuator", "value": "}", @@ -41405,370 +41116,196 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 18, + "line": 2, }, }, "range": Array [ - 19, - 20, + 28, + 29, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 21, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 20, + "line": 2, }, }, "range": Array [ - 21, - 22, + 30, + 31, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 22, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 22, - 23, + 36, + 37, ], "type": "Punctuator", - "value": ";", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/defaults-object-nested-all.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-array.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 26, - "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", + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "left": Object { "loc": Object { "end": Object { - "column": 11, + "column": 2, "line": 1, }, "start": Object { - "column": 5, + "column": 1, "line": 1, }, }, - "method": false, + "name": "x", "range": Array [ - 5, - 11, + 1, + 2, ], - "shorthand": true, - "type": "Property", - "value": 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": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 11, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, + "type": "Identifier", }, - Object { - "computed": false, - "key": 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": 5, + "line": 1, }, - "kind": "init", + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 5, + ], + "right": Object { "loc": Object { "end": Object { - "column": 25, + "column": 5, "line": 1, }, "start": Object { - "column": 13, + "column": 3, "line": 1, }, }, - "method": false, "range": Array [ - 13, - 25, + 3, + 5, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 18, - 24, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 24, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - ], - "range": Array [ - 16, - 25, - ], - "type": "ObjectPattern", - }, - }, - ], - "range": Array [ - 4, - 26, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, + "raw": "10", + "type": "Literal", + "value": 10, }, + "type": "AssignmentPattern", }, - "name": "a", - "range": Array [ - 29, - 30, - ], - "type": "Identifier", + ], + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "operator": "=", + "range": Array [ + 0, + 10, + ], + "right": Object { "loc": Object { "end": Object { - "column": 30, + "column": 10, "line": 1, }, "start": Object { - "column": 4, + "column": 9, "line": 1, }, }, + "name": "x", "range": Array [ - 4, - 30, + 9, + 10, ], - "type": "VariableDeclarator", + "type": "Identifier", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 31, + "column": 10, "line": 1, }, "start": Object { @@ -41778,14 +41315,14 @@ Object { }, "range": Array [ 0, - 31, + 10, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 31, + "column": 10, "line": 1, }, "start": Object { @@ -41795,14 +41332,14 @@ Object { }, "range": Array [ 0, - 31, + 10, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -41812,43 +41349,25 @@ 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": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 2, "line": 1, }, "start": Object { - "column": 5, + "column": 1, "line": 1, }, }, "range": Array [ - 5, - 6, + 1, + 2, ], "type": "Identifier", "value": "x", @@ -41856,17 +41375,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 3, "line": 1, }, "start": Object { - "column": 7, + "column": 2, "line": 1, }, }, "range": Array [ - 7, - 8, + 2, + 3, ], "type": "Punctuator", "value": "=", @@ -41874,17 +41393,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 5, "line": 1, }, "start": Object { - "column": 9, + "column": 3, "line": 1, }, }, "range": Array [ - 9, - 11, + 3, + 5, ], "type": "Numeric", "value": "10", @@ -41892,245 +41411,72 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 6, "line": 1, }, "start": Object { - "column": 11, + "column": 5, "line": 1, }, }, "range": Array [ - 11, - 12, + 5, + 6, ], "type": "Punctuator", - "value": ",", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { - "column": 13, + "column": 7, "line": 1, }, }, "range": Array [ - 13, - 14, + 7, + 8, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 10, "line": 1, }, "start": Object { - "column": 14, + "column": 9, "line": 1, }, }, "range": Array [ - 14, - 15, + 9, + 10, ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "x", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/defaults-object-nested-multi.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-array-all.src 1`] = ` Object { "body": Array [ Object { "declarations": Array [ Object { "id": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ + "elements": Array [ Object { - "computed": false, - "key": Object { + "left": Object { "loc": Object { "end": Object { "column": 6, @@ -42148,7 +41494,6 @@ Object { ], "type": "Identifier", }, - "kind": "init", "loc": Object { "end": Object { "column": 11, @@ -42159,71 +41504,33 @@ Object { "line": 1, }, }, - "method": false, "range": Array [ 5, 11, ], - "shorthand": true, - "type": "Property", - "value": 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", - }, + "right": Object { "loc": Object { "end": Object { "column": 11, "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, "range": Array [ - 5, + 9, 11, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", + "raw": "10", + "type": "Literal", + "value": 10, }, + "type": "AssignmentPattern", }, Object { - "computed": false, - "key": Object { + "left": Object { "loc": Object { "end": Object { "column": 14, @@ -42241,10 +41548,9 @@ Object { ], "type": "Identifier", }, - "kind": "init", "loc": Object { "end": Object { - "column": 21, + "column": 18, "line": 1, }, "start": Object { @@ -42252,118 +41558,123 @@ Object { "line": 1, }, }, - "method": false, "range": Array [ 13, - 21, + 18, ], - "shorthand": false, - "type": "Property", - "value": Object { + "right": Object { "loc": Object { "end": Object { - "column": 21, + "column": 18, "line": 1, }, "start": Object { - "column": 16, + "column": 17, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 18, - 19, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - }, - }, + "range": Array [ + 17, + 18, ], + "raw": "5", + "type": "Literal", + "value": 5, + }, + "type": "AssignmentPattern", + }, + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "z", "range": Array [ - 16, + 20, 21, ], - "type": "ObjectPattern", + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 25, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "raw": "1", + "type": "Literal", + "value": 1, }, + "type": "AssignmentPattern", }, ], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, "range": Array [ 4, - 22, + 26, ], - "type": "ObjectPattern", + "type": "ArrayPattern", }, "init": Object { "loc": Object { "end": Object { - "column": 26, + "column": 30, "line": 1, }, "start": Object { - "column": 25, + "column": 29, "line": 1, }, }, "name": "a", "range": Array [ - 25, - 26, + 29, + 30, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 26, + "column": 30, "line": 1, }, "start": Object { @@ -42373,7 +41684,7 @@ Object { }, "range": Array [ 4, - 26, + 30, ], "type": "VariableDeclarator", }, @@ -42381,7 +41692,7 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 27, + "column": 31, "line": 1, }, "start": Object { @@ -42391,14 +41702,14 @@ Object { }, "range": Array [ 0, - 27, + 31, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 27, + "column": 31, "line": 1, }, "start": Object { @@ -42408,7 +41719,7 @@ Object { }, "range": Array [ 0, - 27, + 31, ], "sourceType": "script", "tokens": Array [ @@ -42446,7 +41757,7 @@ Object { 5, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { @@ -42541,38 +41852,38 @@ Object { 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": 17, + "column": 18, "line": 1, }, "start": Object { - "column": 16, + "column": 17, "line": 1, }, }, "range": Array [ - 16, 17, + 18, ], - "type": "Punctuator", - "value": "{", + "type": "Numeric", + "value": "5", }, Object { "loc": Object { @@ -42589,8 +41900,8 @@ Object { 18, 19, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { @@ -42607,44 +41918,44 @@ Object { 20, 21, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 23, "line": 1, }, "start": Object { - "column": 21, + "column": 22, "line": 1, }, }, "range": Array [ - 21, 22, + 23, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 25, "line": 1, }, "start": Object { - "column": 23, + "column": 24, "line": 1, }, }, "range": Array [ - 23, 24, + 25, ], - "type": "Punctuator", - "value": "=", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { @@ -42661,23 +41972,59 @@ Object { 25, 26, ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], "type": "Identifier", "value": "a", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 31, "line": 1, }, "start": Object { - "column": 26, + "column": 30, "line": 1, }, }, "range": Array [ - 26, - 27, + 30, + 31, ], "type": "Punctuator", "value": ";", @@ -42687,486 +42034,24782 @@ Object { } `; -exports[`javascript fixtures/destructuring/destructured-array-catch.src 1`] = ` +exports[`javascript fixtures/destructuring/defaults-array-longform-nested-multi.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "block": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "b", - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "method": false, - "range": Array [ - 35, - 36, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "b", - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 34, - 37, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "name": "a", - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 34, - 41, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 6, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 5, + "line": 1, }, }, + "name": "x", "range": Array [ - 30, - 42, + 5, + 6, ], - "type": "VariableDeclaration", + "type": "Identifier", }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, + "kind": "init", + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, }, - "start": Object { - "column": 6, - "line": 2, + "method": false, + "range": Array [ + 5, + 9, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", }, }, - "range": Array [ - 24, - 46, - ], - "type": "BlockStatement", - }, - "finalizer": null, - "handler": Object { - "body": Object { - "body": Array [], + 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": 3, - "line": 6, + "column": 15, + "line": 1, }, "start": Object { - "column": 17, - "line": 5, + "column": 11, + "line": 1, }, }, + "method": false, "range": Array [ - 64, - 69, + 11, + 15, ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 5, + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", }, }, - "param": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, }, - "name": "stack", - "range": Array [ - 56, - 61, - ], - "type": "Identifier", }, - ], + "name": "z", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 15, - "line": 5, + "column": 32, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 17, + "line": 1, }, }, + "method": false, "range": Array [ - 55, - 62, + 17, + 32, ], - "type": "ArrayPattern", + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 22, + 31, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 31, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 31, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 20, + 32, + ], + "type": "ObjectPattern", + }, }, - "range": Array [ - 49, - 69, - ], - "type": "CatchClause", - }, + ], + "range": Array [ + 4, + 34, + ], + "type": "ObjectPattern", + }, + "init": Object { "loc": Object { "end": Object { - "column": 3, - "line": 6, + "column": 38, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 37, + "line": 1, }, }, + "name": "b", "range": Array [ - 20, - 69, + 37, + 38, ], - "type": "TryStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 7, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 71, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, + "type": "Identifier", }, - "start": Object { - "column": 9, - "line": 1, + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 38, + ], + "type": "VariableDeclarator", }, - "name": "x", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 1, - "line": 7, + "column": 39, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, + "range": Array [ + 0, + 39, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 31, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/defaults-array-multi.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + 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": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 18, + ], + "type": "ArrayPattern", + }, + "init": 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": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 22, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/defaults-array-nested-all.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + 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": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + Object { + "elements": Array [ + Object { + "left": 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": 21, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 21, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 21, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 22, + ], + "type": "ArrayPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 23, + ], + "type": "ArrayPattern", + }, + "init": 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": 27, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 27, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "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": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 21, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/defaults-array-nested-multi.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + 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": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + Object { + "elements": Array [ + 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": 18, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 18, + ], + "type": "ArrayPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 19, + ], + "type": "ArrayPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 23, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/defaults-object.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, + }, + }, + "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": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 11, + ], + "shorthand": true, + "type": "Property", + "value": 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": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 4, + 12, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "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": 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": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + "value": "x", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/defaults-object-all.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "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": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 11, + ], + "shorthand": true, + "type": "Property", + "value": 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": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 13, + 18, + ], + "shorthand": true, + "type": "Property", + "value": 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, + }, + }, + "range": Array [ + 13, + 18, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "raw": "5", + "type": "Literal", + "value": 5, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 20, + 25, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 25, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 4, + 26, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 29, + 30, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 30, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Numeric", + "value": "5", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/defaults-object-assign.src 1`] = ` +Object { + "body": Array [ + Object { + "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", + }, + "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": 9, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "Object", + "range": Array [ + 3, + 9, + ], + "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": 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": 19, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "String", + "range": Array [ + 13, + 19, + ], + "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 [ + 20, + 21, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "type": "AssignmentPattern", + }, + }, + ], + "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": 28, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 26, + 28, + ], + "type": "ObjectExpression", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 29, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 30, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 9, + ], + "type": "Identifier", + "value": "Object", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 19, + ], + "type": "Identifier", + "value": "String", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ")", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/defaults-object-longform.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, + }, + }, + "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": 15, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 6, + 15, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": 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": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 15, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + ], + "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, + }, + }, + "method": false, + "range": Array [ + 16, + 25, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 25, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 27, + 36, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 36, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 36, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 4, + 37, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 40, + 41, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 41, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 42, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 42, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 14, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 36, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/defaults-object-longform-multi.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 27, + "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": 9, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 9, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + }, + }, + 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": 20, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 11, + 20, + ], + "shorthand": false, + "type": "Property", + "value": 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": 20, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 20, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 20, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 22, + 26, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 4, + 27, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 31, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 32, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 32, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 20, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/defaults-object-mixed-multi.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, + }, + }, + "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": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 6, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 8, + 17, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 17, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 19, + 20, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 4, + 21, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 24, + 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": 26, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 17, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/defaults-object-multi.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": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 11, + ], + "shorthand": true, + "type": "Property", + "value": 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": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 13, + 14, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "z", + "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": "z", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 4, + 18, + ], + "type": "ObjectPattern", + }, + "init": 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": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 22, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/defaults-object-nested-all.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 26, + "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": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 11, + ], + "shorthand": true, + "type": "Property", + "value": 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": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 13, + 25, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 18, + 24, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 24, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 24, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 16, + 25, + ], + "type": "ObjectPattern", + }, + }, + ], + "range": Array [ + 4, + 26, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 29, + 30, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 30, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 24, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/defaults-object-nested-multi.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 22, + "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": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 11, + ], + "shorthand": true, + "type": "Property", + "value": 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": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 13, + 14, + ], + "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": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 18, + 19, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 16, + 21, + ], + "type": "ObjectPattern", + }, + }, + ], + "range": Array [ + 4, + 22, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 26, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 27, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 27, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/destructured-array-catch.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "block": Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "b", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "method": false, + "range": Array [ + 35, + 36, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "b", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 34, + 37, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "name": "a", + "range": Array [ + 40, + 41, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 34, + 41, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 30, + 42, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 24, + 46, + ], + "type": "BlockStatement", + }, + "finalizer": null, + "handler": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 17, + "line": 5, + }, + }, + "range": Array [ + 64, + 69, + ], + "type": "BlockStatement", + }, + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "param": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 9, + "line": 5, + }, + }, + "name": "stack", + "range": Array [ + 56, + 61, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "range": Array [ + 55, + 62, + ], + "type": "ArrayPattern", + }, + "range": Array [ + 49, + 69, + ], + "type": "CatchClause", + }, + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 20, + 69, + ], + "type": "TryStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 7, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 71, + ], + "type": "BlockStatement", + }, + "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": 1, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "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", + }, + }, + ], + "range": Array [ + 11, + 14, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 0, + 71, + ], + "type": "FunctionDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 7, + }, + "start": Object { + "column": 1, + "line": 7, + }, + }, + "range": Array [ + 71, + 72, + ], + "type": "EmptyStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 2, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 72, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 20, + 23, + ], + "type": "Keyword", + "value": "try", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 30, + 33, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 49, + 54, + ], + "type": "Keyword", + "value": "catch", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 5, + }, + "start": Object { + "column": 7, + "line": 5, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 9, + "line": 5, + }, + }, + "range": Array [ + 56, + 61, + ], + "type": "Identifier", + "value": "stack", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "range": Array [ + 61, + 62, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 5, + }, + "start": Object { + "column": 15, + "line": 5, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 5, + }, + "start": Object { + "column": 17, + "line": 5, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 6, + }, + }, + "range": Array [ + 68, + 69, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 7, + }, + }, + "range": Array [ + 70, + 71, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 7, + }, + "start": Object { + "column": 1, + "line": 7, + }, + }, + "range": Array [ + 71, + 72, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/destructured-object-catch.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "block": Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "b", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "method": false, + "range": Array [ + 35, + 36, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "name": "b", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 34, + 37, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "name": "a", + "range": Array [ + 40, + 41, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 34, + 41, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 30, + 42, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 24, + 46, + ], + "type": "BlockStatement", + }, + "finalizer": null, + "handler": Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 17, + "line": 5, + }, + }, + "range": Array [ + 64, + 69, + ], + "type": "BlockStatement", + }, + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "param": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 9, + "line": 5, + }, + }, + "name": "stack", + "range": Array [ + 56, + 61, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 9, + "line": 5, + }, + }, + "method": false, + "range": Array [ + 56, + 61, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 9, + "line": 5, + }, + }, + "name": "stack", + "range": Array [ + 56, + 61, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 55, + 62, + ], + "type": "ObjectPattern", + }, + "range": Array [ + 49, + 69, + ], + "type": "CatchClause", + }, + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 20, + 69, + ], + "type": "TryStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 7, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 71, + ], + "type": "BlockStatement", + }, + "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": 1, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "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", + }, + }, + ], + "range": Array [ + 11, + 14, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 0, + 71, + ], + "type": "FunctionDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 7, + }, + "start": Object { + "column": 1, + "line": 7, + }, + }, + "range": Array [ + 71, + 72, + ], + "type": "EmptyStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 2, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 72, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 20, + 23, + ], + "type": "Keyword", + "value": "try", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 30, + 33, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 49, + 54, + ], + "type": "Keyword", + "value": "catch", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 5, + }, + "start": Object { + "column": 7, + "line": 5, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 5, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 5, + }, + "start": Object { + "column": 9, + "line": 5, + }, + }, + "range": Array [ + 56, + 61, + ], + "type": "Identifier", + "value": "stack", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "range": Array [ + 61, + 62, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 5, + }, + "start": Object { + "column": 15, + "line": 5, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 5, + }, + "start": Object { + "column": 17, + "line": 5, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 6, + }, + }, + "range": Array [ + 68, + 69, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 7, + }, + }, + "range": Array [ + 70, + 71, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 7, + }, + "start": Object { + "column": 1, + "line": 7, + }, + }, + "range": Array [ + 71, + 72, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/invalid-defaults-object-assign.src 1`] = ` +Object { + "body": Array [ + Object { + "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", + }, + "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": 9, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "Object", + "range": Array [ + 3, + 9, + ], + "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": 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": 19, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "String", + "range": Array [ + 13, + 19, + ], + "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 [ + 20, + 21, + ], + "raw": "0", + "type": "Literal", + "value": 0, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 1, + 23, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 29, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 27, + 29, + ], + "type": "ObjectExpression", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 29, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 30, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 9, + ], + "type": "Identifier", + "value": "Object", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 19, + ], + "type": "Identifier", + "value": "String", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Numeric", + "value": "0", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/named-param.src 1`] = ` +Object { + "body": Array [ + Object { + "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": 15, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "responseText", + "range": Array [ + 3, + 15, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 3, + 21, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "text", + "range": Array [ + 17, + 21, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 1, + 23, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 1, + 29, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "res", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 15, + ], + "type": "Identifier", + "value": "responseText", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 21, + ], + "type": "Identifier", + "value": "text", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + "value": "res", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/nested-array.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + null, + Object { + "elements": Array [ + null, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 15, + ], + "type": "ArrayPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 16, + ], + "type": "ArrayPattern", + }, + "init": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "raw": "3", + "type": "Literal", + "value": 3, + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "raw": "4", + "type": "Literal", + "value": 4, + }, + ], + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 29, + ], + "type": "ArrayExpression", + }, + ], + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 30, + ], + "type": "ArrayExpression", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 30, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Numeric", + "value": "2", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Numeric", + "value": "3", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Numeric", + "value": "4", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/nested-object.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 24, + "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": 9, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 9, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 11, + 22, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 14, + "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": 20, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 16, + 20, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 14, + 22, + ], + "type": "ObjectPattern", + }, + }, + ], + "range": Array [ + 4, + 24, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 52, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 29, + 30, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 29, + 35, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 35, + ], + "raw": "\\"3\\"", + "type": "Literal", + "value": "3", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 37, + 38, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 37, + 50, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 42, + 43, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 42, + 48, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 48, + ], + "raw": "\\"b\\"", + "type": "Literal", + "value": "b", + }, + }, + ], + "range": Array [ + 40, + 50, + ], + "type": "ObjectExpression", + }, + }, + ], + "range": Array [ + 27, + 52, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 52, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 52, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 53, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 53, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 53, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 53, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 35, + ], + "type": "String", + "value": "\\"3\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 48, + ], + "type": "String", + "value": "\\"b\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + }, + "start": Object { + "column": 49, + "line": 1, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 52, + "line": 1, + }, + "start": Object { + "column": 51, + "line": 1, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 1, + }, + "start": Object { + "column": 52, + "line": 1, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/object-var-named.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "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": "a", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 8, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 4, + 9, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 12, + 14, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 14, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/object-var-undefined.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, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 6, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 4, + 7, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 10, + 12, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 12, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "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": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/param-defaults-array.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 23, + ], + "type": "BlockStatement", + }, + "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": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "elements": Array [ + 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": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 18, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 19, + ], + "type": "ArrayPattern", + }, + ], + "range": Array [ + 0, + 23, + ], + "type": "FunctionDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/param-defaults-object.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 23, + ], + "type": "BlockStatement", + }, + "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": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 19, + "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": "x", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 12, + 18, + ], + "shorthand": true, + "type": "Property", + "value": 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": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 18, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 11, + 19, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 0, + 23, + ], + "type": "FunctionDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/param-defaults-object-nested.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 38, + ], + "type": "BlockStatement", + }, + "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": 38, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 34, + "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": "x", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 12, + 18, + ], + "shorthand": true, + "type": "Property", + "value": 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": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 18, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 20, + 33, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 25, + 31, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 31, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 31, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 23, + 33, + ], + "type": "ObjectPattern", + }, + }, + ], + "range": Array [ + 11, + 34, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 0, + 38, + ], + "type": "FunctionDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "EmptyStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 31, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/params-array.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "BlockStatement", + }, + "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 [ + Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 19, + ], + "type": "ArrayPattern", + }, + ], + "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", + }, + ], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/params-array-wrapped.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 23, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "params": Array [ + Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + 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": 20, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 20, + ], + "type": "ArrayPattern", + }, + ], + "range": Array [ + 1, + 23, + ], + "type": "FunctionExpression", + }, + "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": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 25, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 9, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/params-multi-object.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "BlockStatement", + }, + "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 [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "b", + "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": "b", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 14, + 19, + ], + "type": "ObjectPattern", + }, + ], + "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", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/params-nested-array.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 27, + ], + "type": "BlockStatement", + }, + "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": 27, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + null, + Object { + "elements": Array [ + null, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 22, + ], + "type": "ArrayPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 23, + ], + "type": "ArrayPattern", + }, + ], + "range": Array [ + 0, + 27, + ], + "type": "FunctionDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "EmptyStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/params-nested-object.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 35, + ], + "type": "BlockStatement", + }, + "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": 35, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 31, + "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": "x", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 12, + 16, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 18, + 29, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 29, + "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": "a", + "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, + }, + }, + "name": "b", + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 21, + 29, + ], + "type": "ObjectPattern", + }, + }, + ], + "range": Array [ + 11, + 31, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 0, + 35, + ], + "type": "FunctionDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "EmptyStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 36, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/params-object.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "BlockStatement", + }, + "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 [ + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 13, + 14, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "b", + "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": "b", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 11, + 19, + ], + "type": "ObjectPattern", + }, + ], + "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", + }, + ], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/params-object-wrapped.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 23, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 12, + "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 { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 17, + 18, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 12, + 20, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 1, + 23, + ], + "type": "FunctionExpression", + }, + "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": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 25, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 9, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring/sparse-array.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 1, + 2, + ], + "type": "Identifier", + }, + null, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 14, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "array", + "range": Array [ + 9, + 14, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 14, + ], + "type": "Identifier", + "value": "array", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-array.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "async": false, + "body": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 4, + ], + "type": "ArrayPattern", + }, + ], + "range": Array [ + 0, + 10, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 8, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-nested-array.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "async": false, + "body": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + Object { + "elements": Array [ + 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": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "ArrayPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 9, + ], + "type": "ArrayPattern", + }, + ], + "range": Array [ + 0, + 15, + ], + "type": "ArrowFunctionExpression", + }, + "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": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 13, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-nested-object.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "async": false, + "body": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 11, + "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": "y", + "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": "y", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 10, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 8, + 9, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 7, + 10, + ], + "type": "ObjectPattern", + }, + }, + ], + "range": Array [ + 1, + 11, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 0, + 17, + ], + "type": "ArrowFunctionExpression", + }, + "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": 18, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 15, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "async": false, + "body": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 2, + 5, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 2, + 8, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 10, + 20, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "bar", + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 13, + 19, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 12, + 20, + ], + "type": "ObjectPattern", + }, + }, + ], + "range": Array [ + 1, + 21, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 0, + 27, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 5, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-object.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "async": false, + "body": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "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": "y", + "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": "y", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 1, + 4, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 0, + 10, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 8, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-arrowFunctions/param-defaults-array.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "async": false, + "body": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "elements": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 8, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 8, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 9, + ], + "type": "ArrayPattern", + }, + ], + "range": Array [ + 0, + 15, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 8, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 13, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "x", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-arrowFunctions/param-defaults-object.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "async": false, + "body": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": 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": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 2, + 8, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 8, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 8, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 1, + 9, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 0, + 15, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 8, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 13, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "x", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-arrowFunctions/param-defaults-object-nested.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "async": false, + "body": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 33, + 34, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 35, + ], + "type": "ArrayExpression", + }, + "expression": true, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "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": "x", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 2, + 8, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 8, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 8, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 10, + 23, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 15, + 21, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "left": 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": 21, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 21, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 21, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 13, + 23, + ], + "type": "ObjectPattern", + }, + }, + ], + "range": Array [ + 1, + 24, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 0, + 35, + ], + "type": "ArrowFunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 35, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 35, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 8, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 21, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 28, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "]", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-blockBindings/array-const-undefined.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + 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": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "ArrayPattern", + }, + "init": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 14, + ], + "type": "ArrayExpression", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 14, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-blockBindings/array-let-undefined.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + 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": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "ArrayPattern", + }, + "init": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 12, + ], + "type": "ArrayExpression", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 12, + ], + "type": "VariableDeclarator", + }, + ], + "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": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-blockBindings/object-const-named.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, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 7, + 10, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 6, + 11, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 14, + 16, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 16, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-blockBindings/object-const-undefined.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, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 7, + 8, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 6, + 9, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 12, + 14, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 14, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-blockBindings/object-let-named.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "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": "a", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 8, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 4, + 9, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 12, + 14, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 14, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-blockBindings/object-let-undefined.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, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 6, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 4, + 7, + ], + "type": "ObjectPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 10, + 12, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 12, + ], + "type": "VariableDeclarator", + }, + ], + "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": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-defaultParams/param-array.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 24, + ], + "type": "BlockStatement", + }, + "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 { + "left": Object { + "elements": Array [ + 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": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 14, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 20, + ], + "right": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 20, + ], + "type": "ArrayExpression", + }, + "type": "AssignmentPattern", + }, + ], + "range": Array [ + 0, + 24, + ], + "type": "FunctionDeclaration", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "EmptyStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 25, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-defaultParams/param-object.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": "f", + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 30, + ], + "right": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 30, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "params": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 16, "line": 1, }, "start": Object { - "column": 12, + "column": 13, "line": 1, }, }, - "name": "a", + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "x", + "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": "x", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + }, + ], "range": Array [ - 12, 13, + 16, ], - "type": "Identifier", + "type": "ObjectPattern", }, - "kind": "init", "loc": Object { "end": Object { - "column": 13, + "column": 26, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 26, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 20, + 25, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, + }, + ], + "range": Array [ + 19, + 26, + ], + "type": "ObjectExpression", + }, + "type": "AssignmentPattern", + }, + ], + "range": Array [ + 4, + 30, + ], + "type": "FunctionExpression", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 12, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "type": "Numeric", + "value": "10", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-defaultParams/param-object-short.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 22, + "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": 12, + "column": 2, "line": 1, }, }, - "method": false, + "name": "f", "range": Array [ - 12, - 13, + 2, + 3, ], - "shorthand": true, - "type": "Property", - "value": Object { + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "method": true, + "range": Array [ + 2, + 21, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 13, + "column": 21, "line": 1, }, "start": Object { - "column": 12, + "column": 19, "line": 1, }, }, - "name": "a", "range": Array [ - 12, - 13, + 19, + 21, ], - "type": "Identifier", + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, }, + "params": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 7, + "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": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 5, + 6, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 4, + 7, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 17, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "x", + "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": "10", + "type": "Literal", + "value": 10, + }, + }, + ], + "range": Array [ + 10, + 17, + ], + "type": "ObjectExpression", + }, + "type": "AssignmentPattern", + }, + ], + "range": Array [ + 3, + 21, + ], + "type": "FunctionExpression", }, - ], - "range": Array [ - 11, - 14, - ], - "type": "ObjectPattern", + }, + ], + "range": Array [ + 1, + 22, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 4, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, }, + }, + "range": Array [ + 8, + 9, ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, "range": Array [ - 0, - 71, + 10, + 11, ], - "type": "FunctionDeclaration", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 7, + "column": 12, + "line": 1, }, "start": Object { - "column": 1, - "line": 7, + "column": 11, + "line": 1, }, }, "range": Array [ - 71, - 72, + 11, + 12, ], - "type": "EmptyStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 2, - "line": 7, + "type": "Identifier", + "value": "x", }, - "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, - 72, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 16, "line": 1, }, "start": Object { - "column": 0, + "column": 14, "line": 1, }, }, "range": Array [ - 0, - 8, + 14, + 16, ], - "type": "Keyword", - "value": "function", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 17, "line": 1, }, "start": Object { - "column": 9, + "column": 16, "line": 1, }, }, "range": Array [ - 9, - 10, + 16, + 17, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 18, "line": 1, }, "start": Object { - "column": 10, + "column": 17, "line": 1, }, }, "range": Array [ - 10, - 11, + 17, + 18, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 20, "line": 1, }, "start": Object { - "column": 11, + "column": 19, "line": 1, }, }, "range": Array [ - 11, - 12, + 19, + 20, ], "type": "Punctuator", "value": "{", @@ -43174,35 +66817,35 @@ Object { 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": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 22, "line": 1, }, "start": Object { - "column": 13, + "column": 21, "line": 1, }, }, "range": Array [ - 13, - 14, + 21, + 22, ], "type": "Punctuator", "value": "}", @@ -43210,17 +66853,17 @@ Object { 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": "Punctuator", "value": ")", @@ -43228,53 +66871,364 @@ Object { 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": "{", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-defaultParams/param-object-wrapped.src 1`] = ` +Object { + "body": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 32, + "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": "f", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 2, + "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": 5, - "line": 2, + "column": 1, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 20, - 23, + 0, + 1, ], - "type": "Keyword", - "value": "try", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 2, + "line": 1, }, "start": Object { - "column": 6, - "line": 2, + "column": 1, + "line": 1, }, }, "range": Array [ - 24, - 25, + 1, + 2, ], "type": "Punctuator", "value": "{", @@ -43282,251 +67236,251 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 3, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 2, + "line": 1, }, }, "range": Array [ - 30, - 33, + 2, + 3, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 4, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 3, + "line": 1, }, }, "range": Array [ - 34, - 35, + 3, + 4, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 3, + "column": 13, + "line": 1, }, "start": Object { - "column": 9, - "line": 3, + "column": 5, + "line": 1, }, }, "range": Array [ - 35, - 36, + 5, + 13, ], - "type": "Identifier", - "value": "b", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 10, - "line": 3, + "column": 13, + "line": 1, }, }, "range": Array [ - 36, - 37, + 13, + 14, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 12, - "line": 3, + "column": 14, + "line": 1, }, }, "range": Array [ - 38, - 39, + 14, + 15, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 16, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 15, + "line": 1, }, }, "range": Array [ - 40, - 41, + 15, + 16, ], "type": "Identifier", - "value": "a", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 15, - "line": 3, + "column": 16, + "line": 1, }, }, "range": Array [ - 41, - 42, + 16, + 17, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 19, + "line": 1, }, "start": Object { - "column": 2, - "line": 4, + "column": 18, + "line": 1, }, }, "range": Array [ - 45, - 46, + 18, + 19, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 21, + "line": 1, }, "start": Object { - "column": 2, - "line": 5, + "column": 20, + "line": 1, }, }, "range": Array [ - 49, - 54, + 20, + 21, ], - "type": "Keyword", - "value": "catch", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 5, + "column": 22, + "line": 1, }, "start": Object { - "column": 7, - "line": 5, + "column": 21, + "line": 1, }, }, "range": Array [ - 54, - 55, + 21, + 22, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 23, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 22, + "line": 1, }, }, "range": Array [ - 55, - 56, + 22, + 23, ], "type": "Punctuator", - "value": "[", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 5, + "column": 26, + "line": 1, }, "start": Object { - "column": 9, - "line": 5, + "column": 24, + "line": 1, }, }, "range": Array [ - 56, - 61, + 24, + 26, ], - "type": "Identifier", - "value": "stack", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 5, + "column": 27, + "line": 1, }, "start": Object { - "column": 14, - "line": 5, + "column": 26, + "line": 1, }, }, "range": Array [ - 61, - 62, + 26, + 27, ], "type": "Punctuator", - "value": "]", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 5, + "column": 28, + "line": 1, }, "start": Object { - "column": 15, - "line": 5, + "column": 27, + "line": 1, }, }, "range": Array [ - 62, - 63, + 27, + 28, ], "type": "Punctuator", "value": ")", @@ -43534,17 +67488,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, - "line": 5, + "column": 30, + "line": 1, }, "start": Object { - "column": 17, - "line": 5, + "column": 29, + "line": 1, }, }, "range": Array [ - 64, - 65, + 29, + 30, ], "type": "Punctuator", "value": "{", @@ -43552,17 +67506,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 3, - "line": 6, + "column": 31, + "line": 1, }, "start": Object { - "column": 2, - "line": 6, + "column": 30, + "line": 1, }, }, "range": Array [ - 68, - 69, + 30, + 31, ], "type": "Punctuator", "value": "}", @@ -43570,17 +67524,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 7, + "column": 32, + "line": 1, }, "start": Object { - "column": 0, - "line": 7, + "column": 31, + "line": 1, }, }, "range": Array [ - 70, - 71, + 31, + 32, ], "type": "Punctuator", "value": "}", @@ -43588,317 +67542,54 @@ Object { Object { "loc": Object { "end": Object { - "column": 2, - "line": 7, + "column": 33, + "line": 1, }, "start": Object { - "column": 1, - "line": 7, + "column": 32, + "line": 1, }, }, "range": Array [ - 71, - 72, + 32, + 33, ], "type": "Punctuator", - "value": ";", + "value": ")", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring/destructured-object-catch.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "block": Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "b", - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "method": false, - "range": Array [ - 35, - 36, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "name": "b", - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 34, - 37, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "name": "a", - "range": Array [ - 40, - 41, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 34, - 41, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 30, - 42, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 24, - 46, - ], - "type": "BlockStatement", - }, - "finalizer": null, - "handler": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "range": Array [ - 64, - 69, - ], - "type": "BlockStatement", - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 5, - }, - }, - "param": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "name": "stack", - "range": Array [ - 56, - 61, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "method": false, - "range": Array [ - 56, - 61, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 5, - }, - "start": Object { - "column": 9, - "line": 5, - }, - }, - "name": "stack", - "range": Array [ - 56, - 61, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 55, - 62, - ], - "type": "ObjectPattern", - }, - "range": Array [ - 49, - 69, - ], - "type": "CatchClause", - }, - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 20, - 69, - ], - "type": "TryStatement", - }, - ], + "loc": Object { + "end": Object { + "column": 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": 1, - "line": 7, + "column": 17, + "line": 1, }, "start": Object { "column": 16, @@ -43907,146 +67598,86 @@ Object { }, "range": Array [ 16, - 71, + 17, ], - "type": "BlockStatement", + "type": "EmptyStatement", }, - "expression": false, - "generator": false, - "id": Object { + "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": 10, + "column": 8, "line": 1, }, "start": Object { - "column": 9, + "column": 5, "line": 1, }, }, - "name": "x", "range": Array [ - 9, - 10, + 5, + 8, ], - "type": "Identifier", + "type": "ArrayPattern", }, "loc": Object { "end": Object { - "column": 1, - "line": 7, + "column": 17, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "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", - }, - }, - ], - "range": Array [ - 11, - 14, - ], - "type": "ObjectPattern", - }, - ], "range": Array [ 0, - 71, + 17, ], - "type": "FunctionDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 7, - }, - "start": Object { - "column": 1, - "line": 7, + "right": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, }, + "name": "foo", + "range": Array [ + 12, + 15, + ], + "type": "Identifier", }, - "range": Array [ - 71, - 72, - ], - "type": "EmptyStatement", + "type": "ForOfStatement", }, ], "loc": Object { "end": Object { - "column": 2, - "line": 7, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -44055,14 +67686,14 @@ Object { }, "range": Array [ 0, - 72, + 18, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 3, "line": 1, }, "start": Object { @@ -44072,100 +67703,100 @@ Object { }, "range": Array [ 0, - 8, + 3, ], "type": "Keyword", - "value": "function", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 5, "line": 1, }, "start": Object { - "column": 9, + "column": 4, "line": 1, }, }, "range": Array [ - 9, - 10, + 4, + 5, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 6, "line": 1, }, "start": Object { - "column": 10, + "column": 5, "line": 1, }, }, "range": Array [ - 10, - 11, + 5, + 6, ], "type": "Punctuator", - "value": "(", + "value": "[", }, 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": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 8, "line": 1, }, "start": Object { - "column": 12, + "column": 7, "line": 1, }, }, "range": Array [ - 12, - 13, + 7, + 8, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 11, "line": 1, }, "start": Object { - "column": 13, + "column": 9, "line": 1, }, }, "range": Array [ - 13, - 14, + 9, + 11, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "of", }, Object { "loc": Object { @@ -44174,175 +67805,368 @@ Object { "line": 1, }, "start": Object { - "column": 14, + "column": 12, "line": 1, }, }, "range": Array [ - 14, + 12, 15, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 16, "line": 1, }, "start": Object { - "column": 16, + "column": 15, "line": 1, }, }, "range": Array [ + 15, 16, - 17, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 20, - 23, + 16, + 17, ], - "type": "Keyword", - "value": "try", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-spread/complex-destructured.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, + "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, + }, + }, + "range": Array [ + 0, + 16, + ], + "type": "ArrayPattern", }, - "start": Object { - "column": 6, - "line": 2, + "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", }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "{", - }, - Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 21, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 30, - 33, + 0, + 21, ], - "type": "Keyword", - "value": "var", + "type": "ExpressionStatement", }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "{", + ], + "loc": Object { + "end": Object { + "column": 21, + "line": 1, }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "b", + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 21, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 1, + "line": 1, }, "start": Object { - "column": 10, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 36, - 37, + 0, + 1, ], "type": "Punctuator", - "value": "}", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 2, + "line": 1, }, "start": Object { - "column": 12, - "line": 3, + "column": 1, + "line": 1, }, }, "range": Array [ - 38, - 39, + 1, + 2, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 4, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 3, + "line": 1, }, }, "range": Array [ - 40, - 41, + 3, + 4, ], "type": "Identifier", "value": "a", @@ -44350,215 +68174,179 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 41, - 42, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, + "column": 5, + "line": 1, }, "start": Object { - "column": 2, - "line": 4, + "column": 4, + "line": 1, }, }, "range": Array [ - 45, - 46, + 4, + 5, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { "column": 7, - "line": 5, + "line": 1, }, "start": Object { - "column": 2, - "line": 5, + "column": 6, + "line": 1, }, }, "range": Array [ - 49, - 54, + 6, + 7, ], - "type": "Keyword", - "value": "catch", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 5, + "column": 9, + "line": 1, }, "start": Object { - "column": 7, - "line": 5, + "column": 8, + "line": 1, }, }, "range": Array [ - 54, - 55, + 8, + 9, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 10, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 9, + "line": 1, }, }, "range": Array [ - 55, - 56, + 9, + 10, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { "column": 14, - "line": 5, + "line": 1, }, "start": Object { - "column": 9, - "line": 5, + "column": 11, + "line": 1, }, }, "range": Array [ - 56, - 61, + 11, + 14, ], - "type": "Identifier", - "value": "stack", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 5, + "line": 1, }, "start": Object { "column": 14, - "line": 5, + "line": 1, }, }, "range": Array [ - 61, - 62, + 14, + 15, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { "column": 16, - "line": 5, + "line": 1, }, "start": Object { "column": 15, - "line": 5, + "line": 1, }, }, "range": Array [ - 62, - 63, + 15, + 16, ], "type": "Punctuator", - "value": ")", + "value": "]", }, Object { "loc": Object { "end": Object { "column": 18, - "line": 5, + "line": 1, }, "start": Object { "column": 17, - "line": 5, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 6, + "line": 1, }, }, "range": Array [ - 68, - 69, + 17, + 18, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 7, + "column": 20, + "line": 1, }, "start": Object { - "column": 0, - "line": 7, + "column": 19, + "line": 1, }, }, "range": Array [ - 70, - 71, + 19, + 20, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "d", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 7, + "column": 21, + "line": 1, }, "start": Object { - "column": 1, - "line": 7, + "column": 20, + "line": 1, }, }, "range": Array [ - 71, - 72, + 20, + 21, ], "type": "Punctuator", "value": ";", @@ -44568,219 +68356,123 @@ Object { } `; -exports[`javascript fixtures/destructuring/invalid-defaults-object-assign.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/destructured-array-literal.src 1`] = ` Object { "body": Array [ Object { "expression": Object { "left": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ + "elements": 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", - }, - "kind": "init", "loc": Object { "end": Object { - "column": 11, + "column": 2, "line": 1, }, "start": Object { - "column": 3, + "column": 1, "line": 1, }, }, - "method": false, + "name": "a", "range": Array [ - 3, - 11, + 1, + 2, ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, + "type": "Identifier", + }, + Object { + "argument": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, + "name": "b", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", }, - "name": "Object", - "range": Array [ - 3, - 9, - ], - "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": 10, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, }, + "name": "c", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", }, - "range": Array [ - 10, - 11, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { + ], "loc": Object { "end": Object { - "column": 19, + "column": 13, "line": 1, }, "start": Object { - "column": 13, + "column": 7, "line": 1, }, }, - "name": "String", "range": Array [ + 7, 13, - 19, ], - "type": "Identifier", + "type": "ArrayPattern", }, - "kind": "init", "loc": Object { "end": Object { - "column": 21, + "column": 13, "line": 1, }, "start": Object { - "column": 13, + "column": 4, "line": 1, }, }, - "method": false, "range": Array [ + 4, 13, - 21, ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "String", - "range": Array [ - 13, - 19, - ], - "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 [ - 20, - 21, - ], - "raw": "0", - "type": "Literal", - "value": 0, - }, - "type": "AssignmentPattern", - }, + "type": "RestElement", }, ], + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, "range": Array [ - 1, - 23, + 0, + 14, ], - "type": "ObjectPattern", + "type": "ArrayPattern", }, "loc": Object { "end": Object { - "column": 29, + "column": 18, "line": 1, }, "start": Object { @@ -44791,31 +68483,31 @@ Object { "operator": "=", "range": Array [ 0, - 29, + 18, ], "right": Object { "loc": Object { "end": Object { - "column": 29, + "column": 18, "line": 1, }, "start": Object { - "column": 27, + "column": 17, "line": 1, }, }, - "properties": Array [], + "name": "d", "range": Array [ - 27, - 29, + 17, + 18, ], - "type": "ObjectExpression", + "type": "Identifier", }, "type": "AssignmentExpression", }, "loc": Object { "end": Object { - "column": 29, + "column": 19, "line": 1, }, "start": Object { @@ -44825,7 +68517,7 @@ Object { }, "range": Array [ 0, - 29, + 19, ], "type": "ExpressionStatement", }, @@ -44842,7 +68534,7 @@ Object { }, "range": Array [ 0, - 30, + 20, ], "sourceType": "script", "tokens": Array [ @@ -44862,7 +68554,7 @@ Object { 1, ], "type": "Punctuator", - "value": "(", + "value": "[", }, Object { "loc": Object { @@ -44879,185 +68571,167 @@ Object { 1, 2, ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 9, - ], "type": "Identifier", - "value": "Object", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 3, "line": 1, }, "start": Object { - "column": 9, + "column": 2, "line": 1, }, }, "range": Array [ - 9, - 10, + 2, + 3, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 7, "line": 1, }, "start": Object { - "column": 10, + "column": 4, "line": 1, }, }, "range": Array [ - 10, - 11, + 4, + 7, ], - "type": "Numeric", - "value": "0", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 8, "line": 1, }, "start": Object { - "column": 11, + "column": 7, "line": 1, }, }, "range": Array [ - 11, - 12, + 7, + 8, ], "type": "Punctuator", - "value": ",", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 9, "line": 1, }, "start": Object { - "column": 13, + "column": 8, "line": 1, }, }, "range": Array [ - 13, - 19, + 8, + 9, ], "type": "Identifier", - "value": "String", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 10, "line": 1, }, "start": Object { - "column": 19, + "column": 9, "line": 1, }, }, "range": Array [ - 19, - 20, + 9, + 10, ], "type": "Punctuator", - "value": "=", + "value": ",", }, 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": "Numeric", - "value": "0", + "type": "Identifier", + "value": "c", }, 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": "}", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 14, "line": 1, }, "start": Object { - "column": 23, + "column": 13, "line": 1, }, }, "range": Array [ - 23, - 24, + 13, + 14, ], "type": "Punctuator", - "value": ")", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 16, "line": 1, }, "start": Object { - "column": 25, + "column": 15, "line": 1, }, }, "range": Array [ - 25, - 26, + 15, + 16, ], "type": "Punctuator", "value": "=", @@ -45065,175 +68739,230 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 18, "line": 1, }, "start": Object { - "column": 27, + "column": 17, "line": 1, }, }, "range": Array [ - 27, - 28, + 17, + 18, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "d", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 19, "line": 1, }, "start": Object { - "column": 28, + "column": 18, "line": 1, }, }, "range": Array [ - 28, - 29, + 18, + 19, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/named-param.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/destructuring-param.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 30, + "line": 1, }, - "properties": Array [ + "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 { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, }, - "name": "responseText", - "range": Array [ - 3, - 15, - ], - "type": "Identifier", }, - "kind": "init", + "name": "a", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + Object { "loc": Object { "end": Object { - "column": 21, + "column": 16, "line": 1, }, "start": Object { - "column": 3, + "column": 15, "line": 1, }, }, - "method": false, + "name": "b", "range": Array [ - 3, - 21, + 15, + 16, ], - "shorthand": false, - "type": "Property", - "value": Object { + "type": "Identifier", + }, + Object { + "argument": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "ok", + "range": Array [ + 22, + 24, + ], + "type": "Identifier", + }, + ], "loc": Object { "end": Object { - "column": 21, + "column": 25, "line": 1, }, "start": Object { - "column": 17, + "column": 21, "line": 1, }, }, - "name": "text", "range": Array [ - 17, 21, + 25, ], - "type": "Identifier", + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, }, + "range": Array [ + 18, + 25, + ], + "type": "RestElement", }, ], - "range": Array [ - 1, - 23, - ], - "type": "ObjectPattern", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 1, - 29, - ], - "right": Object { "loc": Object { "end": Object { - "column": 29, + "column": 26, "line": 1, }, "start": Object { - "column": 26, + "column": 11, "line": 1, }, }, - "name": "res", "range": Array [ + 11, 26, - 29, ], - "type": "Identifier", + "type": "ArrayPattern", }, - "type": "AssignmentExpression", - }, + ], + "range": Array [ + 0, + 30, + ], + "type": "FunctionDeclaration", + }, + Object { "loc": Object { "end": Object { "column": 31, "line": 1, }, "start": Object { - "column": 0, + "column": 30, "line": 1, }, }, "range": Array [ - 0, + 30, 31, ], - "type": "ExpressionStatement", + "type": "EmptyStatement", }, ], "loc": Object { @@ -45255,7 +68984,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, + "column": 8, "line": 1, }, "start": Object { @@ -45265,7 +68994,43 @@ Object { }, "range": Array [ 0, - 1, + 8, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, ], "type": "Punctuator", "value": "(", @@ -45273,110 +69038,200 @@ Object { Object { "loc": Object { "end": Object { - "column": 2, + "column": 12, "line": 1, }, "start": Object { - "column": 1, + "column": 11, "line": 1, }, }, "range": Array [ - 1, - 2, + 11, + 12, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 13, "line": 1, }, "start": Object { - "column": 3, + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, "line": 1, }, }, "range": Array [ - 3, 15, + 16, ], "type": "Identifier", - "value": "responseText", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 21, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 24, "line": 1, }, "start": Object { - "column": 15, + "column": 22, "line": 1, }, }, "range": Array [ - 15, - 16, + 22, + 24, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "ok", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 25, "line": 1, }, "start": Object { - "column": 17, + "column": 24, "line": 1, }, }, "range": Array [ - 17, - 21, + 24, + 25, ], - "type": "Identifier", - "value": "text", + "type": "Punctuator", + "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": "}", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 27, "line": 1, }, "start": Object { - "column": 24, + "column": 26, "line": 1, }, }, "range": Array [ - 24, - 25, + 26, + 27, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { @@ -45385,16 +69240,16 @@ Object { "line": 1, }, "start": Object { - "column": 26, + "column": 28, "line": 1, }, }, "range": Array [ - 26, + 28, 29, ], - "type": "Identifier", - "value": "res", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -45412,7 +69267,7 @@ Object { 30, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { @@ -45437,357 +69292,646 @@ Object { } `; -exports[`javascript fixtures/destructuring/nested-array.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/error-complex-destructured-spread-first.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ - Object { + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 6, + "column": 5, "line": 1, }, "start": Object { - "column": 5, + "column": 4, "line": 1, }, }, - "name": "x", + "name": "c", "range": Array [ + 4, 5, - 6, ], "type": "Identifier", }, - null, - Object { - "elements": Array [ - null, - Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 5, + ], + "type": "RestElement", + }, + 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": 14, + "column": 10, "line": 1, }, "start": Object { - "column": 13, + "column": 9, "line": 1, }, }, - "name": "z", + "name": "a", "range": Array [ - 13, - 14, + 9, + 10, ], "type": "Identifier", }, - ], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 15, - ], - "type": "ArrayPattern", - }, - ], - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 16, - ], - "type": "ArrayPattern", - }, - "init": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, }, - }, - "range": Array [ - 22, - 23, - ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - Object { - "elements": Array [ - Object { + "method": false, + "range": Array [ + 9, + 10, + ], + "shorthand": true, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 26, + "column": 10, "line": 1, }, "start": Object { - "column": 25, + "column": 9, "line": 1, }, }, + "name": "a", "range": Array [ - 25, - 26, + 9, + 10, ], - "raw": "3", - "type": "Literal", - "value": 3, + "type": "Identifier", }, - Object { + }, + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 28, + "column": 13, "line": 1, }, "start": Object { - "column": 27, + "column": 12, "line": 1, }, }, + "name": "b", "range": Array [ - 27, - 28, + 12, + 13, ], - "raw": "4", - "type": "Literal", - "value": 4, + "type": "Identifier", }, - ], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, }, - "start": Object { - "column": 24, - "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 [ - 24, - 29, - ], - "type": "ArrayExpression", - }, - ], - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, + ], + "range": Array [ + 7, + 15, + ], + "type": "ObjectPattern", }, - "range": Array [ - 19, - 30, - ], - "type": "ArrayExpression", + ], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 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": 30, + "column": 20, "line": 1, }, "start": Object { - "column": 4, + "column": 19, "line": 1, }, }, + "name": "d", "range": Array [ - 4, - 30, + 19, + 20, ], - "type": "VariableDeclarator", + "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 [ + 4, + 5, + ], + "type": "Identifier", + "value": "c", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, }, + }, + "range": Array [ + 10, + 11, ], - "kind": "var", + "type": "Punctuator", + "value": ",", + }, + Object { "loc": Object { "end": Object { - "column": 31, + "column": 13, "line": 1, }, "start": Object { - "column": 0, + "column": 12, "line": 1, }, }, "range": Array [ - 0, - 31, + 12, + 13, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, + "type": "Identifier", + "value": "b", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "}", }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 16, "line": 1, }, "start": Object { - "column": 0, + "column": 15, "line": 1, }, }, "range": Array [ - 0, - 3, + 15, + 16, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 18, "line": 1, }, "start": Object { - "column": 4, + "column": 17, "line": 1, }, }, "range": Array [ - 4, - 5, + 17, + 18, ], "type": "Punctuator", - "value": "[", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 20, "line": 1, }, "start": Object { - "column": 5, + "column": 19, "line": 1, }, }, "range": Array [ - 5, - 6, + 19, + 20, ], "type": "Identifier", - "value": "x", + "value": "d", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 21, "line": 1, }, "start": Object { - "column": 6, + "column": 20, "line": 1, }, }, "range": Array [ - 6, - 7, + 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": 9, + "column": 13, "line": 1, }, "start": Object { - "column": 8, + "column": 0, "line": 1, }, }, "range": Array [ - 8, - 9, + 0, + 13, ], - "type": "Punctuator", - "value": ",", + "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": 11, + "column": 1, "line": 1, }, "start": Object { - "column": 10, + "column": 0, "line": 1, }, }, "range": Array [ - 10, - 11, + 0, + 1, ], "type": "Punctuator", "value": "[", @@ -45795,71 +69939,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 4, "line": 1, }, "start": Object { - "column": 11, + "column": 1, "line": 1, }, }, "range": Array [ - 11, - 12, + 1, + 4, ], "type": "Punctuator", - "value": ",", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 5, "line": 1, }, "start": Object { - "column": 13, + "column": 4, "line": 1, }, }, "range": Array [ - 13, - 14, + 4, + 5, ], "type": "Identifier", - "value": "z", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 6, "line": 1, }, "start": Object { - "column": 14, + "column": 5, "line": 1, }, }, "range": Array [ - 14, - 15, + 5, + 6, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 8, "line": 1, }, "start": Object { - "column": 15, + "column": 7, "line": 1, }, }, "range": Array [ - 15, - 16, + 7, + 8, ], "type": "Punctuator", "value": "]", @@ -45867,17 +70011,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": "=", @@ -45885,215 +70029,347 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 12, "line": 1, }, "start": Object { - "column": 19, + "column": 11, "line": 1, }, }, "range": Array [ - 19, - 20, + 11, + 12, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 13, "line": 1, }, "start": Object { - "column": 20, + "column": 12, "line": 1, }, }, "range": Array [ - 20, - 21, + 12, + 13, ], - "type": "Numeric", - "value": "1", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-spread/multi-destructured.src 1`] = ` +Object { + "body": Array [ Object { + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 1, + 2, + ], + "type": "Identifier", + }, + 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, + "line": 1, + }, + }, + "range": Array [ + 4, + 8, + ], + "type": "RestElement", + }, + ], + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 13, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 22, + "column": 14, "line": 1, }, "start": Object { - "column": 21, + "column": 0, "line": 1, }, }, "range": Array [ - 21, - 22, + 0, + 14, ], - "type": "Punctuator", - "value": ",", + "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": 23, + "column": 1, "line": 1, }, "start": Object { - "column": 22, + "column": 0, "line": 1, }, }, "range": Array [ - 22, - 23, + 0, + 1, ], - "type": "Numeric", - "value": "2", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 2, "line": 1, }, "start": Object { - "column": 23, + "column": 1, "line": 1, }, }, "range": Array [ - 23, - 24, + 1, + 2, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 3, "line": 1, }, "start": Object { - "column": 24, + "column": 2, "line": 1, }, }, "range": Array [ - 24, - 25, + 2, + 3, ], "type": "Punctuator", - "value": "[", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 7, "line": 1, }, "start": Object { - "column": 25, + "column": 4, "line": 1, }, }, "range": Array [ - 25, - 26, + 4, + 7, ], - "type": "Numeric", - "value": "3", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 8, "line": 1, }, "start": Object { - "column": 26, + "column": 7, "line": 1, }, }, "range": Array [ - 26, - 27, + 7, + 8, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 9, "line": 1, }, "start": Object { - "column": 27, + "column": 8, "line": 1, }, }, "range": Array [ - 27, - 28, - ], - "type": "Numeric", - "value": "4", + 8, + 9, + ], + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 11, "line": 1, }, "start": Object { - "column": 28, + "column": 10, "line": 1, }, }, "range": Array [ - 28, - 29, + 10, + 11, ], "type": "Punctuator", - "value": "]", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 13, "line": 1, }, "start": Object { - "column": 29, + "column": 12, "line": 1, }, }, "range": Array [ - 29, - 30, + 12, + 13, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 14, "line": 1, }, "start": Object { - "column": 30, + "column": 13, "line": 1, }, }, "range": Array [ - 30, - 31, + 13, + 14, ], "type": "Punctuator", "value": ";", @@ -46103,417 +70379,121 @@ Object { } `; -exports[`javascript fixtures/destructuring/nested-object.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/not-final-array.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 24, - "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", + "expression": Object { + "left": Object { + "elements": Array [ + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 1, }, "start": Object { - "column": 5, + "column": 4, "line": 1, }, }, - "method": false, + "name": "a", "range": Array [ + 4, 5, - 9, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - }, + "type": "Identifier", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 5, + "line": 1, }, - "method": false, - "range": Array [ - 11, - 22, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 14, - "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": 20, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 16, - 20, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 19, - 20, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 14, - 22, - ], - "type": "ObjectPattern", + "start": Object { + "column": 1, + "line": 1, }, }, - ], - "range": Array [ - 4, - 24, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 1, - }, - "start": Object { - "column": 27, - "line": 1, - }, + "range": Array [ + 1, + 5, + ], + "type": "RestElement", }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 29, - 35, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 32, - "line": 1, - }, - }, - "range": Array [ - 32, - 35, - ], - "raw": "\\"3\\"", - "type": "Literal", - "value": "3", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 37, - 38, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, }, - "method": false, - "range": Array [ - 37, - 50, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 50, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 42, - 43, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 42, - 48, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 48, - ], - "raw": "\\"b\\"", - "type": "Literal", - "value": "b", - }, - }, - ], - "range": Array [ - 40, - 50, - ], - "type": "ObjectExpression", + "start": Object { + "column": 7, + "line": 1, }, }, - ], - "range": Array [ - 27, - 52, - ], - "type": "ObjectExpression", + "name": "b", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + ], + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "operator": "=", + "range": Array [ + 0, + 13, + ], + "right": Object { "loc": Object { "end": Object { - "column": 52, + "column": 13, "line": 1, }, "start": Object { - "column": 4, + "column": 12, "line": 1, }, }, + "name": "c", "range": Array [ - 4, - 52, + 12, + 13, ], - "type": "VariableDeclarator", + "type": "Identifier", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 53, + "column": 14, "line": 1, }, "start": Object { @@ -46523,14 +70503,14 @@ Object { }, "range": Array [ 0, - 53, + 14, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 53, + "column": 14, "line": 1, }, "start": Object { @@ -46540,27 +70520,45 @@ Object { }, "range": Array [ 0, - 53, + 14, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "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": 0, + "column": 1, "line": 1, }, }, "range": Array [ - 0, - 3, + 1, + 4, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { @@ -46577,8 +70575,8 @@ Object { 4, 5, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { @@ -46595,26 +70593,26 @@ Object { 5, 6, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "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": "b", }, Object { "loc": Object { @@ -46631,95 +70629,245 @@ Object { 8, 9, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "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": "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": "z", + "value": "c", }, 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": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-spread/single-destructured.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": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 10, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 11, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 15, + "column": 1, "line": 1, }, "start": Object { - "column": 14, + "column": 0, "line": 1, }, }, "range": Array [ - 14, - 15, + 0, + 1, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 4, "line": 1, }, "start": Object { - "column": 16, + "column": 1, "line": 1, }, }, "range": Array [ - 16, - 17, + 1, + 4, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, ], "type": "Identifier", "value": "a", @@ -46727,107 +70875,392 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 6, "line": 1, }, "start": Object { - "column": 17, + "column": 5, "line": 1, }, }, "range": Array [ - 17, - 18, + 5, + 6, ], "type": "Punctuator", - "value": ":", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 8, "line": 1, }, "start": Object { - "column": 19, + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, "line": 1, }, - }, - "range": Array [ - 19, - 20, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-spread/var-complex-destructured.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 7, + 8, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 10, + 11, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 5, + 13, + ], + "type": "ObjectPattern", + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "c", + "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", + }, + ], + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 20, + ], + "type": "ArrayPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "d", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 24, + ], + "type": "VariableDeclarator", + }, ], - "type": "Identifier", - "value": "b", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 22, + "column": 25, "line": 1, }, "start": Object { - "column": 21, + "column": 0, "line": 1, }, }, "range": Array [ - 21, - 22, + 0, + 25, ], - "type": "Punctuator", - "value": "}", + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 25, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 24, + "column": 3, "line": 1, }, "start": Object { - "column": 23, + "column": 0, "line": 1, }, }, "range": Array [ - 23, - 24, + 0, + 3, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 5, "line": 1, }, "start": Object { - "column": 25, + "column": 4, "line": 1, }, }, "range": Array [ - 25, - 26, + 4, + 5, ], "type": "Punctuator", - "value": "=", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 6, "line": 1, }, "start": Object { - "column": 27, + "column": 5, "line": 1, }, }, "range": Array [ - 27, - 28, + 5, + 6, ], "type": "Punctuator", "value": "{", @@ -46835,233 +71268,197 @@ Object { Object { "loc": Object { "end": Object { - "column": 30, + "column": 8, "line": 1, }, "start": Object { - "column": 29, + "column": 7, "line": 1, }, }, "range": Array [ - 29, - 30, + 7, + 8, ], "type": "Identifier", - "value": "x", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 9, "line": 1, }, "start": Object { - "column": 30, + "column": 8, "line": 1, }, }, "range": Array [ - 30, - 31, + 8, + 9, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 11, "line": 1, }, "start": Object { - "column": 32, + "column": 10, "line": 1, }, }, "range": Array [ - 32, - 35, + 10, + 11, ], - "type": "String", - "value": "\\"3\\"", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 13, "line": 1, }, "start": Object { - "column": 35, + "column": 12, "line": 1, }, }, "range": Array [ - 35, - 36, + 12, + 13, ], "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 38, - ], - "type": "Identifier", - "value": "z", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 39, + "column": 14, "line": 1, }, "start": Object { - "column": 38, + "column": 13, "line": 1, }, }, "range": Array [ - 38, - 39, + 13, + 14, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 41, + "column": 18, "line": 1, }, "start": Object { - "column": 40, + "column": 15, "line": 1, }, }, "range": Array [ - 40, - 41, + 15, + 18, ], "type": "Punctuator", - "value": "{", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 43, + "column": 19, "line": 1, }, "start": Object { - "column": 42, + "column": 18, "line": 1, }, }, "range": Array [ - 42, - 43, + 18, + 19, ], "type": "Identifier", - "value": "a", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 44, + "column": 20, "line": 1, }, "start": Object { - "column": 43, + "column": 19, "line": 1, }, }, "range": Array [ - 43, - 44, + 19, + 20, ], "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 45, - "line": 1, - }, - }, - "range": Array [ - 45, - 48, - ], - "type": "String", - "value": "\\"b\\"", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 50, + "column": 22, "line": 1, }, "start": Object { - "column": 49, + "column": 21, "line": 1, }, }, "range": Array [ - 49, - 50, + 21, + 22, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 52, + "column": 24, "line": 1, }, "start": Object { - "column": 51, + "column": 23, "line": 1, }, }, "range": Array [ - 51, - 52, + 23, + 24, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "d", }, Object { "loc": Object { "end": Object { - "column": 53, + "column": 25, "line": 1, }, "start": Object { - "column": 52, + "column": 24, "line": 1, }, }, "range": Array [ - 52, - 53, + 24, + 25, ], "type": "Punctuator", "value": ";", @@ -47071,48 +71468,18 @@ Object { } `; -exports[`javascript fixtures/destructuring/object-var-named.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/var-destructured-array-literal.src 1`] = ` Object { "body": Array [ Object { "declarations": Array [ Object { "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "properties": Array [ + "elements": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "kind": "init", "loc": Object { "end": Object { - "column": 8, + "column": 6, "line": 1, }, "start": Object { @@ -47120,60 +71487,123 @@ Object { "line": 1, }, }, - "method": false, + "name": "a", "range": Array [ 5, - 8, + 6, ], - "shorthand": false, - "type": "Property", - "value": Object { + "type": "Identifier", + }, + Object { + "argument": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + ], "loc": Object { "end": Object { - "column": 8, + "column": 17, "line": 1, }, "start": Object { - "column": 7, + "column": 11, "line": 1, }, }, - "name": "b", "range": Array [ - 7, - 8, + 11, + 17, ], - "type": "Identifier", + "type": "ArrayPattern", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, + "range": Array [ + 8, + 17, + ], + "type": "RestElement", }, ], + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, "range": Array [ 4, - 9, + 18, ], - "type": "ObjectPattern", + "type": "ArrayPattern", }, "init": Object { "loc": Object { "end": Object { - "column": 14, + "column": 22, "line": 1, }, "start": Object { - "column": 12, + "column": 21, "line": 1, }, }, - "properties": Array [], + "name": "d", "range": Array [ - 12, - 14, + 21, + 22, ], - "type": "ObjectExpression", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 14, + "column": 22, "line": 1, }, "start": Object { @@ -47183,7 +71613,7 @@ Object { }, "range": Array [ 4, - 14, + 22, ], "type": "VariableDeclarator", }, @@ -47191,7 +71621,7 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 15, + "column": 23, "line": 1, }, "start": Object { @@ -47201,14 +71631,14 @@ Object { }, "range": Array [ 0, - 15, + 23, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 15, + "column": 23, "line": 1, }, "start": Object { @@ -47218,7 +71648,7 @@ Object { }, "range": Array [ 0, - 15, + 23, ], "sourceType": "script", "tokens": Array [ @@ -47256,7 +71686,7 @@ Object { 5, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { @@ -47292,22 +71722,58 @@ Object { 7, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 11, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "range": Array [ - 7, 8, + 11, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, ], "type": "Identifier", "value": "b", @@ -47315,89 +71781,125 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 14, "line": 1, }, "start": Object { - "column": 8, + "column": 13, "line": 1, }, }, "range": Array [ - 8, - 9, + 13, + 14, ], "type": "Punctuator", - "value": "}", + "value": ",", }, 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": "Identifier", + "value": "c", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, ], "type": "Punctuator", - "value": "=", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 18, "line": 1, }, "start": Object { - "column": 12, + "column": 17, "line": 1, }, }, "range": Array [ - 12, - 13, + 17, + 18, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 20, "line": 1, }, "start": Object { - "column": 13, + "column": 19, "line": 1, }, }, "range": Array [ - 13, - 14, + 19, + 20, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 22, "line": 1, }, "start": Object { - "column": 14, + "column": 21, "line": 1, }, }, "range": Array [ - 14, - 15, + 21, + 22, + ], + "type": "Identifier", + "value": "d", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, ], "type": "Punctuator", "value": ";", @@ -47407,45 +71909,15 @@ Object { } `; -exports[`javascript fixtures/destructuring/object-var-undefined.src 1`] = ` +exports[`javascript fixtures/destructuring-and-spread/var-multi-destructured.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, - }, - }, - "properties": Array [ + "elements": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "kind": "init", "loc": Object { "end": Object { "column": 6, @@ -47456,60 +71928,86 @@ Object { "line": 1, }, }, - "method": false, + "name": "a", "range": Array [ 5, 6, ], - "shorthand": true, - "type": "Property", - "value": Object { + "type": "Identifier", + }, + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 6, + "column": 12, "line": 1, }, "start": Object { - "column": 5, + "column": 11, "line": 1, }, }, - "name": "a", + "name": "b", "range": Array [ - 5, - 6, + 11, + 12, ], "type": "Identifier", }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 12, + ], + "type": "RestElement", }, ], + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, "range": Array [ 4, - 7, + 13, ], - "type": "ObjectPattern", + "type": "ArrayPattern", }, "init": Object { "loc": Object { "end": Object { - "column": 12, + "column": 17, "line": 1, }, "start": Object { - "column": 10, + "column": 16, "line": 1, }, }, - "properties": Array [], + "name": "c", "range": Array [ - 10, - 12, + 16, + 17, ], - "type": "ObjectExpression", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 12, + "column": 17, "line": 1, }, "start": Object { @@ -47519,7 +72017,7 @@ Object { }, "range": Array [ 4, - 12, + 17, ], "type": "VariableDeclarator", }, @@ -47527,7 +72025,7 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 13, + "column": 18, "line": 1, }, "start": Object { @@ -47537,14 +72035,14 @@ Object { }, "range": Array [ 0, - 13, + 18, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 13, + "column": 18, "line": 1, }, "start": Object { @@ -47554,7 +72052,7 @@ Object { }, "range": Array [ 0, - 13, + 18, ], "sourceType": "script", "tokens": Array [ @@ -47592,7 +72090,7 @@ Object { 5, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { @@ -47628,12 +72126,12 @@ Object { 7, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 11, "line": 1, }, "start": Object { @@ -47643,208 +72141,222 @@ Object { }, "range": Array [ 8, - 9, + 11, ], "type": "Punctuator", - "value": "=", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 12, "line": 1, }, "start": Object { - "column": 10, + "column": 11, "line": 1, }, }, "range": Array [ - 10, 11, + 12, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "b", }, 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 { "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": "=", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring/param-defaults-array.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, }, - "range": Array [ - 21, - 23, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "start": Object { + "column": 16, + "line": 1, }, - "name": "a", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "c", + }, + Object { "loc": Object { "end": Object { - "column": 23, + "column": 18, "line": 1, }, "start": Object { - "column": 0, + "column": 17, "line": 1, }, }, - "params": Array [ + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/destructuring-and-spread/var-single-destructured.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ Object { - "elements": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, + "id": Object { + "elements": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, + "name": "a", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", }, - "name": "x", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 18, - ], - "right": Object { "loc": Object { "end": Object { - "column": 18, + "column": 9, "line": 1, }, "start": Object { - "column": 16, + "column": 5, "line": 1, }, }, "range": Array [ - 16, - 18, + 5, + 9, ], - "raw": "10", - "type": "Literal", - "value": 10, + "type": "RestElement", + }, + ], + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, }, - "type": "AssignmentPattern", }, - ], + "range": Array [ + 4, + 10, + ], + "type": "ArrayPattern", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 19, + "column": 14, "line": 1, }, "start": Object { - "column": 11, + "column": 4, "line": 1, }, }, "range": Array [ - 11, - 19, + 4, + 14, ], - "type": "ArrayPattern", + "type": "VariableDeclarator", }, ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, "range": Array [ 0, - 23, + 15, ], - "type": "FunctionDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 23, + "column": 15, "line": 1, }, "start": Object { @@ -47854,14 +72366,14 @@ Object { }, "range": Array [ 0, - 23, + 15, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 3, "line": 1, }, "start": Object { @@ -47871,61 +72383,25 @@ Object { }, "range": Array [ 0, - 8, + 3, ], "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "(", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 5, "line": 1, }, "start": Object { - "column": 11, + "column": 4, "line": 1, }, }, "range": Array [ - 11, - 12, + 4, + 5, ], "type": "Punctuator", "value": "[", @@ -47933,71 +72409,53 @@ Object { 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, + "column": 8, "line": 1, }, "start": Object { - "column": 14, + "column": 5, "line": 1, }, }, "range": Array [ - 14, - 15, + 5, + 8, ], "type": "Punctuator", - "value": "=", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 9, "line": 1, }, "start": Object { - "column": 16, + "column": 8, "line": 1, }, }, "range": Array [ - 16, - 18, + 8, + 9, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "a", }, 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": "Punctuator", "value": "]", @@ -48005,82 +72463,230 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 12, "line": 1, }, "start": Object { - "column": 19, + "column": 11, "line": 1, }, }, "range": Array [ - 19, - 20, + 11, + 12, ], "type": "Punctuator", - "value": ")", + "value": "=", }, 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": "{", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 15, "line": 1, }, "start": Object { - "column": 22, + "column": 14, "line": 1, }, }, "range": Array [ - 22, - 23, + 14, + 15, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/param-defaults-object.src 1`] = ` +exports[`javascript fixtures/directives/block.src 1`] = ` Object { "body": Array [ Object { "async": false, "body": Object { - "body": Array [], + "body": Array [ + Object { + "directive": "use strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 19, + 31, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 19, + 32, + ], + "type": "ExpressionStatement", + }, + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "name": "a", + "range": Array [ + 39, + 40, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 43, + 44, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 39, + 44, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 35, + 45, + ], + "type": "VariableDeclaration", + }, + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 48, + 60, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 48, + 61, + ], + "type": "ExpressionStatement", + }, + ], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 21, + "column": 15, "line": 1, }, }, "range": Array [ - 21, - 23, + 15, + 63, ], "type": "BlockStatement", }, @@ -48089,7 +72695,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 10, + "column": 12, "line": 1, }, "start": Object { @@ -48097,148 +72703,35 @@ Object { "line": 1, }, }, - "name": "a", + "name": "foo", "range": Array [ 9, - 10, + 12, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "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": "x", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 12, - 18, - ], - "shorthand": true, - "type": "Property", - "value": 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": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 18, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - ], - "range": Array [ - 11, - 19, - ], - "type": "ObjectPattern", - }, - ], + "params": Array [], "range": Array [ 0, - 23, + 63, ], "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 6, }, "start": Object { "column": 0, @@ -48247,7 +72740,7 @@ Object { }, "range": Array [ 0, - 23, + 64, ], "sourceType": "script", "tokens": Array [ @@ -48272,7 +72765,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 12, "line": 1, }, "start": Object { @@ -48282,25 +72775,25 @@ Object { }, "range": Array [ 9, - 10, + 12, ], "type": "Identifier", - "value": "a", + "value": "foo", }, 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": "(", @@ -48308,53 +72801,125 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { - "column": 11, + "column": 13, "line": 1, }, }, "range": Array [ - 11, - 12, + 13, + 14, ], "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": "x", + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 19, + 31, + ], + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 1, + "line": 2, }, "start": Object { "column": 14, - "line": 1, + "line": 2, }, }, "range": Array [ - 14, - 15, + 31, + 32, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 35, + 38, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 41, + 42, ], "type": "Punctuator", "value": "=", @@ -48362,89 +72927,89 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 16, - "line": 1, + "column": 10, + "line": 3, }, }, "range": Array [ - 16, - 18, + 43, + 44, ], "type": "Numeric", - "value": "10", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 12, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 11, + "line": 3, }, }, "range": Array [ - 18, - 19, + 44, + 45, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 14, + "line": 4, }, "start": Object { - "column": 19, - "line": 1, + "column": 2, + "line": 4, }, }, "range": Array [ - 19, - 20, + 48, + 60, ], - "type": "Punctuator", - "value": ")", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 15, + "line": 4, }, "start": Object { - "column": 21, - "line": 1, + "column": 14, + "line": 4, }, }, "range": Array [ - 21, - 22, + 60, + 61, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 22, - 23, + 62, + 63, ], "type": "Punctuator", "value": "}", @@ -48454,52 +73019,33 @@ Object { } `; -exports[`javascript fixtures/destructuring/param-defaults-object-nested.src 1`] = ` +exports[`javascript fixtures/directives/directive-in-class.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 36, - "line": 1, - }, - }, - "range": Array [ - 36, - 38, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { + "directive": "use strict", + "expression": Object { "loc": Object { "end": Object { - "column": 10, + "column": 12, "line": 1, }, "start": Object { - "column": 9, + "column": 0, "line": 1, }, }, - "name": "a", "range": Array [ - 9, - 10, + 0, + 12, ], - "type": "Identifier", + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", }, "loc": Object { "end": Object { - "column": 38, + "column": 13, "line": 1, }, "start": Object { @@ -48507,299 +73053,555 @@ Object { "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 34, - "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", }, - "start": Object { - "column": 11, - "line": 1, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 5, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 4, + }, }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { + "range": Array [ + 31, + 75, + ], + "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": 13, - "line": 1, + "column": 5, + "line": 6, }, "start": Object { - "column": 12, - "line": 1, + "column": 19, + "line": 4, }, }, - "name": "x", "range": Array [ - 12, - 13, + 46, + 75, ], - "type": "Identifier", + "type": "BlockStatement", }, - "kind": "init", + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 5, + "line": 6, }, "start": Object { - "column": 12, - "line": 1, + "column": 16, + "line": 4, }, }, - "method": false, + "params": Array [], "range": Array [ - 12, - 18, + 43, + 75, ], - "shorthand": true, - "type": "Property", - "value": 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", + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 8, }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, + "start": Object { + "column": 8, + "line": 8, }, - "range": Array [ - 12, - 18, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, + }, + "name": "foo", + "range": Array [ + 85, + 88, + ], + "type": "Identifier", + }, + "kind": "get", + "loc": Object { + "end": Object { + "column": 5, + "line": 10, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "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", }, - "start": Object { - "column": 16, - "line": 1, + "loc": Object { + "end": Object { + "column": 21, + "line": 9, + }, + "start": Object { + "column": 8, + "line": 9, + }, }, + "range": Array [ + 102, + 115, + ], + "type": "ExpressionStatement", }, - "range": Array [ - 16, - 18, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - Object { - "computed": false, - "key": Object { + ], "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 5, + "line": 10, }, "start": Object { - "column": 20, - "line": 1, + "column": 15, + "line": 8, }, }, - "name": "y", "range": Array [ - 20, - 21, + 92, + 121, ], - "type": "Identifier", + "type": "BlockStatement", }, - "kind": "init", + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 5, + "line": 10, }, "start": Object { - "column": 20, - "line": 1, + "column": 12, + "line": 8, }, }, - "method": false, + "params": Array [], "range": Array [ - 20, - 33, + 89, + 121, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 12, }, - "properties": Array [ + "start": Object { + "column": 8, + "line": 12, + }, + }, + "name": "foo", + "range": Array [ + 131, + 134, + ], + "type": "Identifier", + }, + "kind": "set", + "loc": Object { + "end": Object { + "column": 5, + "line": 14, + }, + "start": Object { + "column": 4, + "line": 12, + }, + }, + "range": Array [ + 127, + 172, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ Object { - "computed": false, - "key": Object { + "directive": "use strict", + "expression": Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 20, + "line": 13, }, "start": Object { - "column": 25, - "line": 1, + "column": 8, + "line": 13, }, }, - "name": "z", "range": Array [ - 25, - 26, + 153, + 165, ], - "type": "Identifier", + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", }, - "kind": "init", "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 21, + "line": 13, }, "start": Object { - "column": 25, - "line": 1, + "column": 8, + "line": 13, }, }, - "method": false, "range": Array [ - 25, - 31, + 153, + 166, ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 25, - 26, - ], - "type": "Identifier", - }, + "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", + }, + }, + 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": 5, + "line": 18, + }, + "start": Object { + "column": 4, + "line": 16, + }, + }, + "range": Array [ + 178, + 217, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "directive": "use strict", + "expression": Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 20, + "line": 17, }, "start": Object { - "column": 25, - "line": 1, + "column": 8, + "line": 17, }, }, "range": Array [ - 25, - 31, + 198, + 210, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 31, - ], - "raw": "10", - "type": "Literal", - "value": 10, + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 17, + }, + "start": Object { + "column": 8, + "line": 17, }, - "type": "AssignmentPattern", }, + "range": Array [ + 198, + 211, + ], + "type": "ExpressionStatement", }, ], + "loc": Object { + "end": Object { + "column": 5, + "line": 18, + }, + "start": Object { + "column": 14, + "line": 16, + }, + }, "range": Array [ - 23, - 33, + 188, + 217, ], - "type": "ObjectPattern", + "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", }, - ], - "range": Array [ - 11, - 34, - ], - "type": "ObjectPattern", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 19, + }, + "start": Object { + "column": 10, + "line": 3, + }, }, - ], - "range": Array [ - 0, - 38, - ], - "type": "FunctionDeclaration", - }, - Object { + "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", + }, "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 1, + "line": 19, }, "start": Object { - "column": 38, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 38, - 39, + 15, + 219, ], - "type": "EmptyStatement", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 0, + "line": 20, }, "start": Object { "column": 0, @@ -48808,14 +73610,14 @@ Object { }, "range": Array [ 0, - 39, + 220, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 12, "line": 1, }, "start": Object { @@ -48825,43 +73627,115 @@ Object { }, "range": Array [ 0, - 8, + 12, ], - "type": "Keyword", - "value": "function", + "type": "String", + "value": "\\"use strict\\"", }, 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": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 15, + 20, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 21, + 24, ], "type": "Identifier", - "value": "a", + "value": "Foo", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 1, + "line": 3, }, "start": Object { "column": 10, - "line": 1, + "line": 3, }, }, "range": Array [ - 10, - 11, + 25, + 26, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 31, + 42, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "range": Array [ + 43, + 44, ], "type": "Punctuator", "value": "(", @@ -48869,17 +73743,35 @@ Object { 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, + 44, + 45, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 4, + }, + "start": Object { + "column": 19, + "line": 4, + }, + }, + "range": Array [ + 46, + 47, ], "type": "Punctuator", "value": "{", @@ -48887,215 +73779,359 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 20, + "line": 5, }, "start": Object { - "column": 12, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 12, - 13, + 56, + 68, + ], + "type": "String", + "value": "\\"use strict\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 5, + }, + "start": Object { + "column": 20, + "line": 5, + }, + }, + "range": Array [ + 68, + 69, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 74, + 75, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 81, + 84, ], "type": "Identifier", - "value": "x", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 11, + "line": 8, }, "start": Object { - "column": 14, - "line": 1, + "column": 8, + "line": 8, }, }, "range": Array [ - 14, - 15, + 85, + 88, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 8, + }, + "start": Object { + "column": 12, + "line": 8, + }, + }, + "range": Array [ + 89, + 90, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 14, + "line": 8, }, "start": Object { - "column": 16, - "line": 1, + "column": 13, + "line": 8, }, }, "range": Array [ - 16, - 18, + 90, + 91, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "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": "Punctuator", - "value": ",", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 9, + }, + "start": Object { + "column": 8, + "line": 9, + }, + }, + "range": Array [ + 102, + 114, + ], + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { "column": 21, - "line": 1, + "line": 9, }, "start": Object { "column": 20, - "line": 1, + "line": 9, }, }, "range": Array [ - 20, - 21, + 114, + 115, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 5, + "line": 10, }, "start": Object { - "column": 21, - "line": 1, + "column": 4, + "line": 10, }, }, "range": Array [ - 21, - 22, + 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": "Identifier", + "value": "set", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 12, + }, + "start": Object { + "column": 8, + "line": 12, + }, + }, + "range": Array [ + 131, + 134, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 12, + }, + "start": Object { + "column": 12, + "line": 12, + }, + }, + "range": Array [ + 135, + 136, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 18, + "line": 12, }, "start": Object { - "column": 25, - "line": 1, + "column": 13, + "line": 12, }, }, "range": Array [ - 25, - 26, + 136, + 141, ], "type": "Identifier", - "value": "z", + "value": "value", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 19, + "line": 12, }, "start": Object { - "column": 27, - "line": 1, + "column": 18, + "line": 12, }, }, "range": Array [ - 27, - 28, + 141, + 142, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 21, + "line": 12, }, "start": Object { - "column": 29, - "line": 1, + "column": 20, + "line": 12, }, }, "range": Array [ - 29, - 31, + 143, + 144, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 20, + "line": 13, }, "start": Object { - "column": 32, - "line": 1, + "column": 8, + "line": 13, }, }, "range": Array [ - 32, - 33, + 153, + 165, + ], + "type": "String", + "value": "\\"use strict\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 13, + }, + "start": Object { + "column": 20, + "line": 13, + }, + }, + "range": Array [ + 165, + 166, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 5, + "line": 14, }, "start": Object { - "column": 33, - "line": 1, + "column": 4, + "line": 14, }, }, "range": Array [ - 33, - 34, + 171, + 172, ], "type": "Punctuator", "value": "}", @@ -49103,17 +74139,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 10, + "line": 16, }, "start": Object { - "column": 34, - "line": 1, + "column": 4, + "line": 16, }, }, "range": Array [ - 34, - 35, + 178, + 184, + ], + "type": "Identifier", + "value": "method", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 16, + }, + "start": Object { + "column": 11, + "line": 16, + }, + }, + "range": Array [ + 185, + 186, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 16, + }, + "start": Object { + "column": 12, + "line": 16, + }, + }, + "range": Array [ + 186, + 187, ], "type": "Punctuator", "value": ")", @@ -49121,17 +74193,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 15, + "line": 16, }, "start": Object { - "column": 36, - "line": 1, + "column": 14, + "line": 16, }, }, "range": Array [ - 36, - 37, + 188, + 189, ], "type": "Punctuator", "value": "{", @@ -49139,17 +74211,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 20, + "line": 17, }, "start": Object { - "column": 37, - "line": 1, + "column": 8, + "line": 17, }, }, "range": Array [ - 37, - 38, + 198, + 210, + ], + "type": "String", + "value": "\\"use strict\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 17, + }, + "start": Object { + "column": 20, + "line": 17, + }, + }, + "range": Array [ + 210, + 211, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 18, + }, + "start": Object { + "column": 4, + "line": 18, + }, + }, + "range": Array [ + 216, + 217, ], "type": "Punctuator", "value": "}", @@ -49157,46 +74265,157 @@ Object { Object { "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 1, + "line": 19, }, "start": Object { - "column": 38, - "line": 1, + "column": 0, + "line": 19, }, }, "range": Array [ - 38, - 39, + 218, + 219, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/params-array.src 1`] = ` +exports[`javascript fixtures/directives/function-non-strict.src 1`] = ` Object { "body": Array [ Object { "async": false, "body": Object { - "body": Array [], + "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": 22, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 20, + "column": 16, "line": 1, }, }, "range": Array [ - 20, - 22, + 16, + 39, ], "type": "BlockStatement", }, @@ -49205,7 +74424,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 10, + "column": 12, "line": 1, }, "start": Object { @@ -49213,108 +74432,35 @@ Object { "line": 1, }, }, - "name": "x", + "name": "foo", "range": Array [ 9, - 10, + 12, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [ - Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 19, - ], - "type": "ArrayPattern", - }, - ], + "params": Array [], "range": Array [ 0, - 22, + 39, ], "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": 23, - "line": 1, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -49323,7 +74469,7 @@ Object { }, "range": Array [ 0, - 23, + 40, ], "sourceType": "script", "tokens": Array [ @@ -49348,7 +74494,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 12, "line": 1, }, "start": Object { @@ -49358,25 +74504,25 @@ Object { }, "range": Array [ 9, - 10, + 12, ], "type": "Identifier", - "value": "x", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 14, "line": 1, }, "start": Object { - "column": 10, + "column": 13, "line": 1, }, }, "range": Array [ - 10, - 11, + 13, + 14, ], "type": "Punctuator", "value": "(", @@ -49384,308 +74530,549 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 15, "line": 1, }, "start": Object { - "column": 11, + "column": 14, "line": 1, }, }, "range": Array [ - 11, - 12, + 14, + 15, ], "type": "Punctuator", - "value": "[", + "value": ")", }, 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": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 14, - 15, + 20, + 30, ], - "type": "Punctuator", - "value": ",", + "type": "String", + "value": "\\"use smth\\"", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 3, + "line": 3, }, "start": Object { - "column": 16, - "line": 1, + "column": 2, + "line": 3, }, }, "range": Array [ - 16, - 17, + 33, + 34, ], - "type": "Identifier", - "value": "b", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 4, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 3, + "line": 3, }, }, "range": Array [ - 18, - 19, + 34, + 35, ], "type": "Punctuator", - "value": "]", + "value": "+", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 19, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 19, - 20, + 35, + 36, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 6, + "line": 3, }, "start": Object { - "column": 20, - "line": 1, + "column": 5, + "line": 3, }, }, "range": Array [ - 20, - 21, + 36, + 37, ], "type": "Punctuator", - "value": "{", + "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, + 38, + 39, ], "type": "Punctuator", "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/directives/non-directive-string.src 1`] = ` +Object { + "body": Array [ 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": 16, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 16, + 28, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 30, + ], + "type": "BlockStatement", + }, "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 22, + "column": 0, "line": 1, }, }, "range": Array [ - 22, - 23, + 0, + 30, ], - "type": "Punctuator", - "value": ";", + "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", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring/params-array-wrapped.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "body": Array [], + "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": 20, + "line": 7, + }, + "start": Object { + "column": 8, + "line": 7, + }, + }, + "range": Array [ + 74, + 86, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 8, + }, + "start": Object { + "column": 16, + "line": 6, + }, + }, + "range": Array [ + 64, + 92, + ], + "type": "BlockStatement", + }, + ], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 5, + "line": 8, }, "start": Object { - "column": 21, - "line": 1, + "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": 20, + "line": 10, + }, + "start": Object { + "column": 8, + "line": 10, + }, + }, + "range": Array [ + 116, + 128, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 11, + }, + "start": Object { + "column": 13, + "line": 9, + }, + }, + "range": Array [ + 106, + 134, + ], + "type": "BlockStatement", }, - }, - "range": Array [ - 21, - 23, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 5, + "line": 11, }, "start": Object { - "column": 10, - "line": 1, + "column": 4, + "line": 9, }, }, - "name": "x", "range": Array [ - 10, - 11, + 97, + 134, ], - "type": "Identifier", + "test": null, + "type": "SwitchCase", }, + ], + "discriminant": Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 12, + "line": 5, }, "start": Object { - "column": 1, - "line": 1, + "column": 8, + "line": 5, }, }, - "params": Array [ + "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 { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, + "expression": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 15, }, - "name": "a", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, + "start": Object { + "column": 4, + "line": 15, }, - "name": "b", - "range": Array [ - 17, - 18, - ], - "type": "Identifier", }, - ], + "range": Array [ + 157, + 169, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 16, + "line": 15, }, "start": Object { - "column": 12, - "line": 1, + "column": 4, + "line": 15, }, }, "range": Array [ - 12, - 20, + 157, + 169, ], - "type": "ArrayPattern", + "type": "ExpressionStatement", }, ], + "loc": Object { + "end": Object { + "column": 1, + "line": 16, + }, + "start": Object { + "column": 13, + "line": 14, + }, + }, "range": Array [ - 1, - 23, + 151, + 171, ], - "type": "FunctionExpression", + "type": "BlockStatement", }, "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 1, + "line": 16, }, "start": Object { "column": 0, - "line": 1, + "line": 14, }, }, "range": Array [ - 0, - 25, + 138, + 171, ], - "type": "ExpressionStatement", + "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": 25, - "line": 1, + "column": 0, + "line": 17, }, "start": Object { "column": 0, @@ -49694,14 +75081,14 @@ Object { }, "range": Array [ 0, - 25, + 172, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 2, "line": 1, }, "start": Object { @@ -49711,597 +75098,493 @@ Object { }, "range": Array [ 0, - 1, + 2, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "if", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 4, "line": 1, }, "start": Object { - "column": 1, + "column": 3, "line": 1, }, }, "range": Array [ - 1, - 9, + 3, + 4, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 10, + "column": 4, "line": 1, }, }, "range": Array [ - 10, - 11, + 4, + 8, ], - "type": "Identifier", - "value": "x", + "type": "Boolean", + "value": "true", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 9, "line": 1, }, "start": Object { - "column": 11, + "column": 8, "line": 1, }, }, "range": Array [ - 11, - 12, + 8, + 9, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 11, "line": 1, }, "start": Object { - "column": 12, + "column": 10, "line": 1, }, }, "range": Array [ - 12, - 13, + 10, + 11, ], "type": "Punctuator", - "value": "[", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 14, - 15, + 16, + 28, ], - "type": "Identifier", - "value": "a", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 15, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 15, - 16, + 29, + 30, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 6, + "line": 5, }, "start": Object { - "column": 17, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 17, - 18, + 32, + 38, ], - "type": "Identifier", - "value": "b", + "type": "Keyword", + "value": "switch", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 8, + "line": 5, }, "start": Object { - "column": 19, - "line": 1, + "column": 7, + "line": 5, }, }, "range": Array [ - 19, - 20, + 39, + 40, ], "type": "Punctuator", - "value": "]", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 12, + "line": 5, }, "start": Object { - "column": 20, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 20, - 21, + 40, + 44, ], - "type": "Punctuator", - "value": ")", + "type": "Boolean", + "value": "true", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 13, + "line": 5, }, "start": Object { - "column": 21, - "line": 1, + "column": 12, + "line": 5, }, }, "range": Array [ - 21, - 22, + 44, + 45, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 15, + "line": 5, }, "start": Object { - "column": 22, - "line": 1, + "column": 14, + "line": 5, }, }, "range": Array [ - 22, - 23, + 46, + 47, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 8, + "line": 6, }, "start": Object { - "column": 23, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 23, - 24, + 52, + 56, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "case", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 14, + "line": 6, }, "start": Object { - "column": 24, - "line": 1, + "column": 9, + "line": 6, }, }, "range": Array [ - 24, - 25, + 57, + 62, ], - "type": "Punctuator", - "value": ";", + "type": "Boolean", + "value": "false", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring/params-multi-object.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 22, - ], - "type": "BlockStatement", - }, - "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 [ - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "b", - "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": "b", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 14, - 19, - ], - "type": "ObjectPattern", + "column": 15, + "line": 6, }, - ], + "start": Object { + "column": 14, + "line": 6, + }, + }, "range": Array [ - 0, - 22, + 62, + 63, ], - "type": "FunctionDeclaration", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 17, + "line": 6, }, "start": Object { - "column": 22, - "line": 1, + "column": 16, + "line": 6, }, }, "range": Array [ - 22, - 23, + 64, + 65, ], - "type": "EmptyStatement", - }, - ], - "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": 8, - "line": 1, + "column": 20, + "line": 7, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 7, }, }, "range": Array [ - 0, - 8, + 74, + 86, ], - "type": "Keyword", - "value": "function", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 5, + "line": 8, }, "start": Object { - "column": 9, - "line": 1, + "column": 4, + "line": 8, }, }, "range": Array [ - 9, - 10, + 91, + 92, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 1, + "line": 9, }, "start": Object { - "column": 10, - "line": 1, + "column": 4, + "line": 9, }, }, "range": Array [ - 10, - 11, + 97, + 104, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { "column": 12, - "line": 1, + "line": 9, }, "start": Object { "column": 11, - "line": 1, + "line": 9, }, }, "range": Array [ - 11, - 12, + 104, + 105, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { + "column": 14, + "line": 9, + }, + "start": Object { "column": 13, - "line": 1, + "line": 9, + }, + }, + "range": Array [ + 106, + 107, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 10, }, "start": Object { - "column": 12, - "line": 1, + "column": 8, + "line": 10, }, }, "range": Array [ - 12, - 13, + 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": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 1, + "line": 12, }, "start": Object { - "column": 14, - "line": 1, + "column": 0, + "line": 12, }, }, "range": Array [ - 14, - 15, + 135, + 136, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 5, + "line": 14, }, "start": Object { - "column": 16, - "line": 1, + "column": 0, + "line": 14, }, }, "range": Array [ - 16, - 17, + 138, + 143, ], - "type": "Identifier", - "value": "b", + "type": "Keyword", + "value": "while", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 7, + "line": 14, }, "start": Object { - "column": 18, - "line": 1, + "column": 6, + "line": 14, }, }, "range": Array [ - 18, - 19, + 144, + 145, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 11, + "line": 14, }, "start": Object { - "column": 19, - "line": 1, + "column": 7, + "line": 14, }, }, "range": Array [ - 19, - 20, + 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": ")", @@ -50309,17 +75592,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 14, + "line": 14, }, "start": Object { - "column": 20, - "line": 1, + "column": 13, + "line": 14, }, }, "range": Array [ - 20, - 21, + 151, + 152, ], "type": "Punctuator", "value": "{", @@ -50327,90 +75610,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 16, + "line": 15, }, "start": Object { - "column": 21, - "line": 1, + "column": 4, + "line": 15, }, }, "range": Array [ - 21, - 22, + 157, + 169, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 16, }, "start": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 16, }, }, "range": Array [ - 22, - 23, + 170, + 171, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/params-nested-array.src 1`] = ` +exports[`javascript fixtures/directives/program.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 27, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { + "directive": "use strict", + "expression": Object { "loc": Object { "end": Object { - "column": 10, + "column": 12, "line": 1, }, "start": Object { - "column": 9, + "column": 0, "line": 1, }, }, - "name": "a", "range": Array [ - 9, - 10, + 0, + 12, ], - "type": "Identifier", + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", }, "loc": Object { "end": Object { - "column": 27, + "column": 13, "line": 1, }, "start": Object { @@ -50418,112 +75682,127 @@ Object { "line": 1, }, }, - "params": Array [ + "range": Array [ + 0, + 13, + ], + "type": "ExpressionStatement", + }, + Object { + "declarations": Array [ Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, + "id": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, }, - "name": "x", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", }, - null, - Object { - "elements": Array [ - null, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, + "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 [ - 17, - 22, - ], - "type": "ArrayPattern", }, - ], + "range": Array [ + 22, + 23, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 11, + 18, 23, ], - "type": "ArrayPattern", + "type": "VariableDeclarator", }, ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, "range": Array [ - 0, - 27, + 14, + 24, ], - "type": "FunctionDeclaration", + "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": 28, - "line": 1, + "column": 13, + "line": 3, }, "start": Object { - "column": 27, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 27, - 28, + 25, + 38, ], - "type": "EmptyStatement", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -50532,14 +75811,14 @@ Object { }, "range": Array [ 0, - 28, + 39, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 12, "line": 1, }, "start": Object { @@ -50549,25 +75828,61 @@ Object { }, "range": Array [ 0, - 8, + 12, ], - "type": "Keyword", - "value": "function", + "type": "String", + "value": "\\"use strict\\"", }, 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": "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", @@ -50575,251 +75890,370 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 6, + "line": 2, }, }, "range": Array [ - 10, - 11, + 20, + 21, ], "type": "Punctuator", - "value": "(", + "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": 12, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ - 11, - 12, + 23, + 24, ], "type": "Punctuator", - "value": "[", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 12, + "line": 3, }, "start": Object { - "column": 12, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 12, - 13, + 25, + 37, ], - "type": "Identifier", - "value": "x", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 13, + "line": 3, }, "start": Object { - "column": 13, - "line": 1, + "column": 12, + "line": 3, }, }, "range": Array [ - 13, - 14, + 37, + 38, ], "type": "Punctuator", - "value": ",", + "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": 16, + "column": 13, "line": 1, }, "start": Object { - "column": 15, + "column": 0, "line": 1, }, }, "range": Array [ - 15, - 16, + 0, + 13, ], - "type": "Punctuator", - "value": ",", + "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": 18, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 17, - 18, + 14, + 26, ], - "type": "Punctuator", - "value": "[", + "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": 19, - "line": 1, + "column": 6, + "line": 3, }, "start": Object { - "column": 18, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 18, - 19, + 27, + 33, ], - "type": "Punctuator", - "value": ",", + "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": 21, + "column": 12, "line": 1, }, "start": Object { - "column": 20, + "column": 0, "line": 1, }, }, "range": Array [ - 20, - 21, + 0, + 12, ], - "type": "Identifier", - "value": "z", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 13, "line": 1, }, "start": Object { - "column": 21, + "column": 12, "line": 1, }, }, "range": Array [ - 21, - 22, + 12, + 13, ], "type": "Punctuator", - "value": "]", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 22, - 23, + 14, + 25, ], - "type": "Punctuator", - "value": "]", + "type": "String", + "value": "\\"use loose\\"", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 23, - 24, + 25, + 26, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 3, + "line": 3, }, "start": Object { - "column": 25, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 25, - 26, + 27, + 30, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 26, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 26, - 27, + 31, + 32, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 6, + "line": 3, }, "start": Object { - "column": 27, - "line": 1, + "column": 5, + "line": 3, }, }, "range": Array [ - 27, - 28, + 32, + 33, ], "type": "Punctuator", "value": ";", @@ -50829,280 +76263,169 @@ Object { } `; -exports[`javascript fixtures/destructuring/params-nested-object.src 1`] = ` +exports[`javascript fixtures/directives/raw.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 { + "directive": "use\\\\x20strict", + "expression": Object { "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 1, }, "start": Object { - "column": 9, + "column": 0, "line": 1, }, }, - "name": "a", "range": Array [ - 9, - 10, + 0, + 15, ], - "type": "Identifier", + "raw": "\\"use\\\\x20strict\\"", + "type": "Literal", + "value": "use strict", }, "loc": Object { "end": Object { - "column": 35, + "column": 16, "line": 1, }, "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 31, - "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": "x", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 12, - 16, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "z", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 18, - 29, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 29, - "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": "a", - "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, - }, - }, - "name": "b", - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 21, - 29, - ], - "type": "ObjectPattern", - }, - }, - ], - "range": Array [ - 11, - 31, - ], - "type": "ObjectPattern", + "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, - 35, + 15, ], - "type": "FunctionDeclaration", + "type": "String", + "value": "\\"use\\\\x20strict\\"", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 16, "line": 1, }, "start": Object { - "column": 35, + "column": 15, "line": 1, }, }, "range": Array [ - 35, - 36, + 15, + 16, ], - "type": "EmptyStatement", + "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": 36, - "line": 1, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -51111,14 +76434,14 @@ Object { }, "range": Array [ 0, - 36, + 27, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { @@ -51128,7 +76451,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", @@ -51136,35 +76477,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 1, }, "start": Object { - "column": 9, + "column": 14, "line": 1, }, }, "range": Array [ - 9, - 10, + 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": "a", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 20, "line": 1, }, "start": Object { - "column": 10, + "column": 19, "line": 1, }, }, "range": Array [ - 10, - 11, + 19, + 20, ], "type": "Punctuator", "value": "(", @@ -51172,92 +76531,303 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 21, "line": 1, }, "start": Object { - "column": 11, + "column": 20, "line": 1, }, }, "range": Array [ - 11, - 12, + 20, + 21, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 23, "line": 1, }, "start": Object { - "column": 12, + "column": 22, "line": 1, }, }, "range": Array [ - 12, - 13, + 22, + 23, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 13, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 13, - 14, + 25, + 26, ], "type": "Punctuator", - "value": ":", + "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": 16, + "column": 5, "line": 1, }, "start": Object { - "column": 15, + "column": 0, "line": 1, }, }, "range": Array [ - 15, - 16, + 0, + 5, ], "type": "Identifier", - "value": "y", + "value": "async", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 14, "line": 1, }, "start": Object { - "column": 16, + "column": 6, "line": 1, }, }, "range": Array [ - 16, - 17, + 6, + 14, ], - "type": "Punctuator", - "value": ",", + "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 { @@ -51274,8 +76844,8 @@ Object { 18, 19, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -51293,7 +76863,7 @@ Object { 20, ], "type": "Punctuator", - "value": ":", + "value": ")", }, Object { "loc": Object { @@ -51316,107 +76886,143 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 23, - 24, + 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": "a", + "value": "await", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "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 [ - 24, - 25, + 38, + 43, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 26, - "line": 1, + "column": 21, + "line": 2, }, }, "range": Array [ - 26, - 27, + 44, + 48, ], "type": "Identifier", - "value": "b", + "value": "item", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 28, + "line": 2, }, "start": Object { - "column": 28, - "line": 1, + "column": 26, + "line": 2, }, }, "range": Array [ - 28, - 29, + 49, + 51, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 34, + "line": 2, }, "start": Object { - "column": 30, - "line": 1, + "column": 29, + "line": 2, }, }, "range": Array [ - 30, - 31, + 52, + 57, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "items", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 35, + "line": 2, }, "start": Object { - "column": 31, - "line": 1, + "column": 34, + "line": 2, }, }, "range": Array [ - 31, - 32, + 57, + 58, ], "type": "Punctuator", "value": ")", @@ -51424,17 +77030,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 37, + "line": 2, }, "start": Object { - "column": 33, - "line": 1, + "column": 36, + "line": 2, }, }, "range": Array [ - 33, - 34, + 59, + 60, ], "type": "Punctuator", "value": "{", @@ -51442,17 +77048,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 34, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 34, - 35, + 66, + 67, ], "type": "Punctuator", "value": "}", @@ -51460,242 +77066,179 @@ Object { Object { "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 35, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 35, - 36, + 68, + 69, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/params-object.src 1`] = ` +exports[`javascript fixtures/experimentalDynamicImport/dynamic-import.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, + "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", }, - }, - "name": "x", - "range": Array [ - 9, - 10, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { + "callee": Object { + "computed": false, "loc": Object { "end": Object { - "column": 19, + "column": 18, "line": 1, }, "start": Object { - "column": 11, + "column": 0, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { + "object": Object { + "arguments": Array [ + Object { "loc": Object { "end": Object { - "column": 14, + "column": 12, "line": 1, }, "start": Object { - "column": 13, + "column": 7, "line": 1, }, }, - "name": "a", "range": Array [ - 13, - 14, + 7, + 12, ], - "type": "Identifier", + "raw": "'foo'", + "type": "Literal", + "value": "foo", }, - "kind": "init", + ], + "callee": Object { "loc": Object { "end": Object { - "column": 14, + "column": 6, "line": 1, }, "start": Object { - "column": 13, + "column": 0, "line": 1, }, }, - "method": false, "range": Array [ - 13, - 14, + 0, + 6, ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, + "type": "Import", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", + "loc": Object { + "end": Object { + "column": 13, + "line": 1, }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, + "start": Object { + "column": 0, + "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": "b", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", + }, + "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 [ - 11, - 19, + 0, + 18, ], - "type": "ObjectPattern", + "type": "MemberExpression", }, - ], - "range": Array [ - 0, - 22, - ], - "type": "FunctionDeclaration", - }, - Object { + "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": 23, + "column": 25, "line": 1, }, "start": Object { - "column": 22, + "column": 0, "line": 1, }, }, "range": Array [ - 22, - 23, + 0, + 25, ], - "type": "EmptyStatement", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -51704,14 +77247,14 @@ Object { }, "range": Array [ 0, - 23, + 26, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 6, "line": 1, }, "start": Object { @@ -51721,64 +77264,64 @@ Object { }, "range": Array [ 0, - 8, + 6, ], "type": "Keyword", - "value": "function", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 7, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, "range": Array [ - 9, - 10, + 6, + 7, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 12, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ - 10, - 11, + 7, + 12, ], - "type": "Punctuator", - "value": "(", + "type": "String", + "value": "'foo'", }, 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 { @@ -51795,13 +77338,13 @@ Object { 13, 14, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 18, "line": 1, }, "start": Object { @@ -51811,28 +77354,10 @@ Object { }, "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, + 18, ], "type": "Identifier", - "value": "b", + "value": "then", }, Object { "loc": Object { @@ -51850,12 +77375,12 @@ Object { 19, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 23, "line": 1, }, "start": Object { @@ -51865,61 +77390,43 @@ Object { }, "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, + 23, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "main", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 24, "line": 1, }, "start": Object { - "column": 21, + "column": 23, "line": 1, }, }, "range": Array [ - 21, - 22, + 23, + 24, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 25, "line": 1, }, "start": Object { - "column": 22, + "column": 24, "line": 1, }, }, "range": Array [ - 22, - 23, + 24, + 25, ], "type": "Punctuator", "value": ";", @@ -51929,222 +77436,183 @@ Object { } `; -exports[`javascript fixtures/destructuring/params-object-wrapped.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/arg-spread.src 1`] = ` Object { - "body": Array [ - Object { - "expression": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 23, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, }, - "name": "x", - "range": Array [ - 10, - 11, - ], - "type": "Identifier", }, + "range": Array [ + 22, + 24, + ], + "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 [ - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 12, - "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, }, - "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", + "start": Object { + "column": 11, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 15, + "column": 13, "line": 1, }, "start": Object { - "column": 14, + "column": 12, "line": 1, }, }, - "method": false, + "name": "a", "range": Array [ - 14, - 15, + 12, + 13, ], - "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", + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, }, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "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 [ - 17, - 18, - ], - "type": "Identifier", }, - "kind": "init", + "name": "a", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 18, + "column": 19, "line": 1, }, "start": Object { - "column": 17, + "column": 18, "line": 1, }, }, - "method": false, + "name": "b", "range": Array [ - 17, 18, + 19, ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 17, - 18, - ], - "type": "Identifier", + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, }, }, - ], - "range": Array [ - 12, - 20, - ], - "type": "ObjectPattern", - }, - ], - "range": Array [ - 1, - 23, - ], - "type": "FunctionExpression", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "range": Array [ + 15, + 19, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 11, + 20, + ], + "type": "ObjectPattern", }, - }, + ], "range": Array [ 0, - 25, + 24, ], - "type": "ExpressionStatement", + "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -52160,7 +77628,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, + "column": 8, "line": 1, }, "start": Object { @@ -52170,28 +77638,28 @@ 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": "c", }, Object { "loc": Object { @@ -52208,8 +77676,8 @@ Object { 10, 11, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -52227,7 +77695,7 @@ Object { 12, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { @@ -52244,31 +77712,31 @@ Object { 12, 13, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 14, "line": 1, }, "start": Object { - "column": 14, + "column": 13, "line": 1, }, }, "range": Array [ + 13, 14, - 15, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { @@ -52278,25 +77746,25 @@ Object { }, "range": Array [ 15, - 16, + 18, ], "type": "Punctuator", - "value": ",", + "value": "...", }, 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", @@ -52337,24 +77805,6 @@ Object { "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 { @@ -52371,7 +77821,7 @@ Object { 23, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { @@ -52389,130 +77839,260 @@ Object { 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": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring/sparse-array.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/destructuring-assign-mirror.src 1`] = ` Object { "body": Array [ Object { "expression": Object { "left": Object { - "elements": Array [ + "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": 1, + "column": 14, "line": 1, }, }, - "name": "a", + "method": false, "range": Array [ - 1, - 2, + 14, + 15, ], - "type": "Identifier", + "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", + }, }, - null, 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": 5, + "column": 21, "line": 1, }, "start": Object { - "column": 4, + "column": 17, "line": 1, }, }, - "name": "b", "range": Array [ - 4, - 5, + 17, + 21, ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "SpreadElement", }, - }, - "range": Array [ - 0, - 6, ], - "type": "ArrayPattern", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 14, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "array", "range": Array [ - 9, - 14, + 13, + 22, ], - "type": "Identifier", + "type": "ObjectExpression", }, "type": "AssignmentExpression", }, "loc": Object { "end": Object { - "column": 15, + "column": 23, "line": 1, }, "start": Object { @@ -52522,15 +78102,15 @@ Object { }, "range": Array [ 0, - 15, + 23, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -52539,7 +78119,7 @@ Object { }, "range": Array [ 0, - 15, + 24, ], "sourceType": "script", "tokens": Array [ @@ -52559,7 +78139,7 @@ Object { 1, ], "type": "Punctuator", - "value": "[", + "value": "(", }, Object { "loc": Object { @@ -52576,8 +78156,8 @@ Object { 1, 2, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -52594,8 +78174,8 @@ Object { 2, 3, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { @@ -52618,25 +78198,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, + "column": 8, "line": 1, }, "start": Object { @@ -52646,474 +78208,316 @@ Object { }, "range": Array [ 5, - 6, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, 8, ], "type": "Punctuator", - "value": "=", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 8, "line": 1, }, }, "range": Array [ + 8, 9, - 14, ], "type": "Identifier", - "value": "array", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 10, "line": 1, }, "start": Object { - "column": 14, + "column": 9, "line": 1, }, }, "range": Array [ - 14, - 15, + 9, + 10, ], "type": "Punctuator", - "value": ";", + "value": "}", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-array.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 4, - ], - "type": "ArrayPattern", - }, - ], - "range": Array [ - 0, - 10, - ], - "type": "ArrowFunctionExpression", - }, "loc": Object { "end": Object { - "column": 11, + "column": 12, "line": 1, }, "start": Object { - "column": 0, + "column": 11, "line": 1, }, }, "range": Array [ - 0, 11, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 11, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, + 12, ], "type": "Punctuator", - "value": "(", + "value": "=", }, 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": "[", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 15, "line": 1, }, "start": Object { - "column": 2, + "column": 14, "line": 1, }, }, "range": Array [ - 2, - 3, + 14, + 15, ], "type": "Identifier", - "value": "y", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 16, "line": 1, }, "start": Object { - "column": 3, + "column": 15, "line": 1, }, }, "range": Array [ - 3, - 4, + 15, + 16, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 20, "line": 1, }, "start": Object { - "column": 4, + "column": 17, "line": 1, }, }, "range": Array [ - 4, - 5, + 17, + 20, ], "type": "Punctuator", - "value": ")", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 21, "line": 1, }, "start": Object { - "column": 6, + "column": 20, "line": 1, }, }, "range": Array [ - 6, - 8, + 20, + 21, ], - "type": "Punctuator", - "value": "=>", + "type": "Identifier", + "value": "b", }, 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": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 23, "line": 1, }, "start": Object { - "column": 10, + "column": 22, "line": 1, }, }, "range": Array [ - 10, - 11, + 22, + 23, ], "type": "Punctuator", - "value": ";", + "value": ")", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-nested-array.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/function-parameter-object-spread.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, }, - "name": "x", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", }, - "expression": true, - "generator": false, - "id": null, + "range": Array [ + 23, + 26, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { "loc": Object { "end": Object { - "column": 15, + "column": 12, "line": 1, }, "start": Object { - "column": 0, + "column": 9, "line": 1, }, }, - "params": Array [ - Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - Object { - "elements": Array [ - 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 [ + 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": 8, + "column": 20, "line": 1, }, "start": Object { - "column": 5, + "column": 17, "line": 1, }, }, + "name": "bar", "range": Array [ - 5, - 8, + 17, + 20, ], - "type": "ArrayPattern", - }, - ], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, + "type": "Identifier", }, - "start": Object { - "column": 1, - "line": 1, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, }, + "range": Array [ + 14, + 20, + ], + "type": "RestElement", }, - "range": Array [ - 1, - 9, - ], - "type": "ArrayPattern", - }, - ], - "range": Array [ - 0, - 15, - ], - "type": "ArrowFunctionExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + ], + "range": Array [ + 13, + 21, + ], + "type": "ObjectPattern", }, - }, + ], "range": Array [ 0, - 16, + 26, ], - "type": "ExpressionStatement", + "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -53122,14 +78526,14 @@ Object { }, "range": Array [ 0, - 16, + 27, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 8, "line": 1, }, "start": Object { @@ -53139,151 +78543,133 @@ 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, + 8, ], - "type": "Punctuator", - "value": "[", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 12, "line": 1, }, "start": Object { - "column": 2, + "column": 9, "line": 1, }, }, "range": Array [ - 2, - 3, + 9, + 12, ], "type": "Identifier", - "value": "y", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 13, "line": 1, }, "start": Object { - "column": 3, + "column": 12, "line": 1, }, }, "range": Array [ - 3, - 4, + 12, + 13, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 14, "line": 1, }, "start": Object { - "column": 5, + "column": 13, "line": 1, }, }, "range": Array [ - 5, - 6, + 13, + 14, ], "type": "Punctuator", - "value": "[", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 17, "line": 1, }, "start": Object { - "column": 6, + "column": 14, "line": 1, }, }, "range": Array [ - 6, - 7, + 14, + 17, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 20, "line": 1, }, "start": Object { - "column": 7, + "column": 17, "line": 1, }, }, "range": Array [ - 7, - 8, + 17, + 20, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "bar", }, 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": 10, + "column": 22, "line": 1, }, "start": Object { - "column": 9, + "column": 21, "line": 1, }, }, "range": Array [ - 9, - 10, + 21, + 22, ], "type": "Punctuator", "value": ")", @@ -53291,108 +78677,60 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 24, "line": 1, }, "start": Object { - "column": 11, + "column": 23, "line": 1, }, }, "range": Array [ - 11, - 13, + 23, + 24, ], "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - "value": "x", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 26, "line": 1, }, "start": Object { - "column": 15, + "column": 25, "line": 1, }, }, "range": Array [ - 15, - 16, + 25, + 26, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-nested-object.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/invalid-rest.src 1`] = `"',' expected."`; + +exports[`javascript fixtures/experimentalObjectRestSpread/invalid-rest-trailing-comma.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 11, + "column": 19, "line": 1, }, "start": Object { - "column": 1, + "column": 4, "line": 1, }, }, @@ -53402,54 +78740,54 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 3, + "column": 7, "line": 1, }, "start": Object { - "column": 2, + "column": 6, "line": 1, }, }, - "name": "y", + "name": "x", "range": Array [ - 2, - 3, + 6, + 7, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 3, + "column": 7, "line": 1, }, "start": Object { - "column": 2, + "column": 6, "line": 1, }, }, "method": false, "range": Array [ - 2, - 3, + 6, + 7, ], "shorthand": true, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 3, + "column": 7, "line": 1, }, "start": Object { - "column": 2, + "column": 6, "line": 1, }, }, - "name": "y", + "name": "x", "range": Array [ - 2, - 3, + 6, + 7, ], "type": "Identifier", }, @@ -53459,18 +78797,18 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 6, + "column": 10, "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, - "name": "a", + "name": "y", "range": Array [ - 5, - 6, + 9, + 10, ], "type": "Identifier", }, @@ -53481,16 +78819,16 @@ Object { "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, "method": false, "range": Array [ - 5, + 9, 10, ], - "shorthand": false, + "shorthand": true, "type": "Property", "value": Object { "loc": Object { @@ -53499,93 +78837,99 @@ Object { "line": 1, }, "start": Object { - "column": 7, + "column": 9, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 8, - 9, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 8, - 9, - ], - "type": "Identifier", - }, - }, - ], + "name": "y", "range": Array [ - 7, + 9, 10, ], - "type": "ObjectPattern", + "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 [ - 1, - 11, + 4, + 19, ], "type": "ObjectPattern", }, - ], - "range": Array [ - 0, - 17, - ], - "type": "ArrowFunctionExpression", - }, + "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": 18, + "column": 26, "line": 1, }, "start": Object { @@ -53595,15 +78939,15 @@ Object { }, "range": Array [ 0, - 18, + 26, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -53612,14 +78956,14 @@ Object { }, "range": Array [ 0, - 18, + 27, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -53629,25 +78973,25 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 5, "line": 1, }, "start": Object { - "column": 1, + "column": 4, "line": 1, }, }, "range": Array [ - 1, - 2, + 4, + 5, ], "type": "Punctuator", "value": "{", @@ -53655,35 +78999,35 @@ 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": "Identifier", - "value": "y", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 8, "line": 1, }, "start": Object { - "column": 3, + "column": 7, "line": 1, }, }, "range": Array [ - 3, - 4, + 7, + 8, ], "type": "Punctuator", "value": ",", @@ -53691,179 +79035,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, + "column": 10, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, "range": Array [ - 6, - 7, + 9, + 10, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 11, "line": 1, }, "start": Object { - "column": 7, + "column": 10, "line": 1, }, }, "range": Array [ - 7, - 8, + 10, + 11, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 15, "line": 1, }, "start": Object { - "column": 8, + "column": 12, "line": 1, }, }, "range": Array [ - 8, - 9, + 12, + 15, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "...", }, 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": "}", + "type": "Identifier", + "value": "z", }, 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, + "column": 19, "line": 1, }, "start": Object { - "column": 11, + "column": 18, "line": 1, }, }, "range": Array [ - 11, - 12, + 18, + 19, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 21, "line": 1, }, "start": Object { - "column": 13, + "column": 20, "line": 1, }, }, "range": Array [ - 13, - 15, + 20, + 21, ], "type": "Punctuator", - "value": "=>", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 25, "line": 1, }, "start": Object { - "column": 16, + "column": 22, "line": 1, }, }, "range": Array [ - 16, - 17, + 22, + 25, ], "type": "Identifier", - "value": "x", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 26, "line": 1, }, "start": Object { - "column": 17, + "column": 25, "line": 1, }, }, "range": Array [ - 17, - 18, + 25, + 26, ], "type": "Punctuator", "value": ";", @@ -53873,52 +79199,188 @@ Object { } `; -exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/object-rest.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, + "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", }, - "name": "x", - "range": Array [ - 26, - 27, - ], - "type": "Identifier", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { + "init": Object { "loc": Object { "end": Object { - "column": 21, + "column": 47, "line": 1, }, "start": Object { - "column": 1, + "column": 21, "line": 1, }, }, @@ -53928,190 +79390,261 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 5, + "column": 24, "line": 1, }, "start": Object { - "column": 2, + "column": 23, "line": 1, }, }, - "name": "foo", + "name": "x", "range": Array [ - 2, - 5, + 23, + 24, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 8, + "column": 27, "line": 1, }, "start": Object { - "column": 2, + "column": 23, "line": 1, }, }, "method": false, "range": Array [ - 2, - 8, + 23, + 27, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 8, + "column": 27, "line": 1, }, "start": Object { - "column": 7, + "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 [ - 7, - 8, + 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": 11, + "column": 36, "line": 1, }, "start": Object { - "column": 10, + "column": 35, "line": 1, }, }, "name": "a", "range": Array [ - 10, - 11, + 35, + 36, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 20, + "column": 39, "line": 1, }, "start": Object { - "column": 10, + "column": 35, "line": 1, }, }, "method": false, "range": Array [ - 10, - 20, + 35, + 39, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 20, + "column": 39, "line": 1, }, "start": Object { - "column": 12, + "column": 38, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 13, - 19, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - }, + "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 [ - 12, - 20, + 44, + 45, ], - "type": "ObjectPattern", + "raw": "4", + "type": "Literal", + "value": 4, }, }, ], "range": Array [ - 1, 21, + 47, ], - "type": "ObjectPattern", + "type": "ObjectExpression", }, - ], - "range": Array [ - 0, - 27, - ], - "type": "ArrowFunctionExpression", - }, + "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": 28, + "column": 48, "line": 1, }, "start": Object { @@ -54121,15 +79654,15 @@ Object { }, "range": Array [ 0, - 28, + 48, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -54138,14 +79671,14 @@ Object { }, "range": Array [ 0, - 28, + 49, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -54155,25 +79688,25 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 5, "line": 1, }, "start": Object { - "column": 1, + "column": 4, "line": 1, }, }, "range": Array [ - 1, - 2, + 4, + 5, ], "type": "Punctuator", "value": "{", @@ -54181,53 +79714,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { - "column": 2, + "column": 6, "line": 1, }, }, "range": Array [ - 2, - 5, + 6, + 7, ], "type": "Identifier", - "value": "foo", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 8, "line": 1, }, "start": Object { - "column": 5, + "column": 7, "line": 1, }, }, "range": Array [ - 5, - 6, + 7, + 8, ], "type": "Punctuator", - "value": ":", + "value": ",", }, 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": "Identifier", "value": "y", @@ -54235,17 +79768,17 @@ Object { 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": ",", @@ -54253,53 +79786,89 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 15, "line": 1, }, "start": Object { - "column": 10, + "column": 12, "line": 1, }, }, "range": Array [ - 10, - 11, + 12, + 15, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, ], "type": "Identifier", - "value": "a", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 18, "line": 1, }, "start": Object { - "column": 11, + "column": 17, "line": 1, }, }, "range": Array [ - 11, - 12, + 17, + 18, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 20, "line": 1, }, "start": Object { - "column": 12, + "column": 19, "line": 1, }, }, "range": Array [ - 12, - 13, + 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": "{", @@ -54307,35 +79876,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, + "column": 24, "line": 1, }, "start": Object { - "column": 13, + "column": 23, "line": 1, }, }, "range": Array [ - 13, - 16, + 23, + 24, ], "type": "Identifier", - "value": "bar", + "value": "x", }, 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": ":", @@ -54343,125 +79912,269 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 27, "line": 1, }, "start": Object { - "column": 18, + "column": 26, "line": 1, }, }, "range": Array [ - 18, - 19, + 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": "x", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 31, "line": 1, }, "start": Object { - "column": 19, + "column": 30, "line": 1, }, }, "range": Array [ - 19, - 20, + 30, + 31, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 33, "line": 1, }, "start": Object { - "column": 20, + "column": 32, "line": 1, }, }, "range": Array [ - 20, - 21, + 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": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 36, "line": 1, }, "start": Object { - "column": 21, + "column": 35, "line": 1, }, }, "range": Array [ - 21, - 22, + 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": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 39, "line": 1, }, "start": Object { - "column": 23, + "column": 38, "line": 1, }, }, "range": Array [ - 23, - 25, + 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": "=>", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 42, "line": 1, }, "start": Object { - "column": 26, + "column": 41, "line": 1, }, }, "range": Array [ - 26, - 27, + 41, + 42, ], "type": "Identifier", - "value": "x", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 43, "line": 1, }, "start": Object { - "column": 27, + "column": 42, "line": 1, }, }, "range": Array [ - 27, - 28, + 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": ";", @@ -54471,53 +80184,167 @@ Object { } `; -exports[`javascript fixtures/destructuring-and-arrowFunctions/arrow-param-object.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/property-spread.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "async": false, - "body": 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": 10, + "column": 7, "line": 1, }, "start": Object { - "column": 9, + "column": 4, "line": 1, }, }, - "name": "x", "range": Array [ - 9, - 10, + 4, + 7, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, + 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", + }, + 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", }, - "params": Array [ - Object { + ], + "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": 4, - "line": 1, + "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": 1, + "line": 9, + }, + "start": Object { + "column": 8, + "line": 5, }, }, "properties": Array [ @@ -54526,93 +80353,232 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 2, - "line": 1, + "column": 4, + "line": 6, }, }, - "name": "y", + "name": "foo", "range": Array [ - 2, - 3, + 42, + 45, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 2, - "line": 1, + "column": 4, + "line": 6, }, }, "method": false, "range": Array [ - 2, - 3, + 42, + 50, ], - "shorthand": true, + "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 2, - "line": 1, + "column": 9, + "line": 6, }, }, - "name": "y", + "name": "foo", "range": Array [ - 2, - 3, + 47, + 50, + ], + "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 [ + 56, + 59, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 12, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "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", }, }, + Object { + "argument": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 14, + "line": 8, + }, + "start": Object { + "column": 7, + "line": 8, + }, + }, + "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 [ + 73, + 80, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 70, + 80, + ], + "type": "SpreadElement", + }, ], "range": Array [ - 1, - 4, + 36, + 82, ], - "type": "ObjectPattern", + "type": "ObjectExpression", }, - ], - "range": Array [ - 0, - 10, - ], - "type": "ArrowFunctionExpression", - }, + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 32, + 82, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, - 11, + 28, + 83, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 0, + "line": 10, }, "start": Object { "column": 0, @@ -54621,14 +80587,14 @@ Object { }, "range": Array [ 0, - 11, + 84, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -54638,69 +80604,15 @@ 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, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "y", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ 3, - 4, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { @@ -54710,10 +80622,10 @@ Object { }, "range": Array [ 4, - 5, + 7, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { @@ -54722,960 +80634,515 @@ Object { "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": 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": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": ";", + "value": "get", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring-and-arrowFunctions/param-defaults-array.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "elements": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 8, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - ], - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 9, - ], - "type": "ArrayPattern", - }, - ], - "range": Array [ - 0, - 15, - ], - "type": "ArrowFunctionExpression", - }, "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 0, - 15, + 16, + 17, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ",", }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 0, - 1, + 22, + 25, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 1, - "line": 1, + "column": 7, + "line": 3, }, }, "range": Array [ - 1, - 2, + 25, + 26, ], "type": "Punctuator", - "value": "[", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 3, - "line": 1, + "line": 5, }, "start": Object { - "column": 2, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 2, - 3, + 28, + 31, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 5, }, "start": Object { "column": 4, - "line": 1, + "line": 5, }, }, "range": Array [ - 4, - 5, + 32, + 33, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 7, + "line": 5, }, "start": Object { "column": 6, - "line": 1, + "line": 5, }, }, "range": Array [ - 6, - 8, + 34, + 35, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { "column": 9, - "line": 1, + "line": 5, }, "start": Object { "column": 8, - "line": 1, + "line": 5, }, }, "range": Array [ - 8, - 9, + 36, + 37, ], "type": "Punctuator", - "value": "]", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 9, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 9, - 10, + 42, + 45, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 8, + "line": 6, }, "start": Object { - "column": 11, - "line": 1, + "column": 7, + "line": 6, }, }, "range": Array [ - 11, - 13, + 45, + 46, ], "type": "Punctuator", - "value": "=>", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 14, - "line": 1, + "column": 9, + "line": 6, }, }, "range": Array [ - 14, - 15, + 47, + 50, ], "type": "Identifier", - "value": "x", + "value": "foo", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring-and-arrowFunctions/param-defaults-object.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", + "loc": Object { + "end": Object { + "column": 13, + "line": 6, }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "start": Object { + "column": 12, + "line": 6, }, - "params": 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": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 2, - 8, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 8, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, - }, - ], - "range": Array [ - 1, - 9, - ], - "type": "ObjectPattern", - }, - ], - "range": Array [ - 0, - 15, - ], - "type": "ArrowFunctionExpression", }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": ",", + }, + Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 7, + "line": 7, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 7, }, }, "range": Array [ - 0, - 15, + 56, + 59, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "get", }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 1, + "column": 8, + "line": 7, }, "start": Object { - "column": 0, - "line": 1, + "column": 7, + "line": 7, }, }, "range": Array [ - 0, - 1, + 59, + 60, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 1, + "column": 12, + "line": 7, }, "start": Object { - "column": 1, - "line": 1, + "column": 9, + "line": 7, }, }, "range": Array [ - 1, - 2, + 61, + 64, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 13, + "line": 7, }, "start": Object { - "column": 2, - "line": 1, + "column": 12, + "line": 7, }, }, "range": Array [ - 2, - 3, + 64, + 65, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 7, + "line": 8, }, "start": Object { "column": 4, - "line": 1, + "line": 8, }, }, "range": Array [ - 4, - 5, + 70, + 73, ], "type": "Punctuator", - "value": "=", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 10, + "line": 8, }, "start": Object { - "column": 6, - "line": 1, + "column": 7, + "line": 8, }, }, "range": Array [ - 6, - 8, + 73, + 76, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 11, + "line": 8, }, "start": Object { - "column": 8, - "line": 1, + "column": 10, + "line": 8, }, }, "range": Array [ - 8, - 9, + 76, + 77, ], "type": "Punctuator", - "value": "}", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 14, + "line": 8, }, "start": Object { - "column": 9, - "line": 1, + "column": 11, + "line": 8, }, }, "range": Array [ - 9, - 10, + 77, + 80, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { - "column": 11, - "line": 1, + "column": 0, + "line": 9, }, }, "range": Array [ - 11, - 13, + 81, + 82, ], "type": "Punctuator", - "value": "=>", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { - "column": 14, - "line": 1, + "column": 1, + "line": 9, }, }, "range": Array [ - 14, - 15, + 82, + 83, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring-and-arrowFunctions/param-defaults-object-nested.src 1`] = ` -Object { - "body": Array [ - Object { - "expression": Object { - "async": false, - "body": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - }, - Object { +exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-method-args.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": 34, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 33, - "line": 1, + "column": 4, + "line": 2, }, }, - "name": "z", + "name": "initialize", "range": Array [ - 33, - 34, + 7, + 17, ], "type": "Identifier", }, - ], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 35, - ], - "type": "ArrayExpression", - }, - "expression": true, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { + "kind": "init", "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 1, - "line": 1, + "column": 4, + "line": 2, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - "kind": "init", + "method": true, + "range": Array [ + 7, + 104, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 2, - "line": 1, + "column": 48, + "line": 2, }, }, - "method": false, "range": Array [ - 2, - 8, + 51, + 104, ], - "shorthand": true, - "type": "Property", - "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 8, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 8, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - "type": "AssignmentPattern", - }, + "type": "BlockStatement", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "y", - "range": Array [ - 10, - 11, - ], - "type": "Identifier", + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, + "start": Object { + "column": 14, + "line": 2, }, - "method": false, - "range": Array [ - 10, - 23, - ], - "shorthand": false, - "type": "Property", - "value": Object { + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 46, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 15, + "line": 2, }, }, "properties": Array [ @@ -55684,307 +81151,237 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 16, + "line": 2, }, }, - "name": "z", + "name": "someVar", "range": Array [ - 15, - 16, + 19, + 26, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 16, + "line": 2, }, }, "method": false, "range": Array [ - 15, - 21, + 19, + 26, ], "shorthand": true, "type": "Property", "value": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, }, - "name": "z", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", }, + "name": "someVar", + "range": Array [ + 19, + 26, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 33, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 25, + "line": 2, }, }, + "name": "otherVar", "range": Array [ - 15, - 21, + 28, + 36, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, + "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, }, - "range": Array [ - 19, - 21, - ], - "raw": "10", - "type": "Literal", - "value": 10, }, - "type": "AssignmentPattern", + "name": "otherVar", + "range": Array [ + 28, + 36, + ], + "type": "Identifier", }, }, - ], - "range": Array [ - 13, - 23, - ], - "type": "ObjectPattern", - }, - }, - ], - "range": Array [ - 1, - 24, - ], - "type": "ObjectPattern", - }, - ], - "range": Array [ - 0, - 35, - ], - "type": "ArrowFunctionExpression", - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 1, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "range": Array [ - 1, - 2, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + 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", + }, + "loc": Object { + "end": Object { + "column": 45, + "line": 2, + }, + "start": Object { + "column": 35, + "line": 2, + }, + }, + "range": Array [ + 38, + 48, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 18, + 49, + ], + "type": "ObjectPattern", + }, + ], + "range": Array [ + 17, + 104, + ], + "type": "FunctionExpression", + }, + }, + ], + "range": Array [ + 1, + 106, + ], + "type": "ObjectExpression", }, - "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "=", - }, - Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, "range": Array [ - 6, - 8, + 0, + 108, ], - "type": "Numeric", - "value": "10", + "type": "ExpressionStatement", }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 9, - ], - "type": "Punctuator", - "value": ",", + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - "value": "y", + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 109, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, + "column": 1, "line": 1, }, "start": Object { - "column": 11, + "column": 0, "line": 1, }, }, "range": Array [ - 11, - 12, + 0, + 1, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 2, "line": 1, }, "start": Object { - "column": 13, + "column": 1, "line": 1, }, }, "range": Array [ - 13, - 14, + 1, + 2, ], "type": "Punctuator", "value": "{", @@ -55992,30 +81389,30 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 15, - 16, + 7, + 17, ], "type": "Identifier", - "value": "z", + "value": "initialize", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ @@ -56023,148 +81420,94 @@ Object { 18, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ + 18, 19, - 21, ], - "type": "Numeric", - "value": "10", + "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, + 19, + 26, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "someVar", }, Object { "loc": Object { "end": Object { "column": 24, - "line": 1, + "line": 2, }, "start": Object { "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, + "line": 2, }, }, "range": Array [ 26, - 28, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, + 27, ], "type": "Punctuator", - "value": "[", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 33, + "line": 2, }, "start": Object { - "column": 30, - "line": 1, + "column": 25, + "line": 2, }, }, "range": Array [ - 30, - 31, + 28, + 36, ], "type": "Identifier", - "value": "x", + "value": "otherVar", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 34, + "line": 2, }, "start": Object { - "column": 31, - "line": 1, + "column": 33, + "line": 2, }, }, "range": Array [ - 31, - 32, + 36, + 37, ], "type": "Punctuator", "value": ",", @@ -56172,296 +81515,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 38, + "line": 2, }, "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Identifier", - "value": "z", - }, - Object { - "loc": Object { - "end": Object { "column": 35, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, + "line": 2, }, }, "range": Array [ - 34, - 35, + 38, + 41, ], "type": "Punctuator", - "value": "]", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring-and-blockBindings/array-const-undefined.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ - 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": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "ArrayPattern", - }, - "init": Object { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 14, - ], - "type": "ArrayExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "const", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "value": "...", }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 45, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 38, + "line": 2, }, }, "range": Array [ - 0, - 5, + 41, + 48, ], - "type": "Keyword", - "value": "const", + "type": "Identifier", + "value": "options", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 46, + "line": 2, }, "start": Object { - "column": 6, - "line": 1, + "column": 45, + "line": 2, }, }, "range": Array [ - 6, - 7, + 48, + 49, ], "type": "Punctuator", - "value": "[", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 47, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 46, + "line": 2, }, }, "range": Array [ - 7, - 8, + 49, + 50, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 49, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 48, + "line": 2, }, }, "range": Array [ - 8, - 9, + 51, + 52, ], "type": "Punctuator", - "value": "]", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 10, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 10, - 11, + 103, + 104, ], "type": "Punctuator", - "value": "=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 12, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 12, - 13, + 105, + 106, ], "type": "Punctuator", - "value": "[", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 2, + "line": 5, }, "start": Object { - "column": 13, - "line": 1, + "column": 1, + "line": 5, }, }, "range": Array [ - 13, - 14, + 106, + 107, ], "type": "Punctuator", - "value": "]", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { - "column": 14, - "line": 1, + "column": 2, + "line": 5, }, }, - "range": Array [ - 14, - 15, + "range": Array [ + 107, + 108, ], "type": "Punctuator", "value": ";", @@ -56471,36 +81679,16 @@ Object { } `; -exports[`javascript fixtures/destructuring-and-blockBindings/array-let-undefined.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-methods.src 1`] = ` Object { "body": Array [ Object { "declarations": Array [ Object { "id": Object { - "elements": Array [ - 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": 7, + "column": 5, "line": 1, }, "start": Object { @@ -56508,34 +81696,284 @@ Object { "line": 1, }, }, + "name": "x", "range": Array [ 4, - 7, + 5, ], - "type": "ArrayPattern", + "type": "Identifier", }, "init": Object { - "elements": Array [], "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 10, + "column": 8, "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 [ + 14, + 24, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "method": true, + "range": Array [ + 14, + 111, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 48, + "line": 2, + }, + }, + "range": Array [ + 58, + 111, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "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", + }, + ], + "range": Array [ + 24, + 111, + ], + "type": "FunctionExpression", + }, + }, + ], "range": Array [ - 10, - 12, + 8, + 113, ], - "type": "ArrayExpression", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { "column": 4, @@ -56544,16 +81982,16 @@ Object { }, "range": Array [ 4, - 12, + 113, ], "type": "VariableDeclarator", }, ], - "kind": "let", + "kind": "var", "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 2, + "line": 5, }, "start": Object { "column": 0, @@ -56562,15 +82000,15 @@ Object { }, "range": Array [ 0, - 13, + 114, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 2, + "line": 5, }, "start": Object { "column": 0, @@ -56579,7 +82017,7 @@ Object { }, "range": Array [ 0, - 13, + 114, ], "sourceType": "script", "tokens": Array [ @@ -56599,7 +82037,7 @@ Object { 3, ], "type": "Keyword", - "value": "let", + "value": "var", }, Object { "loc": Object { @@ -56616,26 +82054,8 @@ Object { 4, 5, ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], "type": "Identifier", - "value": "a", + "value": "x", }, Object { "loc": Object { @@ -56653,7 +82073,7 @@ Object { 7, ], "type": "Punctuator", - "value": "]", + "value": "=", }, Object { "loc": Object { @@ -56671,322 +82091,184 @@ Object { 9, ], "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "[", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 11, - 12, + 14, + 24, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "initialize", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring-and-blockBindings/object-const-named.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, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 7, - 10, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 6, - 11, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 14, - 16, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 16, - ], - "type": "VariableDeclarator", - }, + 24, + 25, ], - "kind": "const", + "type": "Punctuator", + "value": "(", + }, + Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 0, - 17, + 25, + 26, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "{", }, - }, - "range": Array [ - 0, - 17, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 0, - 5, + 26, + 33, ], - "type": "Keyword", - "value": "const", + "type": "Identifier", + "value": "someVar", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 24, + "line": 2, }, "start": Object { - "column": 6, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ - 6, - 7, + 33, + 34, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 33, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 25, + "line": 2, }, }, "range": Array [ - 7, - 8, + 35, + 43, ], "type": "Identifier", - "value": "a", + "value": "otherVar", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 34, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 33, + "line": 2, }, }, "range": Array [ - 8, - 9, + 43, + 44, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 38, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 35, + "line": 2, }, }, "range": Array [ - 9, - 10, + 45, + 48, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 2, + }, + "start": Object { + "column": 38, + "line": 2, + }, + }, + "range": Array [ + 48, + 55, ], "type": "Identifier", - "value": "b", + "value": "options", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 46, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 45, + "line": 2, }, }, "range": Array [ - 10, - 11, + 55, + 56, ], "type": "Punctuator", "value": "}", @@ -56994,35 +82276,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 47, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 46, + "line": 2, }, }, "range": Array [ - 12, - 13, + 56, + 57, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 49, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 48, + "line": 2, }, }, "range": Array [ - 14, - 15, + 58, + 59, ], "type": "Punctuator", "value": "{", @@ -57030,17 +82312,17 @@ Object { 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, + 110, + 111, ], "type": "Punctuator", "value": "}", @@ -57048,17 +82330,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 16, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 16, - 17, + 112, + 113, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 5, + }, + "start": Object { + "column": 1, + "line": 5, + }, + }, + "range": Array [ + 113, + 114, ], "type": "Punctuator", "value": ";", @@ -57068,7 +82368,7 @@ Object { } `; -exports[`javascript fixtures/destructuring-and-blockBindings/object-const-undefined.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-properties.src 1`] = ` Object { "body": Array [ Object { @@ -57077,136 +82377,356 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { - "column": 6, + "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": 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": 8, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 7, - "line": 1, + "column": 4, + "line": 6, }, }, - "name": "a", + "name": "foo", "range": Array [ - 7, - 8, + 42, + 45, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 8, - "line": 1, + "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": 1, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, }, }, "method": false, "range": Array [ - 7, - 8, + 51, + 54, ], "shorthand": true, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "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": 1, + "line": 8, }, }, - "name": "a", + "name": "set", "range": Array [ - 7, - 8, + 63, + 66, ], "type": "Identifier", }, + "loc": Object { + "end": Object { + "column": 10, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 60, + 66, + ], + "type": "SpreadElement", }, ], "range": Array [ - 6, - 9, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 12, - 14, + 36, + 68, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { - "column": 6, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 6, - 14, + 32, + 68, ], "type": "VariableDeclarator", }, ], - "kind": "const", + "kind": "var", "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, - 15, + 28, + 69, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 0, + "line": 10, }, "start": Object { "column": 0, @@ -57215,14 +82735,14 @@ Object { }, "range": Array [ 0, - 15, + 70, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -57232,10 +82752,10 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "const", + "value": "var", }, Object { "loc": Object { @@ -57244,16 +82764,16 @@ Object { "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, + 4, 7, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { @@ -57270,287 +82790,149 @@ Object { 7, 8, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "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": 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": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 12, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 12, - 13, + 22, + 25, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 13, - "line": 1, + "column": 7, + "line": 3, }, }, "range": Array [ - 13, - 14, + 25, + 26, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { - "column": 14, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 14, - 15, + 28, + 31, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "var", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring-and-blockBindings/object-let-named.src 1`] = ` -Object { - "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "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": "a", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 5, - 8, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 4, - 9, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "properties": Array [], - "range": Array [ - 12, - 14, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "let", "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 0, - 15, + 32, + 33, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "x", }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 7, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 6, + "line": 5, }, }, "range": Array [ - 0, - 3, + 34, + 35, ], - "type": "Keyword", - "value": "let", + "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, + 36, + 37, ], "type": "Punctuator", "value": "{", @@ -57558,167 +82940,313 @@ Object { Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 5, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 5, - 6, + 42, + 45, ], "type": "Identifier", - "value": "a", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 8, + "line": 6, }, "start": Object { - "column": 6, - "line": 1, + "column": 7, + "line": 6, }, }, "range": Array [ - 6, - 7, + 45, + 46, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 7, + "line": 7, }, "start": Object { - "column": 7, - "line": 1, + "column": 4, + "line": 7, }, }, "range": Array [ - 7, - 8, + 51, + 54, ], "type": "Identifier", - "value": "b", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 8, + "line": 7, }, "start": Object { - "column": 8, - "line": 1, + "column": 7, + "line": 7, }, }, "range": Array [ - 8, - 9, + 54, + 55, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 7, + "line": 8, }, "start": Object { - "column": 10, - "line": 1, + "column": 4, + "line": 8, }, }, "range": Array [ - 10, - 11, + 60, + 63, ], "type": "Punctuator", - "value": "=", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 10, + "line": 8, }, "start": Object { - "column": 12, - "line": 1, + "column": 7, + "line": 8, }, }, "range": Array [ - 12, - 13, + 63, + 66, + ], + "type": "Identifier", + "value": "set", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 9, + }, + }, + "range": Array [ + 67, + 68, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { - "column": 13, - "line": 1, + "column": 1, + "line": 9, + }, + }, + "range": Array [ + 68, + 69, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/experimentalObjectRestSpread/single-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", + }, + 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", }, - }, - "range": Array [ - 13, - 14, ], - "type": "Punctuator", - "value": "}", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 14, + "column": 0, "line": 1, }, }, "range": Array [ - 14, - 15, + 0, + 26, ], - "type": "Punctuator", - "value": ";", + "type": "VariableDeclaration", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring-and-blockBindings/object-let-undefined.src 1`] = ` -Object { - "body": Array [ Object { "declarations": Array [ Object { "id": Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { "column": 4, - "line": 1, + "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 [ @@ -57727,122 +83255,196 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 5, - "line": 1, + "column": 4, + "line": 6, }, }, - "name": "a", + "name": "foo", "range": Array [ - 5, - 6, + 42, + 45, ], "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 5, - "line": 1, + "column": 4, + "line": 6, }, }, "method": false, "range": Array [ - 5, - 6, + 42, + 50, ], - "shorthand": true, + "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 5, - "line": 1, + "column": 9, + "line": 6, }, }, - "name": "a", + "name": "foo", "range": Array [ - 5, - 6, + 47, + 50, ], "type": "Identifier", }, }, - ], - "range": Array [ - 4, - 7, - ], - "type": "ObjectPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, + 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, + }, + }, + "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": 10, - "line": 1, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 8, + }, + "start": Object { + "column": 7, + "line": 8, + }, + }, + "name": "set", + "range": Array [ + 73, + 76, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 10, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 70, + 76, + ], + "type": "SpreadElement", }, - }, - "properties": Array [], + ], "range": Array [ - 10, - 12, + 36, + 78, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { "column": 4, - "line": 1, + "line": 5, }, }, "range": Array [ - 4, - 12, + 32, + 78, ], "type": "VariableDeclarator", }, ], - "kind": "let", + "kind": "var", "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, - 13, + 28, + 79, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 0, + "line": 10, }, "start": Object { "column": 0, @@ -57851,7 +83453,7 @@ Object { }, "range": Array [ 0, - 13, + 80, ], "sourceType": "script", "tokens": Array [ @@ -57871,12 +83473,12 @@ Object { 3, ], "type": "Keyword", - "value": "let", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 1, }, "start": Object { @@ -57886,541 +83488,367 @@ Object { }, "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": "Identifier", - "value": "a", + "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": 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": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 7, + "line": 3, }, "start": Object { - "column": 11, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 11, - 12, + 22, + 25, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 12, - "line": 1, + "column": 7, + "line": 3, }, }, "range": Array [ - 12, - 13, + 25, + 26, ], "type": "Punctuator", "value": ";", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring-and-defaultParams/param-array.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 24, - ], - "type": "BlockStatement", - }, - "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, + "column": 3, + "line": 5, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, - "params": Array [ - Object { - "left": Object { - "elements": Array [ - 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": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "ArrayPattern", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 20, - ], - "right": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 19, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - ], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "ArrayExpression", - }, - "type": "AssignmentPattern", - }, - ], "range": Array [ - 0, - 24, + 28, + 31, ], - "type": "FunctionDeclaration", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 24, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 24, - 25, + 32, + 33, ], - "type": "EmptyStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "x", }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 7, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 6, + "line": 5, }, }, "range": Array [ - 0, - 8, + 34, + 35, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 9, + "line": 5, }, "start": Object { - "column": 9, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 9, - 10, + 36, + 37, ], - "type": "Identifier", - "value": "f", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 10, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 10, - 11, + 42, + 45, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 8, + "line": 6, }, "start": Object { - "column": 11, - "line": 1, + "column": 7, + "line": 6, }, }, "range": Array [ - 11, - 12, + 45, + 46, ], "type": "Punctuator", - "value": "[", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 12, - "line": 1, + "column": 9, + "line": 6, }, }, "range": Array [ - 12, - 13, + 47, + 50, ], "type": "Identifier", - "value": "x", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 13, + "line": 6, }, "start": Object { - "column": 13, - "line": 1, + "column": 12, + "line": 6, }, }, "range": Array [ - 13, - 14, + 50, + 51, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 7, + "line": 7, }, "start": Object { - "column": 15, - "line": 1, + "column": 4, + "line": 7, }, }, "range": Array [ - 15, - 16, + 56, + 59, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 8, + "line": 7, }, "start": Object { - "column": 17, - "line": 1, + "column": 7, + "line": 7, }, }, "range": Array [ - 17, - 18, + 59, + 60, ], "type": "Punctuator", - "value": "[", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 12, + "line": 7, }, "start": Object { - "column": 18, - "line": 1, + "column": 9, + "line": 7, }, }, "range": Array [ - 18, - 19, + 61, + 64, ], - "type": "Numeric", - "value": "1", + "type": "Identifier", + "value": "get", }, 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, + 64, + 65, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 7, + "line": 8, }, "start": Object { - "column": 20, - "line": 1, + "column": 4, + "line": 8, }, }, "range": Array [ - 20, - 21, + 70, + 73, ], "type": "Punctuator", - "value": ")", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 10, + "line": 8, }, "start": Object { - "column": 22, - "line": 1, + "column": 7, + "line": 8, }, }, "range": Array [ - 22, - 23, + 73, + 76, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 9, }, }, "range": Array [ - 23, - 24, + 77, + 78, ], "type": "Punctuator", "value": "}", @@ -58428,17 +83856,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { - "column": 24, - "line": 1, + "column": 1, + "line": 9, }, }, "range": Array [ - 24, - 25, + 78, + 79, ], "type": "Punctuator", "value": ";", @@ -58448,260 +83876,181 @@ Object { } `; -exports[`javascript fixtures/destructuring-and-defaultParams/param-object.src 1`] = ` +exports[`javascript fixtures/experimentalObjectRestSpread/spread-trailing-comma.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": "f", - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 30, + "column": 16, "line": 1, }, "start": Object { - "column": 0, + "column": 1, "line": 1, }, }, - "operator": "=", - "range": Array [ - 0, - 30, - ], - "right": Object { - "async": false, - "body": Object { - "body": Array [], + "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": 30, + "column": 4, "line": 1, }, "start": Object { - "column": 28, + "column": 3, "line": 1, }, }, + "method": false, "range": Array [ - 28, - 30, + 3, + 4, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "params": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "x", - "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": "x", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 13, - 16, - ], - "type": "ObjectPattern", }, + "name": "a", + "range": Array [ + 3, + 4, + ], + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 26, + "column": 7, "line": 1, }, "start": Object { - "column": 13, + "column": 6, "line": 1, }, }, + "name": "b", "range": Array [ - 13, - 26, + 6, + 7, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 20, - 25, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "raw": "10", - "type": "Literal", - "value": 10, - }, - }, - ], - "range": Array [ - 19, - 26, - ], - "type": "ObjectExpression", + "type": "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, + }, }, - "type": "AssignmentPattern", + "name": "b", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", }, - ], - "range": Array [ - 4, - 30, - ], - "type": "FunctionExpression", - }, - "type": "AssignmentExpression", + }, + 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": 31, + "column": 17, "line": 1, }, "start": Object { @@ -58711,15 +84060,15 @@ Object { }, "range": Array [ 0, - 31, + 17, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -58728,7 +84077,7 @@ Object { }, "range": Array [ 0, - 31, + 18, ], "sourceType": "script", "tokens": Array [ @@ -58747,31 +84096,49 @@ Object { 0, 1, ], - "type": "Identifier", - "value": "f", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 2, "line": 1, }, "start": Object { - "column": 2, + "column": 1, "line": 1, }, }, "range": Array [ + 1, 2, - 3, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, + "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 { @@ -58781,10 +84148,64 @@ 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": "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": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { @@ -58801,8 +84222,8 @@ Object { 12, 13, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { @@ -58814,627 +84235,598 @@ Object { "column": 13, "line": 1, }, - }, - "range": Array [ - 13, - 14, + }, + "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 { + "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": 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": 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, + }, + }, + "range": Array [ + 68, + 74, + ], + "type": "SpreadElement", + }, + ], + "range": Array [ + 36, + 76, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 9, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 32, + 76, + ], + "type": "VariableDeclarator", + }, ], - "type": "Punctuator", - "value": "{", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { - "column": 14, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 14, - 15, + 28, + 77, ], - "type": "Identifier", - "value": "x", + "type": "VariableDeclaration", }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, - ], - "type": "Punctuator", - "value": "}", + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 10, }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "=", + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 78, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 20, + "column": 3, "line": 1, }, "start": Object { - "column": 19, + "column": 0, "line": 1, }, }, "range": Array [ - 19, - 20, + 0, + 3, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 7, "line": 1, }, "start": Object { - "column": 20, + "column": 4, "line": 1, }, }, "range": Array [ - 20, - 21, + 4, + 7, ], "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 25, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 27, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "{", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 8, "line": 1, }, "start": Object { - "column": 29, + "column": 7, "line": 1, }, }, "range": Array [ - 29, - 30, + 7, + 8, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 30, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring-and-defaultParams/param-object-short.src 1`] = ` -Object { - "body": Array [ - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 22, - "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": "f", - "range": Array [ - 2, - 3, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "method": true, - "range": Array [ - 2, - 21, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 21, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "params": Array [ - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 7, - "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": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 5, - 6, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "x", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 4, - 7, - ], - "type": "ObjectPattern", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 17, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "x", - "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": "10", - "type": "Literal", - "value": 10, - }, - }, - ], - "range": Array [ - 10, - 17, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentPattern", - }, - ], - "range": Array [ - 3, - 21, - ], - "type": "FunctionExpression", - }, - }, - ], - "range": Array [ - 1, - 22, - ], - "type": "ObjectExpression", - }, + 13, + 16, + ], + "type": "Identifier", + "value": "get", + }, + Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 0, - 24, + 16, + 17, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "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": 7, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 0, - 1, + 22, + 25, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 1, - "line": 1, + "column": 7, + "line": 3, }, }, "range": Array [ - 1, - 2, + 25, + 26, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 3, - "line": 1, + "line": 5, }, "start": Object { - "column": 2, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 2, - 3, + 28, + 31, ], - "type": "Identifier", - "value": "f", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { "column": 4, - "line": 1, + "line": 5, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 5, }, "start": Object { - "column": 3, - "line": 1, + "column": 6, + "line": 5, }, }, "range": Array [ - 3, - 4, + 34, + 35, ], "type": "Punctuator", - "value": "(", + "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, + 36, + 37, ], "type": "Punctuator", "value": "{", @@ -59442,179 +84834,330 @@ Object { Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 5, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 5, - 6, + 42, + 45, ], "type": "Identifier", - "value": "x", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 8, + "line": 6, }, "start": Object { - "column": 6, - "line": 1, + "column": 7, + "line": 6, }, }, "range": Array [ - 6, - 7, + 45, + 46, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { + "column": 12, + "line": 6, + }, + "start": Object { "column": 9, - "line": 1, + "line": 6, + }, + }, + "range": Array [ + 47, + 50, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 6, }, "start": Object { - "column": 8, - "line": 1, + "column": 12, + "line": 6, }, }, "range": Array [ - 8, - 9, + 50, + 51, ], "type": "Punctuator", - "value": "=", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "range": Array [ + 56, + 59, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 7, + }, + "start": Object { + "column": 7, + "line": 7, + }, + }, + "range": Array [ + 59, + 62, + ], + "type": "Identifier", + "value": "get", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 1, + "line": 7, }, "start": Object { "column": 10, - "line": 1, + "line": 7, }, }, "range": Array [ - 10, - 11, + 62, + 63, ], "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, + 68, + 71, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 8, + }, + "start": Object { + "column": 7, + "line": 8, + }, + }, + "range": Array [ + 71, + 74, ], "type": "Identifier", - "value": "x", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 1, + "line": 9, }, "start": Object { - "column": 12, - "line": 1, + "column": 0, + "line": 9, }, }, "range": Array [ - 12, - 13, + 75, + 76, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 2, + "line": 9, }, "start": Object { - "column": 14, - "line": 1, + "column": 1, + "line": 9, }, }, "range": Array [ - 14, - 16, + 76, + 77, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": ";", }, + ], + "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": 17, + "column": 15, "line": 1, }, "start": Object { - "column": 16, + "column": 0, "line": 1, }, }, "range": Array [ - 16, - 17, + 0, + 15, ], - "type": "Punctuator", - "value": "}", + "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": 18, + "column": 3, "line": 1, }, "start": Object { - "column": 17, + "column": 0, "line": 1, }, }, "range": Array [ - 17, - 18, + 0, + 3, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "try", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 5, "line": 1, }, "start": Object { - "column": 19, + "column": 4, "line": 1, }, }, "range": Array [ - 19, - 20, + 4, + 5, ], "type": "Punctuator", "value": "{", @@ -59622,17 +85165,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 6, "line": 1, }, "start": Object { - "column": 20, + "column": 5, "line": 1, }, }, "range": Array [ - 20, - 21, + 5, + 6, ], "type": "Punctuator", "value": "}", @@ -59640,124 +85183,141 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 12, "line": 1, }, "start": Object { - "column": 21, + "column": 7, "line": 1, }, }, "range": Array [ - 21, - 22, + 7, + 12, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "catch", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 14, "line": 1, }, "start": Object { - "column": 22, + "column": 13, "line": 1, }, }, "range": Array [ - 22, - 23, + 13, + 14, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 15, "line": 1, }, "start": Object { - "column": 23, + "column": 14, "line": 1, }, }, "range": Array [ - 23, - 24, + 14, + 15, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring-and-forOf/loop.src 1`] = ` +exports[`javascript fixtures/experimentalOptionalCatchBinding/optional-catch-binding-finally.src 1`] = ` Object { "body": Array [ Object { - "await": false, - "body": Object { + "block": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 17, + "column": 6, "line": 1, }, "start": Object { - "column": 16, + "column": 4, "line": 1, }, }, "range": Array [ - 16, - 17, + 4, + 6, ], - "type": "EmptyStatement", + "type": "BlockStatement", }, - "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", + "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": 8, + "column": 15, "line": 1, }, "start": Object { - "column": 5, + "column": 7, "line": 1, }, }, + "param": null, "range": Array [ - 5, - 8, + 7, + 15, ], - "type": "ArrayPattern", + "type": "CatchClause", }, "loc": Object { "end": Object { - "column": 17, + "column": 26, "line": 1, }, "start": Object { @@ -59767,27 +85327,9 @@ Object { }, "range": Array [ 0, - 17, + 26, ], - "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": "TryStatement", }, ], "loc": Object { @@ -59802,7 +85344,7 @@ Object { }, "range": Array [ 0, - 18, + 27, ], "sourceType": "script", "tokens": Array [ @@ -59822,7 +85364,7 @@ Object { 3, ], "type": "Keyword", - "value": "for", + "value": "try", }, Object { "loc": Object { @@ -59840,7 +85382,7 @@ Object { 5, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { @@ -59858,369 +85400,312 @@ Object { 6, ], "type": "Punctuator", - "value": "[", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 1, }, "start": Object { - "column": 6, + "column": 7, "line": 1, }, }, "range": Array [ - 6, 7, + 12, ], - "type": "Identifier", - "value": "a", + "type": "Keyword", + "value": "catch", }, 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": 11, + "column": 15, "line": 1, }, "start": Object { - "column": 9, + "column": 14, "line": 1, }, }, "range": Array [ - 9, - 11, + 14, + 15, ], - "type": "Identifier", - "value": "of", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 23, "line": 1, }, "start": Object { - "column": 12, + "column": 16, "line": 1, }, }, "range": Array [ - 12, - 15, + 16, + 23, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "finally", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 25, "line": 1, }, "start": Object { - "column": 15, + "column": 24, "line": 1, }, }, "range": Array [ - 15, - 16, + 24, + 25, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 26, "line": 1, }, "start": Object { - "column": 16, + "column": 25, "line": 1, }, }, "range": Array [ - 16, - 17, + 25, + 26, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring-and-spread/complex-destructured.src 1`] = ` +exports[`javascript fixtures/exponentiationOperators/exponential-operators.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "elements": 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 { + "left": Object { "loc": Object { "end": Object { "column": 9, "line": 1, }, "start": Object { - "column": 1, + "column": 8, "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, + 8, 9, ], - "type": "ObjectPattern", + "raw": "2", + "type": "Literal", + "value": 2, }, - 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": 14, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, }, + }, + "operator": "**", + "range": Array [ + 8, + 14, + ], + "right": Object { "loc": Object { "end": Object { - "column": 15, + "column": 14, "line": 1, }, "start": Object { - "column": 11, + "column": 13, "line": 1, }, }, "range": Array [ - 11, - 15, + 13, + 14, ], - "type": "RestElement", + "raw": "3", + "type": "Literal", + "value": 3, }, - ], + "type": "BinaryExpression", + }, "loc": Object { "end": Object { - "column": 16, + "column": 14, "line": 1, }, "start": Object { - "column": 0, + "column": 4, "line": 1, }, }, "range": Array [ - 0, + 4, + 14, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 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": "ArrayPattern", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, - "operator": "=", + "operator": "**=", "range": Array [ - 0, - 20, + 16, + 23, ], "right": Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 6, + "line": 2, }, }, - "name": "d", "range": Array [ - 19, - 20, + 22, + 23, ], - "type": "Identifier", + "raw": "4", + "type": "Literal", + "value": 4, }, "type": "AssignmentExpression", }, "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, "range": Array [ - 0, - 21, + 16, + 24, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 0, + "line": 3, }, "start": Object { "column": 0, @@ -60229,14 +85714,14 @@ Object { }, "range": Array [ 0, - 21, + 25, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -60246,223 +85731,357 @@ 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": "Numeric", + "value": "2", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 12, ], "type": "Punctuator", - "value": "{", + "value": "**", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 14, "line": 1, }, "start": Object { - "column": 3, + "column": 13, "line": 1, }, }, "range": Array [ - 3, - 4, + 13, + 14, + ], + "type": "Numeric", + "value": "3", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 16, + 17, ], "type": "Identifier", - "value": "a", + "value": "x", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 2, }, "start": Object { - "column": 4, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 4, - 5, + 18, + 21, ], "type": "Punctuator", - "value": ",", + "value": "**=", }, Object { "loc": Object { "end": Object { "column": 7, - "line": 1, + "line": 2, }, "start": Object { "column": 6, - "line": 1, + "line": 2, }, }, "range": Array [ - 6, - 7, + 22, + 23, ], - "type": "Identifier", - "value": "b", + "type": "Numeric", + "value": "4", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 8, - 9, + 23, + 24, ], "type": "Punctuator", - "value": "}", + "value": ";", }, + ], + "type": "Program", +} +`; + +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": 10, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 0, "line": 1, }, }, "range": Array [ + 0, 9, - 10, ], - "type": "Punctuator", - "value": ",", + "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": 14, + "column": 3, "line": 1, }, "start": Object { - "column": 11, + "column": 0, "line": 1, }, }, "range": Array [ - 11, - 14, + 0, + 3, ], - "type": "Punctuator", - "value": "...", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 5, "line": 1, }, "start": Object { - "column": 14, + "column": 4, "line": 1, }, }, "range": Array [ - 14, - 15, + 4, + 5, ], - "type": "Identifier", - "value": "c", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 6, "line": 1, }, "start": Object { - "column": 15, + "column": 5, "line": 1, }, }, "range": Array [ - 15, - 16, + 5, + 6, ], "type": "Punctuator", - "value": "]", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 7, "line": 1, }, "start": Object { - "column": 17, + "column": 6, "line": 1, }, }, "range": Array [ - 17, - 18, + 6, + 7, ], "type": "Punctuator", - "value": "=", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 8, "line": 1, }, "start": Object { - "column": 19, + "column": 7, "line": 1, }, }, "range": Array [ - 19, - 20, + 7, + 8, ], - "type": "Identifier", - "value": "d", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 9, "line": 1, }, "start": Object { - "column": 20, + "column": 8, "line": 1, }, }, "range": Array [ - 20, - 21, + 8, + 9, ], "type": "Punctuator", "value": ";", @@ -60472,170 +86091,209 @@ Object { } `; -exports[`javascript fixtures/destructuring-and-spread/destructured-array-literal.src 1`] = ` +exports[`javascript fixtures/for/for-loop.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "elements": 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": 2, + "column": 9, "line": 1, }, "start": Object { - "column": 1, + "column": 8, "line": 1, }, }, - "name": "a", + "name": "i", "range": Array [ - 1, - 2, + 8, + 9, ], "type": "Identifier", }, - Object { - "argument": Object { - "elements": Array [ - 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, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 13, - ], - "type": "ArrayPattern", - }, + "init": Object { "loc": Object { "end": Object { "column": 13, "line": 1, }, "start": Object { - "column": 4, + "column": 12, "line": 1, }, }, "range": Array [ - 4, + 12, 13, ], - "type": "RestElement", + "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": 14, + "column": 16, "line": 1, }, "start": Object { - "column": 0, + "column": 15, "line": 1, }, }, + "name": "i", "range": Array [ - 0, - 14, + 15, + 16, ], - "type": "ArrayPattern", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 18, + "column": 21, "line": 1, }, "start": Object { - "column": 0, + "column": 15, "line": 1, }, }, - "operator": "=", + "operator": "<", "range": Array [ - 0, - 18, + 15, + 21, ], "right": Object { "loc": Object { "end": Object { - "column": 18, + "column": 21, "line": 1, }, "start": Object { - "column": 17, + "column": 19, "line": 1, }, }, - "name": "d", "range": Array [ - 17, - 18, + 19, + 21, ], - "type": "Identifier", + "raw": "10", + "type": "Literal", + "value": 10, }, - "type": "AssignmentExpression", + "type": "BinaryExpression", }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, + "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", }, - "start": Object { - "column": 0, - "line": 1, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, }, + "operator": "++", + "prefix": false, + "range": Array [ + 23, + 26, + ], + "type": "UpdateExpression", }, - "range": Array [ - 0, - 19, - ], - "type": "ExpressionStatement", }, ], "loc": Object { @@ -60650,14 +86308,14 @@ Object { }, "range": Array [ 0, - 20, + 31, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -60667,424 +86325,604 @@ Object { }, "range": Array [ 0, - 1, + 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": "[", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 7, "line": 1, }, "start": Object { - "column": 1, + "column": 4, "line": 1, }, }, "range": Array [ - 1, - 2, + 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": "a", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 11, "line": 1, }, "start": Object { - "column": 2, + "column": 10, "line": 1, }, }, "range": Array [ - 2, - 3, + 10, + 11, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 13, "line": 1, }, "start": Object { - "column": 4, + "column": 12, "line": 1, }, }, "range": Array [ - 4, - 7, + 12, + 13, ], - "type": "Punctuator", - "value": "...", + "type": "Numeric", + "value": "0", }, 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": 9, + "column": 16, "line": 1, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, "range": Array [ - 8, - 9, + 15, + 16, ], "type": "Identifier", - "value": "b", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 18, "line": 1, }, "start": Object { - "column": 9, + "column": 17, "line": 1, }, }, "range": Array [ - 9, - 10, + 17, + 18, ], "type": "Punctuator", - "value": ",", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 21, "line": 1, }, "start": Object { - "column": 11, + "column": 19, "line": 1, }, }, "range": Array [ - 11, - 12, + 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": "Identifier", - "value": "c", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 24, "line": 1, }, "start": Object { - "column": 12, + "column": 23, "line": 1, }, }, "range": Array [ - 12, - 13, + 23, + 24, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 26, "line": 1, }, "start": Object { - "column": 13, + "column": 24, "line": 1, }, }, "range": Array [ - 13, - 14, + 24, + 26, ], "type": "Punctuator", - "value": "]", + "value": "++", }, 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`] = ` +exports[`javascript fixtures/for/for-with-coma.src 1`] = ` Object { "body": Array [ Object { - "async": false, "body": Object { "body": Array [], "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 28, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 28, - 30, + 41, + 44, ], "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 { + "init": Object { + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 10, "line": 1, }, "start": Object { - "column": 12, + "column": 9, "line": 1, }, }, - "name": "a", + "name": "i", "range": Array [ - 12, - 13, + 9, + 10, ], "type": "Identifier", }, - Object { + "init": Object { "loc": Object { "end": Object { - "column": 16, + "column": 14, "line": 1, }, "start": Object { - "column": 15, + "column": 13, "line": 1, }, }, - "name": "b", "range": Array [ - 15, - 16, + 13, + 14, ], - "type": "Identifier", + "raw": "0", + "type": "Literal", + "value": 0, }, - Object { - "argument": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "name": "ok", - "range": Array [ - 22, - 24, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, + "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, }, - "range": Array [ - 21, - 25, - ], - "type": "ArrayPattern", }, + "name": "j", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "init": Object { "loc": Object { "end": Object { - "column": 25, + "column": 22, "line": 1, }, "start": Object { - "column": 18, + "column": 20, "line": 1, }, }, "range": Array [ - 18, - 25, + 20, + 22, ], - "type": "RestElement", + "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": 26, + "column": 25, "line": 1, }, "start": Object { - "column": 11, + "column": 24, "line": 1, }, }, + "name": "i", "range": Array [ - 11, - 26, + 24, + 25, ], - "type": "ArrayPattern", + "type": "Identifier", }, - ], - "range": Array [ - 0, - 30, - ], - "type": "FunctionDeclaration", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, }, - "start": Object { - "column": 30, - "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", }, - "range": Array [ - 30, - 31, - ], - "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -61093,14 +86931,14 @@ Object { }, "range": Array [ 0, - 31, + 46, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 3, "line": 1, }, "start": Object { @@ -61110,10 +86948,46 @@ 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": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, 8, ], "type": "Keyword", - "value": "function", + "value": "var", }, Object { "loc": Object { @@ -61122,540 +86996,536 @@ Object { "line": 1, }, "start": Object { - "column": 9, + "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 [ - 9, - 10, + 14, + 15, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ",", }, 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": "(", + "type": "Identifier", + "value": "j", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 19, "line": 1, }, "start": Object { - "column": 11, + "column": 18, "line": 1, }, }, "range": Array [ - 11, - 12, + 18, + 19, ], "type": "Punctuator", - "value": "[", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 22, "line": 1, }, "start": Object { - "column": 12, + "column": 20, "line": 1, }, }, "range": Array [ - 12, - 13, + 20, + 22, ], - "type": "Identifier", - "value": "a", + "type": "Numeric", + "value": "10", }, 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": 16, + "column": 25, "line": 1, }, "start": Object { - "column": 15, + "column": 24, "line": 1, }, }, "range": Array [ - 15, - 16, + 24, + 25, ], "type": "Identifier", - "value": "b", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 27, "line": 1, }, "start": Object { - "column": 16, + "column": 26, "line": 1, }, }, "range": Array [ - 16, - 17, + 26, + 27, ], "type": "Punctuator", - "value": ",", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 29, "line": 1, }, "start": Object { - "column": 18, + "column": 28, "line": 1, }, }, "range": Array [ - 18, - 21, + 28, + 29, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "j", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 30, "line": 1, }, "start": Object { - "column": 21, + "column": 29, "line": 1, }, }, "range": Array [ - 21, - 22, + 29, + 30, ], "type": "Punctuator", - "value": "[", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 32, "line": 1, }, "start": Object { - "column": 22, + "column": 31, "line": 1, }, }, "range": Array [ - 22, - 24, + 31, + 32, ], "type": "Identifier", - "value": "ok", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 34, "line": 1, }, "start": Object { - "column": 24, + "column": 32, "line": 1, }, }, "range": Array [ - 24, - 25, + 32, + 34, ], "type": "Punctuator", - "value": "]", + "value": "++", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 35, "line": 1, }, "start": Object { - "column": 25, + "column": 34, "line": 1, }, }, "range": Array [ - 25, - 26, + 34, + 35, ], "type": "Punctuator", - "value": "]", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 37, "line": 1, }, "start": Object { - "column": 26, + "column": 36, "line": 1, }, }, "range": Array [ - 26, - 27, + 36, + 37, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "j", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 39, "line": 1, }, "start": Object { - "column": 28, + "column": 37, "line": 1, }, }, "range": Array [ - 28, - 29, + 37, + 39, ], "type": "Punctuator", - "value": "{", + "value": "--", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 40, "line": 1, }, "start": Object { - "column": 29, + "column": 39, "line": 1, }, }, "range": Array [ - 29, - 30, + 39, + 40, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 1, + "line": 2, }, "start": Object { - "column": 30, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 30, - 31, + 41, + 42, ], "type": "Punctuator", - "value": ";", + "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/destructuring-and-spread/error-complex-destructured-spread-first.src 1`] = ` +exports[`javascript fixtures/for/for-with-const.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", - }, + "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": 5, + "column": 12, "line": 1, }, "start": Object { - "column": 1, + "column": 11, "line": 1, }, }, + "name": "i", "range": Array [ - 1, - 5, + 11, + 12, ], - "type": "RestElement", + "type": "Identifier", }, - Object { + "init": Object { "loc": Object { "end": Object { - "column": 15, + "column": 16, "line": 1, }, "start": Object { - "column": 7, + "column": 15, "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, - }, - }, - "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", - }, - }, - 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 [ - 7, 15, + 16, ], - "type": "ObjectPattern", + "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": 16, + "column": 19, "line": 1, }, "start": Object { - "column": 0, + "column": 18, "line": 1, }, }, + "name": "i", "range": Array [ - 0, - 16, + 18, + 19, ], - "type": "ArrayPattern", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 20, + "column": 23, "line": 1, }, "start": Object { - "column": 0, + "column": 18, "line": 1, }, }, - "operator": "=", + "operator": "<", "range": Array [ - 0, - 20, + 18, + 23, ], "right": Object { "loc": Object { "end": Object { - "column": 20, + "column": 23, "line": 1, }, "start": Object { - "column": 19, + "column": 22, "line": 1, }, }, - "name": "d", + "name": "j", "range": Array [ - 19, - 20, + 22, + 23, ], "type": "Identifier", }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "BinaryExpression", }, - "range": Array [ - 0, - 21, - ], - "type": "ExpressionStatement", + "type": "ForStatement", + "update": null, }, ], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -61664,14 +87534,14 @@ Object { }, "range": Array [ 0, - 22, + 30, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -61681,365 +87551,510 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Punctuator", - "value": "[", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 5, "line": 1, }, "start": Object { - "column": 1, + "column": 4, "line": 1, }, }, "range": Array [ - 1, 4, + 5, ], "type": "Punctuator", - "value": "...", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 10, "line": 1, }, "start": Object { - "column": 4, + "column": 5, "line": 1, }, }, "range": Array [ - 4, 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": "c", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 14, "line": 1, }, "start": Object { - "column": 5, + "column": 13, "line": 1, }, }, "range": Array [ - 5, - 6, + 13, + 14, ], "type": "Punctuator", - "value": ",", + "value": "=", }, 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": "{", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 17, "line": 1, }, "start": Object { - "column": 9, + "column": 16, "line": 1, }, }, "range": Array [ - 9, - 10, + 16, + 17, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 19, "line": 1, }, "start": Object { - "column": 10, + "column": 18, "line": 1, }, }, "range": Array [ - 10, - 11, + 18, + 19, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "i", }, 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": "Identifier", - "value": "b", + "type": "Punctuator", + "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": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "j", }, 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": "]", + "value": ";", }, 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": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 1, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 19, - 20, + 26, + 27, ], - "type": "Identifier", - "value": "d", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 20, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 20, - 21, + 28, + 29, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring-and-spread/multi-destructured.src 1`] = ` +exports[`javascript fixtures/for/for-with-function.src 1`] = ` Object { "body": Array [ Object { - "expression": 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 { - "elements": Array [ - 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": 2, + "column": 17, "line": 1, }, "start": Object { - "column": 1, + "column": 16, "line": 1, }, }, - "name": "a", + "name": "x", "range": Array [ - 1, - 2, + 16, + 17, ], "type": "Identifier", }, - 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", - }, + "property": Object { "loc": Object { "end": Object { - "column": 8, + "column": 31, "line": 1, }, "start": Object { - "column": 4, + "column": 18, "line": 1, }, }, + "name": "toExponential", "range": Array [ - 4, - 8, + 18, + 31, ], - "type": "RestElement", + "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": 9, + "column": 36, "line": 1, }, "start": Object { - "column": 0, + "column": 35, "line": 1, }, }, + "name": "x", "range": Array [ - 0, - 9, + 35, + 36, ], - "type": "ArrayPattern", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 13, + "column": 40, "line": 1, }, "start": Object { - "column": 0, + "column": 35, "line": 1, }, }, "operator": "=", "range": Array [ - 0, - 13, + 35, + 40, ], "right": Object { "loc": Object { "end": Object { - "column": 13, + "column": 40, "line": 1, }, "start": Object { - "column": 12, + "column": 39, "line": 1, }, }, - "name": "c", "range": Array [ - 12, - 13, + 39, + 40, ], - "type": "Identifier", + "raw": "5", + "type": "Literal", + "value": 5, }, "type": "AssignmentExpression", }, - "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, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -62048,14 +88063,14 @@ Object { }, "range": Array [ 0, - 14, + 43, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -62065,64 +88080,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, + 3, ], - "type": "Identifier", - "value": "a", + "type": "Keyword", + "value": "for", }, 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": ",", + "value": "(", }, 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": "...", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -62139,26 +88136,26 @@ Object { 7, 8, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "=", }, 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": "Punctuator", - "value": "]", + "type": "Numeric", + "value": "5", }, Object { "loc": Object { @@ -62176,7 +88173,7 @@ Object { 11, ], "type": "Punctuator", - "value": "=", + "value": ";", }, Object { "loc": Object { @@ -62194,280 +88191,220 @@ Object { 13, ], "type": "Identifier", - "value": "c", + "value": "x", }, 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": "=", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring-and-spread/single-destructured.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": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "ArrayPattern", - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, }, - "operator": "=", - "range": Array [ - 0, - 10, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", + "start": Object { + "column": 16, + "line": 1, }, - "type": "AssignmentExpression", }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "x", + }, + Object { "loc": Object { "end": Object { - "column": 11, + "column": 18, "line": 1, }, "start": Object { - "column": 0, + "column": 17, "line": 1, }, }, "range": Array [ - 0, - 11, + 17, + 18, ], - "type": "ExpressionStatement", + "type": "Punctuator", + "value": ".", }, - ], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 31, + ], + "type": "Identifier", + "value": "toExponential", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": "(", }, - }, - "range": Array [ - 0, - 11, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 33, "line": 1, }, "start": Object { - "column": 0, + "column": 32, "line": 1, }, }, "range": Array [ - 0, - 1, + 32, + 33, ], "type": "Punctuator", - "value": "[", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 34, "line": 1, }, "start": Object { - "column": 1, + "column": 33, "line": 1, }, }, "range": Array [ - 1, - 4, + 33, + 34, ], "type": "Punctuator", - "value": "...", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 36, "line": 1, }, "start": Object { - "column": 4, + "column": 35, "line": 1, }, }, "range": Array [ - 4, - 5, + 35, + 36, ], "type": "Identifier", - "value": "a", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 38, "line": 1, }, "start": Object { - "column": 5, + "column": 37, "line": 1, }, }, "range": Array [ - 5, - 6, + 37, + 38, ], "type": "Punctuator", - "value": "]", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 40, "line": 1, }, "start": Object { - "column": 7, + "column": 39, "line": 1, }, }, "range": Array [ - 7, - 8, + 39, + 40, ], - "type": "Punctuator", - "value": "=", + "type": "Numeric", + "value": "5", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 41, "line": 1, }, "start": Object { - "column": 9, + "column": 40, "line": 1, }, }, "range": Array [ - 9, - 10, + 40, + 41, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 42, "line": 1, }, "start": Object { - "column": 10, + "column": 41, "line": 1, }, }, "range": Array [ - 10, - 11, + 41, + 42, ], "type": "Punctuator", "value": ";", @@ -62477,256 +88414,178 @@ Object { } `; -exports[`javascript fixtures/destructuring-and-spread/var-complex-destructured.src 1`] = ` +exports[`javascript fixtures/for/for-with-let.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, + "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, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 7, - 8, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 10, - 11, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 10, - 11, - ], - "type": "Identifier", - }, - }, - ], - "range": Array [ - 5, - 13, - ], - "type": "ObjectPattern", }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", + "name": "i", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, + "start": Object { + "column": 15, + "line": 1, }, - "range": Array [ - 15, - 19, - ], - "type": "RestElement", - }, - ], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, }, + "range": Array [ + 15, + 16, + ], + "raw": "0", + "type": "Literal", + "value": 0, }, - "range": Array [ - 4, - 20, - ], - "type": "ArrayPattern", - }, - "init": Object { "loc": Object { "end": Object { - "column": 24, + "column": 16, "line": 1, }, "start": Object { - "column": 23, + "column": 11, "line": 1, }, }, - "name": "d", "range": Array [ - 23, - 24, + 11, + 16, ], - "type": "Identifier", + "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": 24, + "column": 19, "line": 1, }, "start": Object { - "column": 4, + "column": 18, "line": 1, }, }, + "name": "i", "range": Array [ - 4, - 24, + 18, + 19, ], - "type": "VariableDeclarator", + "type": "Identifier", }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 25, - "line": 1, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, }, - "start": Object { - "column": 0, - "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", }, - "range": Array [ - 0, - 25, - ], - "type": "VariableDeclaration", + "type": "ForStatement", + "update": null, }, ], "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -62735,7 +88594,7 @@ Object { }, "range": Array [ 0, - 25, + 30, ], "sourceType": "script", "tokens": Array [ @@ -62755,7 +88614,7 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { @@ -62773,12 +88632,12 @@ Object { 5, ], "type": "Punctuator", - "value": "[", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 10, "line": 1, }, "start": Object { @@ -62788,368 +88647,257 @@ Object { }, "range": Array [ 5, - 6, + 10, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "const", }, 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": "Identifier", - "value": "a", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 14, "line": 1, }, "start": Object { - "column": 8, + "column": 13, "line": 1, }, }, "range": Array [ - 8, - 9, + 13, + 14, ], "type": "Punctuator", - "value": ",", + "value": "=", }, 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": "Identifier", - "value": "b", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 17, "line": 1, }, "start": Object { - "column": 12, + "column": 16, "line": 1, }, }, "range": Array [ - 12, - 13, + 16, + 17, ], "type": "Punctuator", - "value": "}", + "value": ";", }, 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": ",", + "type": "Identifier", + "value": "i", }, 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": "Punctuator", - "value": "...", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 23, "line": 1, }, "start": Object { - "column": 18, + "column": 22, "line": 1, }, }, "range": Array [ - 18, - 19, + 22, + 23, ], "type": "Identifier", - "value": "c", + "value": "j", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 24, "line": 1, }, "start": Object { - "column": 19, + "column": 23, "line": 1, }, }, "range": Array [ - 19, - 20, + 23, + 24, ], "type": "Punctuator", - "value": "]", + "value": ";", }, 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": 24, - "line": 1, + "column": 1, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 23, - 24, + 26, + 27, ], - "type": "Identifier", - "value": "d", + "type": "Punctuator", + "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, + 28, + 29, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/destructuring-and-spread/var-destructured-array-literal.src 1`] = ` +exports[`javascript fixtures/forIn/for-in-array.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "name": "a", - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - }, - Object { - "argument": Object { - "elements": Array [ - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 15, - 16, - ], - "type": "Identifier", - }, - ], - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 17, - ], - "type": "ArrayPattern", - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 17, - ], - "type": "RestElement", - }, - ], - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 18, - ], - "type": "ArrayPattern", + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, }, - "init": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "d", - "range": Array [ - 21, - 22, - ], - "type": "Identifier", + "start": Object { + "column": 14, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + }, + "range": Array [ + 14, + 16, + ], + "type": "BlockStatement", + }, + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 4, - 22, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "name": "i", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 23, + "column": 16, "line": 1, }, "start": Object { @@ -63159,15 +88907,33 @@ Object { }, "range": Array [ 0, - 23, + 16, ], - "type": "VariableDeclaration", + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 12, + ], + "type": "ArrayExpression", + }, + "type": "ForInStatement", }, ], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -63176,7 +88942,7 @@ Object { }, "range": Array [ 0, - 23, + 17, ], "sourceType": "script", "tokens": Array [ @@ -63196,7 +88962,7 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { @@ -63214,7 +88980,7 @@ Object { 5, ], "type": "Punctuator", - "value": "[", + "value": "(", }, Object { "loc": Object { @@ -63232,25 +88998,25 @@ Object { 6, ], "type": "Identifier", - "value": "a", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 1, }, "start": Object { - "column": 6, + "column": 7, "line": 1, }, }, "range": Array [ - 6, 7, + 9, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { @@ -63259,16 +89025,16 @@ Object { "line": 1, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, "range": Array [ - 8, + 10, 11, ], "type": "Punctuator", - "value": "...", + "value": "[", }, Object { "loc": Object { @@ -63286,7 +89052,7 @@ Object { 12, ], "type": "Punctuator", - "value": "[", + "value": "]", }, Object { "loc": Object { @@ -63303,26 +89069,26 @@ Object { 12, 13, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": ")", }, 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 { @@ -63339,239 +89105,731 @@ Object { 15, 16, ], - "type": "Identifier", - "value": "c", - }, - Object { + "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": 17, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 16, 17, + 36, ], - "type": "Punctuator", - "value": "]", + "type": "VariableDeclaration", }, Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, + "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", }, - }, - "range": Array [ - 17, - 18, ], - "type": "Punctuator", - "value": "]", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 19, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 19, - 20, + 37, + 48, ], - "type": "Punctuator", - "value": "=", + "type": "VariableDeclaration", }, Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, + "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, + }, }, - "start": Object { - "column": 21, - "line": 1, + "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", }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "d", - }, - Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 1, + "line": 6, }, "start": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 4, }, }, "range": Array [ - 22, - 23, + 49, + 132, ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring-and-spread/var-multi-destructured.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ + "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": 6, - "line": 1, + "column": 49, + "line": 4, }, "start": Object { - "column": 5, - "line": 1, + "column": 45, + "line": 4, }, }, - "name": "a", + "method": false, "range": Array [ - 5, - 6, + 94, + 98, ], - "type": "Identifier", + "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 { - "argument": Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 52, + "line": 4, }, "start": Object { - "column": 11, - "line": 1, + "column": 51, + "line": 4, }, }, "name": "b", "range": Array [ - 11, - 12, + 100, + 101, ], "type": "Identifier", }, + "kind": "init", "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 55, + "line": 4, }, "start": Object { - "column": 8, - "line": 1, + "column": 51, + "line": 4, }, }, + "method": false, "range": Array [ - 8, - 12, + 100, + 104, ], - "type": "RestElement", + "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, + }, }, ], - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, "range": Array [ - 4, - 13, + 93, + 111, ], - "type": "ArrayPattern", + "type": "ObjectExpression", }, - "init": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "c", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", + ], + "loc": Object { + "end": Object { + "column": 62, + "line": 4, }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + "start": Object { + "column": 32, + "line": 4, }, - "range": Array [ - 4, - 17, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, }, + "range": Array [ + 81, + 111, + ], + "type": "SequenceExpression", }, - "range": Array [ - 0, - 18, - ], - "type": "VariableDeclaration", + "type": "ForInStatement", }, ], "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 0, + "line": 7, }, "start": Object { "column": 0, @@ -63580,7 +89838,7 @@ Object { }, "range": Array [ 0, - 18, + 133, ], "sourceType": "script", "tokens": Array [ @@ -63605,7 +89863,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 11, "line": 1, }, "start": Object { @@ -63615,82 +89873,10 @@ Object { }, "range": Array [ 4, - 5, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 11, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ 11, - 12, ], "type": "Identifier", - "value": "b", + "value": "effects", }, Object { "loc": Object { @@ -63708,7 +89894,7 @@ Object { 13, ], "type": "Punctuator", - "value": "]", + "value": "=", }, Object { "loc": Object { @@ -63725,193 +89911,41 @@ Object { 14, 15, ], - "type": "Punctuator", - "value": "=", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { "column": 16, "line": 1, }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Identifier", - "value": "c", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/destructuring-and-spread/var-single-destructured.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { - "elements": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "a", - "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", - }, - ], - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 10, - ], - "type": "ArrayPattern", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "b", - "range": Array [ - 13, - 14, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { "column": 15, "line": 1, }, - "start": Object { - "column": 0, - "line": 1, - }, }, "range": Array [ - 0, 15, + 16, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ";", }, - }, - "range": Array [ - 0, - 15, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { "column": 3, - "line": 1, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, "range": Array [ - 0, - 3, + 17, + 20, ], "type": "Keyword", "value": "var", @@ -63919,1380 +89953,930 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { "column": 4, - "line": 1, + "line": 2, }, }, "range": Array [ - 4, - 5, + 21, + 31, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "iterations", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 5, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 5, - 8, + 32, + 33, ], "type": "Punctuator", - "value": "...", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 17, + "line": 2, }, }, "range": Array [ - 8, - 9, + 34, + 35, ], - "type": "Identifier", - "value": "a", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 18, + "line": 2, }, }, "range": Array [ - 9, - 10, + 35, + 36, ], "type": "Punctuator", - "value": "]", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 3, + "line": 3, }, "start": Object { - "column": 11, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 11, - 12, + 37, + 40, ], - "type": "Punctuator", - "value": "=", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 10, + "line": 3, }, "start": Object { - "column": 13, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 13, - 14, + 41, + 47, ], "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": "stored", }, - ], - "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, + "column": 11, "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, + "column": 10, + "line": 3, }, }, "range": Array [ - 0, - 5, + 47, + 48, ], - "type": "Identifier", - "value": "async", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 3, + "line": 4, }, "start": Object { - "column": 6, - "line": 1, + "column": 0, + "line": 4, }, }, "range": Array [ - 6, - 14, + 49, + 52, ], "type": "Keyword", - "value": "function", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 14, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 14, - 15, + 53, + 54, ], "type": "Punctuator", - "value": "*", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 8, + "line": 4, }, "start": Object { - "column": 16, - "line": 1, + "column": 5, + "line": 4, }, }, "range": Array [ - 16, - 19, + 54, + 57, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 10, + "line": 4, }, "start": Object { - "column": 19, - "line": 1, + "column": 9, + "line": 4, }, }, "range": Array [ - 19, - 20, + 58, + 59, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 12, + "line": 4, }, "start": Object { - "column": 20, - "line": 1, + "column": 11, + "line": 4, }, }, "range": Array [ - 20, - 21, + 60, + 61, ], "type": "Punctuator", - "value": ")", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 14, + "line": 4, }, "start": Object { - "column": 22, - "line": 1, + "column": 13, + "line": 4, }, }, "range": Array [ - 22, - 23, + 62, + 63, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 16, + "line": 4, }, "start": Object { - "column": 0, - "line": 3, + "column": 14, + "line": 4, }, }, "range": Array [ - 25, - 26, + 63, + 65, ], "type": "Punctuator", - "value": "}", + "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, + "column": 23, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 16, + "line": 4, }, }, - "params": Array [], "range": Array [ - 0, - 69, + 65, + 72, ], - "type": "FunctionDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "effects", }, - }, - "range": Array [ - 0, - 70, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 24, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 23, + "line": 4, }, }, "range": Array [ - 0, - 5, + 72, + 73, ], - "type": "Identifier", - "value": "async", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 26, + "line": 4, }, "start": Object { - "column": 6, - "line": 1, + "column": 25, + "line": 4, }, }, "range": Array [ - 6, - 14, + 74, + 75, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "-", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 27, + "line": 4, }, "start": Object { - "column": 15, - "line": 1, + "column": 26, + "line": 4, }, }, "range": Array [ - 15, - 18, + 75, + 76, ], - "type": "Identifier", - "value": "foo", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 28, + "line": 4, }, "start": Object { - "column": 18, - "line": 1, + "column": 27, + "line": 4, }, }, "range": Array [ - 18, - 19, + 76, + 77, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 31, + "line": 4, }, "start": Object { - "column": 19, - "line": 1, + "column": 29, + "line": 4, }, }, "range": Array [ - 19, - 20, + 78, + 80, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 38, + "line": 4, }, "start": Object { - "column": 21, - "line": 1, + "column": 32, + "line": 4, }, }, "range": Array [ - 21, - 22, + 81, + 87, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "stored", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 40, + "line": 4, }, "start": Object { - "column": 4, - "line": 2, + "column": 39, + "line": 4, }, }, "range": Array [ - 27, - 30, + 88, + 89, ], - "type": "Keyword", - "value": "for", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 42, + "line": 4, }, "start": Object { - "column": 8, - "line": 2, + "column": 41, + "line": 4, }, }, "range": Array [ - 31, - 36, + 90, + 91, ], "type": "Identifier", - "value": "await", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 43, + "line": 4, }, "start": Object { - "column": 14, - "line": 2, + "column": 42, + "line": 4, }, }, "range": Array [ - 37, - 38, + 91, + 92, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 45, + "line": 4, }, "start": Object { - "column": 15, - "line": 2, + "column": 44, + "line": 4, }, }, "range": Array [ - 38, - 43, + 93, + 94, ], - "type": "Keyword", - "value": "const", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 46, + "line": 4, }, "start": Object { - "column": 21, - "line": 2, + "column": 45, + "line": 4, }, }, "range": Array [ - 44, - 48, + 94, + 95, ], "type": "Identifier", - "value": "item", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 2, + "column": 47, + "line": 4, }, "start": Object { - "column": 26, - "line": 2, + "column": 46, + "line": 4, }, }, "range": Array [ - 49, - 51, + 95, + 96, ], - "type": "Identifier", - "value": "of", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 49, + "line": 4, }, "start": Object { - "column": 29, - "line": 2, + "column": 48, + "line": 4, }, }, "range": Array [ - 52, - 57, + 97, + 98, ], - "type": "Identifier", - "value": "items", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 2, + "column": 50, + "line": 4, }, "start": Object { - "column": 34, - "line": 2, + "column": 49, + "line": 4, }, }, "range": Array [ - 57, - 58, + 98, + 99, ], "type": "Punctuator", - "value": ")", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 2, + "column": 52, + "line": 4, }, "start": Object { - "column": 36, - "line": 2, + "column": 51, + "line": 4, }, }, "range": Array [ - 59, - 60, + 100, + 101, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 53, "line": 4, }, "start": Object { - "column": 4, + "column": 52, "line": 4, }, }, "range": Array [ - 66, - 67, + 101, + 102, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 55, + "line": 4, }, "start": Object { - "column": 0, - "line": 5, + "column": 54, + "line": 4, }, }, "range": Array [ - 68, - 69, + 103, + 104, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "1", }, - ], - "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, + "column": 56, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 55, + "line": 4, }, }, "range": Array [ - 0, - 25, + 104, + 105, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ",", }, - }, - "range": Array [ - 0, - 26, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 58, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 57, + "line": 4, }, }, "range": Array [ - 0, - 6, + 106, + 107, ], - "type": "Keyword", - "value": "import", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 59, + "line": 4, }, "start": Object { - "column": 6, - "line": 1, + "column": 58, + "line": 4, }, }, "range": Array [ - 6, - 7, + 107, + 108, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 61, + "line": 4, }, "start": Object { - "column": 7, - "line": 1, + "column": 60, + "line": 4, }, }, "range": Array [ - 7, - 12, + 109, + 110, ], - "type": "String", - "value": "'foo'", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 62, + "line": 4, }, "start": Object { - "column": 12, - "line": 1, + "column": 61, + "line": 4, }, }, "range": Array [ - 12, - 13, + 110, + 111, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 63, + "line": 4, }, "start": Object { - "column": 13, - "line": 1, + "column": 62, + "line": 4, }, }, "range": Array [ - 13, - 14, + 111, + 112, ], "type": "Punctuator", - "value": ".", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 65, + "line": 4, }, "start": Object { - "column": 14, - "line": 1, + "column": 64, + "line": 4, }, }, "range": Array [ - 14, - 18, + 113, + 114, ], - "type": "Identifier", - "value": "then", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 4, + "line": 5, }, "start": Object { - "column": 18, - "line": 1, + "column": 2, + "line": 5, }, }, "range": Array [ - 18, - 19, + 117, + 119, ], "type": "Punctuator", - "value": "(", + "value": "++", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 14, + "line": 5, }, "start": Object { - "column": 19, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 19, - 23, + 119, + 129, ], "type": "Identifier", - "value": "main", + "value": "iterations", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 15, + "line": 5, }, "start": Object { - "column": 23, - "line": 1, + "column": 14, + "line": 5, }, }, "range": Array [ - 23, - 24, + 129, + 130, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 1, + "line": 6, }, "start": Object { - "column": 24, - "line": 1, + "column": 0, + "line": 6, }, }, "range": Array [ - 24, - 25, + 131, + 132, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/experimentalObjectRestSpread/arg-spread.src 1`] = ` +exports[`javascript fixtures/forIn/for-in-destruction.src 1`] = ` Object { "body": Array [ Object { - "async": false, "body": Object { "body": Array [], "loc": Object { "end": Object { - "column": 24, + "column": 33, "line": 1, }, "start": Object { - "column": 22, + "column": 31, "line": 1, }, }, "range": Array [ - 22, - 24, + 31, + 33, ], "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, + "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", }, - "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, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, }, + "name": "value", + "range": Array [ + 16, + 21, + ], + "type": "Identifier", }, - "name": "b", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", - }, + ], "loc": Object { "end": Object { - "column": 19, + "column": 22, "line": 1, }, "start": Object { - "column": 15, + "column": 9, "line": 1, }, }, "range": Array [ - 15, - 19, + 9, + 22, ], - "type": "RestElement", + "type": "ArrayPattern", }, - ], - "range": Array [ - 11, - 20, - ], - "type": "ObjectPattern", + "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, - 24, + 33, ], - "type": "FunctionDeclaration", + "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 { @@ -65307,14 +90891,14 @@ Object { }, "range": Array [ 0, - 25, + 34, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 3, "line": 1, }, "start": Object { @@ -65324,97 +90908,97 @@ Object { }, "range": Array [ 0, - 8, + 3, ], "type": "Keyword", - "value": "function", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 5, "line": 1, }, "start": Object { - "column": 9, + "column": 4, "line": 1, }, }, "range": Array [ - 9, - 10, + 4, + 5, ], - "type": "Identifier", - "value": "c", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 10, + "column": 5, "line": 1, }, }, "range": Array [ - 10, - 11, + 5, + 8, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 10, "line": 1, }, "start": Object { - "column": 11, + "column": 9, "line": 1, }, }, "range": Array [ - 11, - 12, + 9, + 10, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 1, }, "start": Object { - "column": 12, + "column": 10, "line": 1, }, }, "range": Array [ - 12, - 13, + 10, + 14, ], "type": "Identifier", - "value": "a", + "value": "name", }, 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": ",", @@ -65422,71 +91006,89 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 21, "line": 1, }, "start": Object { - "column": 15, + "column": 16, "line": 1, }, }, "range": Array [ - 15, - 18, + 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": "...", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 25, "line": 1, }, "start": Object { - "column": 18, + "column": 23, "line": 1, }, }, "range": Array [ - 18, - 19, + 23, + 25, ], - "type": "Identifier", - "value": "b", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 29, "line": 1, }, "start": Object { - "column": 19, + "column": 26, "line": 1, }, }, "range": Array [ - 19, - 20, + 26, + 29, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "obj", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 30, "line": 1, }, "start": Object { - "column": 20, + "column": 29, "line": 1, }, }, "range": Array [ - 20, - 21, + 29, + 30, ], "type": "Punctuator", "value": ")", @@ -65494,17 +91096,17 @@ Object { 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": "{", @@ -65512,17 +91114,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, + "column": 33, "line": 1, }, "start": Object { - "column": 23, + "column": 32, "line": 1, }, }, "range": Array [ - 23, - 24, + 32, + 33, ], "type": "Punctuator", "value": "}", @@ -65532,253 +91134,202 @@ Object { } `; -exports[`javascript fixtures/experimentalObjectRestSpread/destructuring-assign-mirror.src 1`] = ` +exports[`javascript fixtures/forIn/for-in-destruction-object.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", - }, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 22, + "column": 33, "line": 1, }, "start": Object { - "column": 1, + "column": 31, "line": 1, }, }, - "operator": "=", "range": Array [ - 1, - 22, + 31, + 33, ], - "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", + "type": "BlockStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 15, + "column": 22, "line": 1, }, "start": Object { - "column": 14, + "column": 9, "line": 1, }, }, - "method": false, - "range": Array [ - 14, - 15, - ], - "shorthand": true, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "name", + "range": Array [ + 10, + 14, + ], + "type": "Identifier", }, - "start": Object { - "column": 14, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 10, + 14, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "name", + "range": Array [ + 10, + 14, + ], + "type": "Identifier", }, }, - "name": "a", - "range": Array [ - 14, - 15, - ], - "type": "Identifier", - }, - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "value", + "range": Array [ + 16, + 21, + ], + "type": "Identifier", }, - "start": Object { - "column": 20, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 16, + 21, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "value", + "range": Array [ + 16, + 21, + ], + "type": "Identifier", }, }, - "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, + 9, + 22, ], - "type": "SpreadElement", + "type": "ObjectPattern", }, - ], - "range": Array [ - 13, - 22, - ], - "type": "ObjectExpression", + "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, + }, }, - "type": "AssignmentExpression", + "range": Array [ + 5, + 22, + ], + "type": "VariableDeclaration", }, "loc": Object { "end": Object { - "column": 23, + "column": 33, "line": 1, }, "start": Object { @@ -65788,9 +91339,27 @@ Object { }, "range": Array [ 0, - 23, + 33, ], - "type": "ExpressionStatement", + "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 { @@ -65805,14 +91374,14 @@ Object { }, "range": Array [ 0, - 24, + 34, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -65822,7 +91391,25 @@ Object { }, "range": Array [ 0, - 1, + 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": "(", @@ -65830,17 +91417,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 2, + "column": 8, "line": 1, }, "start": Object { - "column": 1, + "column": 5, "line": 1, }, }, "range": Array [ - 1, - 2, + 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": "{", @@ -65848,35 +91453,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 3, + "column": 14, "line": 1, }, "start": Object { - "column": 2, + "column": 10, "line": 1, }, }, "range": Array [ - 2, - 3, + 10, + 14, ], "type": "Identifier", - "value": "a", + "value": "name", }, 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": "Punctuator", "value": ",", @@ -65884,89 +91489,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 21, "line": 1, }, "start": Object { - "column": 5, + "column": 16, "line": 1, }, }, "range": Array [ - 5, - 8, + 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": "...", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 25, "line": 1, }, "start": Object { - "column": 8, + "column": 23, "line": 1, }, }, "range": Array [ - 8, - 9, + 23, + 25, ], - "type": "Identifier", - "value": "b", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 29, "line": 1, }, "start": Object { - "column": 9, + "column": 26, "line": 1, }, }, "range": Array [ - 9, - 10, + 26, + 29, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "obj", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 30, "line": 1, }, "start": Object { - "column": 11, + "column": 29, "line": 1, }, }, "range": Array [ - 11, - 12, + 29, + 30, ], "type": "Punctuator", - "value": "=", + "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": "{", @@ -65974,89 +91597,223 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 33, "line": 1, }, "start": Object { - "column": 14, + "column": 32, "line": 1, }, }, "range": Array [ - 14, - 15, + 32, + 33, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/forIn/for-in-object.src 1`] = `"';' expected."`; + +exports[`javascript fixtures/forIn/for-in-object-with-body.src 1`] = ` +Object { + "body": Array [ Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 16, + ], + "type": "BlockStatement", + }, + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "name": "i", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { "column": 16, "line": 1, }, "start": Object { - "column": 15, + "column": 0, "line": 1, }, }, "range": Array [ - 15, + 0, 16, ], - "type": "Punctuator", - "value": ",", + "right": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 10, + 12, + ], + "type": "ObjectExpression", + }, + "type": "ForInStatement", + }, + ], + "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": 20, + "column": 3, "line": 1, }, "start": Object { - "column": 17, + "column": 0, "line": 1, }, }, "range": Array [ - 17, - 20, + 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": "...", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 6, "line": 1, }, "start": Object { - "column": 20, + "column": 5, "line": 1, }, }, "range": Array [ - 20, - 21, + 5, + 6, ], "type": "Identifier", - "value": "b", + "value": "i", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 9, "line": 1, }, "start": Object { - "column": 21, + "column": 7, "line": 1, }, }, "range": Array [ - 21, - 22, + 7, + 9, + ], + "type": "Keyword", + "value": "in", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, ], "type": "Punctuator", "value": "}", @@ -66064,72 +91821,215 @@ Object { 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": ")", }, + 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[`javascript fixtures/experimentalObjectRestSpread/function-parameter-object-spread.src 1`] = ` +exports[`javascript fixtures/forIn/for-in-with-assigment.src 1`] = ` Object { "body": Array [ Object { - "async": false, "body": Object { - "body": Array [], + "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": 26, + "column": 36, "line": 1, }, "start": Object { - "column": 23, + "column": 25, "line": 1, }, - }, - "range": Array [ - 23, - 26, + }, + "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", + }, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { + "kind": "let", "loc": Object { "end": Object { - "column": 12, + "column": 15, "line": 1, }, "start": Object { - "column": 9, + "column": 5, "line": 1, }, }, - "name": "foo", "range": Array [ - 9, - 12, + 5, + 15, ], - "type": "Identifier", + "type": "VariableDeclaration", }, "loc": Object { "end": Object { - "column": 26, + "column": 36, "line": 1, }, "start": Object { @@ -66137,67 +92037,29 @@ Object { "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, + 36, ], - "type": "FunctionDeclaration", + "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 { @@ -66212,14 +92074,14 @@ Object { }, "range": Array [ 0, - 27, + 37, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 3, "line": 1, }, "start": Object { @@ -66229,15 +92091,51 @@ 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": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, 8, ], "type": "Keyword", - "value": "function", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 10, "line": 1, }, "start": Object { @@ -66247,33 +92145,33 @@ Object { }, "range": Array [ 9, - 12, + 10, ], "type": "Identifier", - "value": "foo", + "value": "x", }, 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": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { @@ -66283,339 +92181,238 @@ Object { }, "range": Array [ 13, - 14, + 15, ], - "type": "Punctuator", - "value": "{", + "type": "Numeric", + "value": "42", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 18, "line": 1, }, "start": Object { - "column": 14, + "column": 16, "line": 1, }, }, "range": Array [ - 14, - 17, + 16, + 18, ], - "type": "Punctuator", - "value": "...", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 23, "line": 1, }, "start": Object { - "column": 17, + "column": 19, "line": 1, }, }, "range": Array [ - 17, - 20, + 19, + 23, ], "type": "Identifier", - "value": "bar", + "value": "list", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 24, "line": 1, }, "start": Object { - "column": 20, + "column": 23, "line": 1, }, }, "range": Array [ - 20, - 21, + 23, + 24, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 32, "line": 1, }, "start": Object { - "column": 21, + "column": 25, "line": 1, }, }, "range": Array [ - 21, - 22, + 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": ")", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 34, "line": 1, }, "start": Object { - "column": 23, + "column": 33, "line": 1, }, }, "range": Array [ - 23, - 24, + 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": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 36, "line": 1, }, "start": Object { - "column": 25, + "column": 35, "line": 1, }, }, "range": Array [ - 25, - 26, + 35, + 36, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/experimentalObjectRestSpread/invalid-rest.src 1`] = `"',' expected."`; - -exports[`javascript fixtures/experimentalObjectRestSpread/invalid-rest-trailing-comma.src 1`] = ` +exports[`javascript fixtures/forIn/for-in-with-bare-assigment.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", + "body": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, }, - "init": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "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, }, - "name": "foo", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", + "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, }, + }, + "range": Array [ + 5, + 10, + ], + "right": Object { "loc": Object { "end": Object { - "column": 25, + "column": 10, "line": 1, }, "start": Object { - "column": 4, + "column": 9, "line": 1, }, }, "range": Array [ - 4, - 25, + 9, + 10, ], - "type": "VariableDeclarator", + "raw": "0", + "type": "Literal", + "value": 0, }, - ], - "kind": "var", + "type": "AssignmentPattern", + }, "loc": Object { "end": Object { - "column": 26, + "column": 19, "line": 1, }, "start": Object { @@ -66625,9 +92422,27 @@ Object { }, "range": Array [ 0, - 26, + 19, ], - "type": "VariableDeclaration", + "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 { @@ -66642,7 +92457,7 @@ Object { }, "range": Array [ 0, - 27, + 20, ], "sourceType": "script", "tokens": Array [ @@ -66662,7 +92477,7 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { @@ -66680,22 +92495,22 @@ Object { 5, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 6, "line": 1, }, "start": Object { - "column": 6, + "column": 5, "line": 1, }, }, "range": Array [ + 5, 6, - 7, ], "type": "Identifier", "value": "x", @@ -66716,7 +92531,7 @@ Object { 8, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { @@ -66733,80 +92548,62 @@ Object { 9, 10, ], - "type": "Identifier", - "value": "y", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 13, "line": 1, }, "start": Object { - "column": 10, + "column": 11, "line": 1, }, }, "range": Array [ - 10, 11, + 13, ], - "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": "...", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 17, "line": 1, }, "start": Object { - "column": 15, + "column": 14, "line": 1, }, }, "range": Array [ - 15, - 16, + 14, + 17, ], "type": "Identifier", - "value": "z", + "value": "arr", }, 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": ")", }, Object { "loc": Object { @@ -66824,60 +92621,6 @@ Object { 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": ";", }, ], @@ -66885,452 +92628,141 @@ Object { } `; -exports[`javascript fixtures/experimentalObjectRestSpread/object-rest.src 1`] = ` +exports[`javascript fixtures/forIn/for-in-with-const.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, - }, + "body": Object { + "expression": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 31, + "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, + "start": Object { + "column": 30, + "line": 1, }, }, - 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, - }, + "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 [ - 21, - 47, + 22, + 29, ], - "type": "ObjectExpression", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 47, + "column": 32, "line": 1, }, "start": Object { - "column": 4, + "column": 22, "line": 1, }, }, "range": Array [ - 4, - 47, + 22, + 32, ], - "type": "VariableDeclarator", + "type": "CallExpression", }, - ], - "kind": "var", + "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": 48, + "column": 33, "line": 1, }, "start": Object { @@ -67340,9 +92772,27 @@ Object { }, "range": Array [ 0, - 48, + 33, ], - "type": "VariableDeclaration", + "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 { @@ -67357,7 +92807,7 @@ Object { }, "range": Array [ 0, - 49, + 34, ], "sourceType": "script", "tokens": Array [ @@ -67377,7 +92827,7 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { @@ -67395,43 +92845,7 @@ Object { 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": ",", + "value": "(", }, Object { "loc": Object { @@ -67440,34 +92854,34 @@ Object { "line": 1, }, "start": Object { - "column": 9, + "column": 5, "line": 1, }, }, "range": Array [ - 9, + 5, 10, ], - "type": "Identifier", - "value": "y", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 12, "line": 1, }, "start": Object { - "column": 10, + "column": 11, "line": 1, }, }, "range": Array [ - 10, 11, + 12, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -67476,103 +92890,103 @@ Object { "line": 1, }, "start": Object { - "column": 12, + "column": 13, "line": 1, }, }, "range": Array [ - 12, + 13, 15, ], - "type": "Punctuator", - "value": "...", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 20, "line": 1, }, "start": Object { - "column": 15, + "column": 16, "line": 1, }, }, "range": Array [ - 15, 16, + 20, ], "type": "Identifier", - "value": "z", + "value": "list", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 21, "line": 1, }, "start": Object { - "column": 17, + "column": 20, "line": 1, }, }, "range": Array [ - 17, - 18, + 20, + 21, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 29, "line": 1, }, "start": Object { - "column": 19, + "column": 22, "line": 1, }, }, "range": Array [ - 19, - 20, + 22, + 29, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "process", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 30, "line": 1, }, "start": Object { - "column": 21, + "column": 29, "line": 1, }, }, "range": Array [ - 21, - 22, + 29, + 30, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 31, "line": 1, }, "start": Object { - "column": 23, + "column": 30, "line": 1, }, }, "range": Array [ - 23, - 24, + 30, + 31, ], "type": "Identifier", "value": "x", @@ -67580,691 +92994,618 @@ Object { Object { "loc": Object { "end": Object { - "column": 25, + "column": 32, "line": 1, }, "start": Object { - "column": 24, + "column": 31, "line": 1, }, }, "range": Array [ - 24, - 25, + 31, + 32, ], "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", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 33, "line": 1, }, "start": Object { - "column": 27, + "column": 32, "line": 1, }, }, "range": Array [ - 27, - 28, + 32, + 33, ], "type": "Punctuator", - "value": ",", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/forIn/for-in-with-milti-asigment.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, + "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", }, - "range": Array [ - 29, - 30, - ], - "type": "Identifier", - "value": "y", - }, - Object { "loc": Object { "end": Object { - "column": 31, + "column": 25, "line": 1, }, "start": Object { - "column": 30, + "column": 0, "line": 1, }, }, "range": Array [ - 30, - 31, + 0, + 25, ], - "type": "Punctuator", - "value": ":", + "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": 33, + "column": 3, "line": 1, }, "start": Object { - "column": 32, + "column": 0, "line": 1, }, }, "range": Array [ - 32, - 33, + 0, + 3, ], - "type": "Numeric", - "value": "2", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 5, "line": 1, }, "start": Object { - "column": 33, + "column": 4, "line": 1, }, }, "range": Array [ - 33, - 34, + 4, + 5, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 8, "line": 1, }, "start": Object { - "column": 35, + "column": 5, "line": 1, }, }, "range": Array [ - 35, - 36, + 5, + 8, ], - "type": "Identifier", - "value": "a", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 10, "line": 1, }, "start": Object { - "column": 36, + "column": 9, "line": 1, }, }, "range": Array [ - 36, - 37, + 9, + 10, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 39, + "column": 12, "line": 1, }, "start": Object { - "column": 38, + "column": 11, "line": 1, }, }, "range": Array [ - 38, - 39, + 11, + 12, ], - "type": "Numeric", - "value": "3", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 40, + "column": 14, "line": 1, }, "start": Object { - "column": 39, + "column": 13, "line": 1, }, }, "range": Array [ - 39, - 40, + 13, + 14, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 42, + "column": 16, "line": 1, }, "start": Object { - "column": 41, + "column": 15, "line": 1, }, }, "range": Array [ - 41, - 42, + 15, + 16, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 43, + "column": 18, "line": 1, }, "start": Object { - "column": 42, + "column": 17, "line": 1, }, }, "range": Array [ - 42, - 43, + 17, + 18, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 45, + "column": 21, "line": 1, }, "start": Object { - "column": 44, + "column": 19, "line": 1, }, }, "range": Array [ - 44, - 45, + 19, + 21, ], - "type": "Numeric", - "value": "4", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 47, + "column": 23, "line": 1, }, "start": Object { - "column": 46, + "column": 22, "line": 1, }, }, "range": Array [ - 46, - 47, + 22, + 23, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "q", }, Object { "loc": Object { "end": Object { - "column": 48, + "column": 24, "line": 1, }, "start": Object { - "column": 47, + "column": 23, "line": 1, }, }, "range": Array [ - 47, - 48, + 23, + 24, ], "type": "Punctuator", - "value": ";", + "value": ")", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/experimentalObjectRestSpread/property-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", - }, - 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, + "column": 25, "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": 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 { - "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, - }, - }, - "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", - }, - }, - Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "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 [ - 73, - 80, - ], - "type": "MemberExpression", + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/forIn/for-in-with-rest.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 41, + ], + "type": "BlockStatement", + }, + "left": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 14, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, + "start": Object { + "column": 7, + "line": 1, }, - "range": Array [ - 70, - 80, - ], - "type": "SpreadElement", }, - ], + "name": "x", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "method": false, "range": Array [ - 36, - 82, + 7, + 12, ], - "type": "ObjectExpression", + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "xx", + "range": Array [ + 10, + 12, + ], + "type": "Identifier", + }, }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "rrestOff", + "range": Array [ + 17, + 25, + ], + "type": "Identifier", }, - "start": Object { - "column": 4, - "line": 5, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, }, + "range": Array [ + 14, + 25, + ], + "type": "RestElement", }, - "range": Array [ - 32, - 82, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", + ], + "range": Array [ + 5, + 27, + ], + "type": "ObjectPattern", + }, "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 1, + "line": 2, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 28, - 83, + 0, + 41, ], - "type": "VariableDeclaration", + "right": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "name": "array", + "range": Array [ + 31, + 36, + ], + "type": "Identifier", + }, + "type": "ForInStatement", }, ], "loc": Object { "end": Object { "column": 0, - "line": 10, + "line": 3, }, "start": Object { "column": 0, @@ -68273,7 +93614,7 @@ Object { }, "range": Array [ 0, - 84, + 42, ], "sourceType": "script", "tokens": Array [ @@ -68293,12 +93634,12 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -68308,10 +93649,28 @@ Object { }, "range": Array [ 4, - 7, + 5, ], - "type": "Identifier", - "value": "foo", + "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 { @@ -68328,41 +93687,59 @@ 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": 7, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 13, - 16, + 10, + 12, ], "type": "Identifier", - "value": "get", + "value": "xx", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 16, - 17, + 12, + 13, ], "type": "Punctuator", "value": ",", @@ -68370,359 +93747,547 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 14, + "line": 1, }, }, "range": Array [ - 22, + 14, + 17, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, 25, ], "type": "Identifier", - "value": "set", + "value": "rrestOff", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 27, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 26, + "line": 1, }, }, "range": Array [ - 25, 26, + 27, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 30, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 28, + "line": 1, }, }, "range": Array [ 28, - 31, + 30, ], "type": "Keyword", - "value": "var", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 36, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 31, + "line": 1, }, }, "range": Array [ - 32, - 33, + 31, + 36, ], "type": "Identifier", - "value": "x", + "value": "array", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 37, + "line": 1, }, "start": Object { - "column": 6, - "line": 5, + "column": 36, + "line": 1, }, }, "range": Array [ - 34, - 35, + 36, + 37, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 39, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +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", }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { "loc": Object { "end": Object { - "column": 7, - "line": 6, + "column": 31, + "line": 1, }, "start": Object { - "column": 4, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 42, - 45, + 0, + 31, ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, }, + "name": "list", + "range": Array [ + 14, + 18, + ], + "type": "Identifier", }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ":", + "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": 12, - "line": 6, + "column": 3, + "line": 1, }, "start": Object { - "column": 9, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 47, - 50, + 0, + 3, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 6, + "column": 5, + "line": 1, }, "start": Object { - "column": 12, - "line": 6, + "column": 4, + "line": 1, }, }, "range": Array [ - 50, - 51, + 4, + 5, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 7, + "column": 8, + "line": 1, }, "start": Object { - "column": 4, - "line": 7, + "column": 5, + "line": 1, }, }, "range": Array [ - 56, - 59, + 5, + 8, ], - "type": "Identifier", - "value": "get", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 7, + "column": 10, + "line": 1, }, "start": Object { - "column": 7, - "line": 7, + "column": 9, + "line": 1, }, }, "range": Array [ - 59, - 60, + 9, + 10, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 7, + "column": 13, + "line": 1, }, "start": Object { - "column": 9, - "line": 7, + "column": 11, + "line": 1, }, }, "range": Array [ - 61, - 64, + 11, + 13, ], - "type": "Identifier", - "value": "get", + "type": "Keyword", + "value": "in", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 7, + "column": 18, + "line": 1, }, "start": Object { - "column": 12, - "line": 7, + "column": 14, + "line": 1, }, }, "range": Array [ - 64, - 65, + 14, + 18, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "list", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 8, + "column": 19, + "line": 1, }, "start": Object { - "column": 4, - "line": 8, + "column": 18, + "line": 1, }, }, "range": Array [ - 70, - 73, + 18, + 19, ], "type": "Punctuator", - "value": "...", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 8, + "column": 27, + "line": 1, }, "start": Object { - "column": 7, - "line": 8, + "column": 20, + "line": 1, }, }, "range": Array [ - 73, - 76, + 20, + 27, ], "type": "Identifier", - "value": "set", + "value": "process", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 8, + "column": 28, + "line": 1, }, "start": Object { - "column": 10, - "line": 8, + "column": 27, + "line": 1, }, }, "range": Array [ - 76, - 77, + 27, + 28, ], "type": "Punctuator", - "value": ".", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 8, + "column": 29, + "line": 1, }, "start": Object { - "column": 11, - "line": 8, + "column": 28, + "line": 1, }, }, "range": Array [ - 77, - 80, + 28, + 29, ], "type": "Identifier", - "value": "foo", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 30, + "line": 1, }, "start": Object { - "column": 0, - "line": 9, + "column": 29, + "line": 1, }, }, "range": Array [ - 81, - 82, + 29, + 30, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 31, + "line": 1, }, "start": Object { - "column": 1, - "line": 9, + "column": 30, + "line": 1, }, }, "range": Array [ - 82, - 83, + 30, + 31, ], "type": "Punctuator", "value": ";", @@ -68732,281 +94297,124 @@ Object { } `; -exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-method-args.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", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": true, - "range": Array [ - 7, - 104, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 48, - "line": 2, - }, - }, - "range": Array [ - 51, - 104, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "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 [ - 19, - 26, - ], - "type": "Identifier", - }, - "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", - }, - }, - 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", - }, - "loc": Object { - "end": Object { - "column": 45, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 38, - 48, - ], - "type": "RestElement", - }, - ], - "range": Array [ - 18, - 49, - ], - "type": "ObjectPattern", +exports[`javascript fixtures/forOf/for-of-array.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 [ + 22, + 33, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 35, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 36, + ], + "type": "ExpressionStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, }, - ], + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "x", "range": Array [ - 17, - 104, + 9, + 10, ], - "type": "FunctionExpression", + "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 [ - 1, - 106, + 5, + 10, ], - "type": "ObjectExpression", + "type": "VariableDeclaration", }, "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 18, + "line": 2, }, "start": Object { "column": 0, @@ -69015,15 +94423,33 @@ Object { }, "range": Array [ 0, - 108, + 36, ], - "type": "ExpressionStatement", + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 16, + ], + "type": "ArrayExpression", + }, + "type": "ForOfStatement", }, ], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 3, }, "start": Object { "column": 0, @@ -69032,14 +94458,14 @@ Object { }, "range": Array [ 0, - 109, + 37, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -69049,7 +94475,25 @@ Object { }, "range": Array [ 0, - 1, + 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": "(", @@ -69057,56 +94501,128 @@ Object { Object { "loc": Object { "end": Object { - "column": 2, + "column": 8, "line": 1, }, "start": Object { - "column": 1, + "column": 5, "line": 1, }, }, "range": Array [ - 1, - 2, + 5, + 8, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 7, - 17, + 9, + 10, ], "type": "Identifier", - "value": "initialize", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 13, + ], + "type": "Identifier", + "value": "of", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 2, + "line": 1, }, "start": Object { "column": 14, - "line": 2, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, }, }, "range": Array [ + 16, 17, - 18, ], "type": "Punctuator", - "value": "(", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 33, + ], + "type": "Identifier", + "value": "doSomething", }, Object { "loc": Object { @@ -69120,16 +94636,16 @@ Object { }, }, "range": Array [ - 18, - 19, + 33, + 34, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 17, "line": 2, }, "start": Object { @@ -69138,546 +94654,639 @@ Object { }, }, "range": Array [ - 19, - 26, + 34, + 35, ], - "type": "Identifier", - "value": "someVar", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 18, "line": 2, }, "start": Object { - "column": 23, + "column": 17, "line": 2, }, }, "range": Array [ - 26, - 27, + 35, + 36, ], "type": "Punctuator", - "value": ",", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/forOf/for-of-destruction.src 1`] = ` +Object { + "body": Array [ Object { + "await": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 33, + ], + "type": "BlockStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "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": 2, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 28, - 36, + 0, + 33, ], - "type": "Identifier", - "value": "otherVar", + "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": "ForOfStatement", + }, + ], + "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": 34, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 33, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 36, - 37, + 9, + 10, ], "type": "Punctuator", - "value": ",", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 35, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 38, - 41, + 10, + 14, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "name", }, Object { "loc": Object { "end": Object { - "column": 45, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 38, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 41, - 48, + 14, + 15, ], - "type": "Identifier", - "value": "options", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 46, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 45, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 48, - 49, + 16, + 21, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "value", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 46, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 49, - 50, + 21, + 22, ], "type": "Punctuator", - "value": ")", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 49, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 48, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 51, - 52, + 23, + 25, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 29, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 26, + "line": 1, }, }, "range": Array [ - 103, - 104, + 26, + 29, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "obj", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 30, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 29, + "line": 1, }, }, "range": Array [ - 105, - 106, + 29, + 30, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 32, + "line": 1, }, "start": Object { - "column": 1, - "line": 5, + "column": 31, + "line": 1, }, }, "range": Array [ - 106, - 107, + 31, + 32, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 33, + "line": 1, }, "start": Object { - "column": 2, - "line": 5, + "column": 32, + "line": 1, }, }, "range": Array [ - 107, - 108, + 32, + 33, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-methods.src 1`] = ` +exports[`javascript fixtures/forOf/for-of-destruction-object.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", + "await": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 33, + "line": 1, }, - "init": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 33, + ], + "type": "BlockStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "name", + "range": Array [ + 10, + 14, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { "column": 14, - "line": 2, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, }, }, - "name": "initialize", + "method": false, "range": Array [ + 10, 14, - 24, ], - "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": 14, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "name", + "range": Array [ + 10, + 14, + ], + "type": "Identifier", }, }, - "method": true, - "range": Array [ - 14, - 111, - ], - "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": 21, + "line": 1, }, "start": Object { - "column": 48, - "line": 2, + "column": 16, + "line": 1, }, }, + "name": "value", "range": Array [ - 58, - 111, + 16, + 21, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, + "kind": "init", "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 21, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 16, + "line": 1, }, }, - "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", - }, - ], + "method": false, "range": Array [ - 24, - 111, + 16, + 21, ], - "type": "FunctionExpression", + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "value", + "range": Array [ + 16, + 21, + ], + "type": "Identifier", + }, }, + ], + "range": Array [ + 9, + 22, + ], + "type": "ObjectPattern", + }, + "init": null, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, }, - ], + "start": Object { + "column": 9, + "line": 1, + }, + }, "range": Array [ - 8, - 113, + 9, + 22, ], - "type": "ObjectExpression", + "type": "VariableDeclarator", }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 1, - }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 4, - 113, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 5, + 22, + ], + "type": "VariableDeclaration", + }, "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 33, + "line": 1, }, "start": Object { "column": 0, @@ -69686,15 +95295,33 @@ Object { }, "range": Array [ 0, - 114, + 33, ], - "type": "VariableDeclaration", + "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": "ForOfStatement", }, ], "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -69703,7 +95330,7 @@ Object { }, "range": Array [ 0, - 114, + 34, ], "sourceType": "script", "tokens": Array [ @@ -69723,7 +95350,7 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { @@ -69740,41 +95367,41 @@ 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": "Punctuator", "value": "{", @@ -69783,178 +95410,456 @@ Object { "loc": Object { "end": Object { "column": 14, - "line": 2, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ + 10, 14, - 24, ], "type": "Identifier", - "value": "initialize", + "value": "name", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 2, + "line": 1, }, "start": Object { "column": 14, - "line": 2, + "line": 1, }, }, "range": Array [ - 24, - 25, + 14, + 15, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { "column": 16, - "line": 2, + "line": 1, + }, + }, + "range": Array [ + 16, + 21, + ], + "type": "Identifier", + "value": "value", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 25, - 26, + 21, + 22, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { "column": 23, - "line": 2, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "type": "Identifier", + "value": "of", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ 26, - 33, + 29, ], "type": "Identifier", - "value": "someVar", + "value": "obj", }, 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 [ - 33, - 34, + 29, + 30, ], "type": "Punctuator", - "value": ",", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 31, + "line": 1, }, }, "range": Array [ - 35, - 43, + 31, + 32, ], - "type": "Identifier", - "value": "otherVar", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 33, + "line": 1, }, "start": Object { - "column": 33, - "line": 2, + "column": 32, + "line": 1, }, }, "range": Array [ - 43, - 44, + 32, + 33, ], "type": "Punctuator", - "value": ",", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/forOf/for-of-object.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 [ + 22, + 33, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 35, + ], + "type": "CallExpression", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 36, + ], + "type": "ExpressionStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "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": 38, + "column": 18, "line": 2, }, "start": Object { - "column": 35, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 45, - 48, + 0, + 36, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "properties": Array [], + "range": Array [ + 14, + 16, + ], + "type": "ObjectExpression", + }, + "type": "ForOfStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "for", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, ], "type": "Punctuator", - "value": "...", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 45, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 38, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 48, - 55, + 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": "options", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 46, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 45, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 55, - 56, + 11, + 13, + ], + "type": "Identifier", + "value": "of", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, ], "type": "Punctuator", "value": "}", @@ -69962,17 +95867,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 47, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 46, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 56, - 57, + 16, + 17, ], "type": "Punctuator", "value": ")", @@ -69980,71 +95885,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 49, + "column": 15, "line": 2, }, "start": Object { - "column": 48, + "column": 4, "line": 2, }, }, "range": Array [ - 58, - 59, + 22, + 33, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "doSomething", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 16, + "line": 2, }, "start": Object { - "column": 4, - "line": 4, + "column": 15, + "line": 2, }, }, "range": Array [ - 110, - 111, + 33, + 34, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 17, + "line": 2, }, "start": Object { - "column": 0, - "line": 5, + "column": 16, + "line": 2, }, }, "range": Array [ - 112, - 113, + 34, + 35, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 18, + "line": 2, }, "start": Object { - "column": 1, - "line": 5, + "column": 17, + "line": 2, }, }, "range": Array [ - 113, - 114, + 35, + 36, ], "type": "Punctuator", "value": ";", @@ -70054,365 +95959,290 @@ Object { } `; -exports[`javascript fixtures/experimentalObjectRestSpread/shorthand-properties.src 1`] = ` +exports[`javascript fixtures/forOf/for-of-with-function-initializer.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": 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": 7, + "column": 60, "line": 1, }, "start": Object { - "column": 4, + "column": 53, "line": 1, }, }, - "name": "foo", + "name": "process", "range": Array [ - 4, - 7, + 53, + 60, ], "type": "Identifier", }, - "init": null, "loc": Object { "end": Object { - "column": 7, + "column": 63, "line": 1, }, "start": Object { - "column": 4, + "column": 53, "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, + 53, + 63, ], - "type": "VariableDeclarator", + "type": "CallExpression", }, - 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", + "loc": Object { + "end": Object { + "column": 64, + "line": 1, }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, + "start": Object { + "column": 53, + "line": 1, }, - "range": Array [ - 22, - 25, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, }, + "range": Array [ + 53, + 64, + ], + "type": "ExpressionStatement", }, - "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, - }, + "left": Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, }, - "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", + "start": Object { + "column": 9, + "line": 1, }, }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, + "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", }, - "start": Object { - "column": 4, - "line": 7, + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, }, + "range": Array [ + 26, + 41, + ], + "type": "ReturnStatement", }, - "name": "get", - "range": Array [ - 51, - 54, - ], - "type": "Identifier", - }, - "kind": "init", + ], "loc": Object { "end": Object { - "column": 7, - "line": 7, + "column": 43, + "line": 1, }, "start": Object { - "column": 4, - "line": 7, + "column": 24, + "line": 1, }, }, - "method": false, "range": Array [ - 51, - 54, + 24, + 43, ], - "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", - }, + "type": "BlockStatement", }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "name": "set", - "range": Array [ - 63, - 66, - ], - "type": "Identifier", + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 43, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, + "start": Object { + "column": 13, + "line": 1, }, - "range": Array [ - 60, - 66, - ], - "type": "SpreadElement", }, - ], + "params": Array [], + "range": Array [ + 13, + 43, + ], + "type": "FunctionExpression", + }, + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, "range": Array [ - 36, - 68, + 9, + 43, ], - "type": "ObjectExpression", + "type": "VariableDeclarator", }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 5, - }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, }, - "range": Array [ - 32, - 68, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 5, + 43, + ], + "type": "VariableDeclaration", + }, "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 64, + "line": 1, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 28, - 69, + 0, + 64, ], - "type": "VariableDeclaration", + "right": Object { + "loc": Object { + "end": Object { + "column": 51, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "name": "list", + "range": Array [ + 47, + 51, + ], + "type": "Identifier", + }, + "type": "ForOfStatement", }, ], "loc": Object { "end": Object { "column": 0, - "line": 10, + "line": 2, }, "start": Object { "column": 0, @@ -70421,7 +96251,7 @@ Object { }, "range": Array [ 0, - 70, + 65, ], "sourceType": "script", "tokens": Array [ @@ -70441,12 +96271,12 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -70456,10 +96286,10 @@ Object { }, "range": Array [ 4, - 7, + 5, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -70468,1252 +96298,1348 @@ Object { "line": 1, }, "start": Object { - "column": 7, + "column": 5, "line": 1, }, }, "range": Array [ - 7, + 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": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ 13, - 16, + 21, ], - "type": "Identifier", - "value": "get", + "type": "Keyword", + "value": "function", }, 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": "(", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 23, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 22, + "line": 1, }, }, "range": Array [ 22, - 25, + 23, ], - "type": "Identifier", - "value": "set", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 24, + "line": 1, }, }, "range": Array [ + 24, 25, - 26, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 32, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 26, + "line": 1, }, }, "range": Array [ - 28, - 31, + 26, + 32, ], "type": "Keyword", - "value": "var", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 35, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 33, + "line": 1, }, }, "range": Array [ - 32, 33, + 35, ], - "type": "Identifier", - "value": "x", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 38, + "line": 1, }, "start": Object { - "column": 6, - "line": 5, + "column": 36, + "line": 1, }, }, "range": Array [ - 34, - 35, + 36, + 38, + ], + "type": "Keyword", + "value": "in", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, ], "type": "Punctuator", - "value": "=", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 41, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 40, + "line": 1, }, }, "range": Array [ - 36, - 37, + 40, + 41, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 6, + "column": 43, + "line": 1, }, "start": Object { - "column": 4, - "line": 6, + "column": 42, + "line": 1, }, }, "range": Array [ 42, - 45, + 43, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 46, ], "type": "Identifier", - "value": "foo", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 6, + "column": 51, + "line": 1, }, "start": Object { - "column": 7, - "line": 6, + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 51, + ], + "type": "Identifier", + "value": "list", + }, + Object { + "loc": Object { + "end": Object { + "column": 52, + "line": 1, + }, + "start": Object { + "column": 51, + "line": 1, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 60, + "line": 1, + }, + "start": Object { + "column": 53, + "line": 1, + }, + }, + "range": Array [ + 53, + 60, + ], + "type": "Identifier", + "value": "process", + }, + Object { + "loc": Object { + "end": Object { + "column": 61, + "line": 1, + }, + "start": Object { + "column": 60, + "line": 1, + }, + }, + "range": Array [ + 60, + 61, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 62, + "line": 1, + }, + "start": Object { + "column": 61, + "line": 1, + }, + }, + "range": Array [ + 61, + 62, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 63, + "line": 1, + }, + "start": Object { + "column": 62, + "line": 1, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 64, + "line": 1, + }, + "start": Object { + "column": 63, + "line": 1, + }, + }, + "range": Array [ + 63, + 64, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/forOf/for-of-with-rest.src 1`] = ` +Object { + "body": Array [ + Object { + "await": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 41, + ], + "type": "BlockStatement", + }, + "left": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, }, + "properties": Array [ + Object { + "computed": false, + "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": "init", + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 7, + 12, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "xx", + "range": Array [ + 10, + 12, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "rrestOff", + "range": Array [ + 17, + 25, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 25, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 5, + 27, + ], + "type": "ObjectPattern", }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ",", - }, - Object { "loc": Object { "end": Object { - "column": 7, - "line": 7, + "column": 1, + "line": 2, }, "start": Object { - "column": 4, - "line": 7, + "column": 0, + "line": 1, }, }, "range": Array [ - 51, - 54, + 0, + 41, ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, + "right": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, }, + "name": "array", + "range": Array [ + 31, + 36, + ], + "type": "Identifier", }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": ",", + "type": "ForOfStatement", }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 60, - 63, - ], - "type": "Punctuator", - "value": "...", + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 3, }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 42, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 10, - "line": 8, + "column": 3, + "line": 1, }, "start": Object { - "column": 7, - "line": 8, + "column": 0, + "line": 1, }, }, "range": Array [ - 63, - 66, + 0, + 3, ], - "type": "Identifier", - "value": "set", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 5, + "line": 1, }, "start": Object { - "column": 0, - "line": 9, + "column": 4, + "line": 1, }, }, "range": Array [ - 67, - 68, + 4, + 5, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 6, + "line": 1, }, "start": Object { - "column": 1, - "line": 9, + "column": 5, + "line": 1, }, }, "range": Array [ - 68, - 69, + 5, + 6, ], "type": "Punctuator", - "value": ";", + "value": "{", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/experimentalObjectRestSpread/single-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", - }, - 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, + "line": 1, }, "start": Object { - "column": 0, + "column": 7, "line": 1, }, }, "range": Array [ - 0, - 26, + 7, + 8, ], - "type": "VariableDeclaration", + "type": "Identifier", + "value": "x", }, 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": 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 { - "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, - }, - }, - "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", - }, - }, - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 7, - "line": 8, - }, - }, - "name": "set", - "range": Array [ - 73, - 76, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 10, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 70, - 76, - ], - "type": "SpreadElement", - }, - ], - "range": Array [ - 36, - 78, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 9, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 32, - 78, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 9, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 8, + "line": 1, }, }, "range": Array [ - 28, - 79, + 8, + 9, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 80, - ], - "sourceType": "script", - "tokens": Array [ + "type": "Punctuator", + "value": ":", + }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 12, "line": 1, }, "start": Object { - "column": 0, + "column": 10, "line": 1, }, }, "range": Array [ - 0, - 3, + 10, + 12, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "xx", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 13, "line": 1, }, "start": Object { - "column": 4, + "column": 12, "line": 1, }, }, "range": Array [ - 4, - 7, + 12, + 13, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 17, "line": 1, }, "start": Object { - "column": 7, + "column": 14, "line": 1, }, }, "range": Array [ - 7, - 8, + 14, + 17, ], "type": "Punctuator", - "value": ",", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 13, - 16, + 17, + 25, ], "type": "Identifier", - "value": "get", + "value": "rrestOff", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 16, - 17, + 26, + 27, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 30, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 28, + "line": 1, }, }, "range": Array [ - 22, - 25, + 28, + 30, ], "type": "Identifier", - "value": "set", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 36, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 31, + "line": 1, }, }, "range": Array [ - 25, - 26, + 31, + 36, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "array", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 37, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 36, + "line": 1, }, }, "range": Array [ - 28, - 31, + 36, + 37, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 39, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 38, + "line": 1, }, }, "range": Array [ - 32, - 33, + 38, + 39, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 1, + "line": 2, }, "start": Object { - "column": 6, - "line": 5, + "column": 0, + "line": 2, }, }, "range": Array [ - 34, - 35, + 40, + 41, ], "type": "Punctuator", - "value": "=", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/forOf/for-of-with-var-and-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", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 25, + 39, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 41, + ], + "type": "BlockStatement", + }, + "left": Object { + "declarations": Array [ + Object { + "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": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 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": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 42, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 3, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 36, - 37, + 0, + 3, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 6, + "column": 5, + "line": 1, }, "start": Object { "column": 4, - "line": 6, + "line": 1, }, }, "range": Array [ - 42, - 45, + 4, + 5, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 8, - "line": 6, + "line": 1, }, "start": Object { - "column": 7, - "line": 6, + "column": 5, + "line": 1, }, }, "range": Array [ - 45, - 46, + 5, + 8, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 6, + "column": 10, + "line": 1, }, "start": Object { "column": 9, - "line": 6, + "line": 1, }, }, "range": Array [ - 47, - 50, + 9, + 10, ], "type": "Identifier", - "value": "foo", + "value": "x", }, Object { "loc": Object { "end": Object { "column": 13, - "line": 6, + "line": 1, }, "start": Object { - "column": 12, - "line": 6, + "column": 11, + "line": 1, }, }, "range": Array [ - 50, - 51, + 11, + 13, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 7, + "column": 17, + "line": 1, }, "start": Object { - "column": 4, - "line": 7, + "column": 14, + "line": 1, }, }, "range": Array [ - 56, - 59, + 14, + 17, ], "type": "Identifier", - "value": "get", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 7, + "column": 18, + "line": 1, }, "start": Object { - "column": 7, - "line": 7, + "column": 17, + "line": 1, }, }, "range": Array [ - 59, - 60, + 17, + 18, ], "type": "Punctuator", - "value": ":", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 7, + "column": 20, + "line": 1, }, "start": Object { - "column": 9, - "line": 7, + "column": 19, + "line": 1, }, }, "range": Array [ - 61, - 64, + 19, + 20, ], - "type": "Identifier", - "value": "get", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 7, + "column": 15, + "line": 2, }, "start": Object { - "column": 12, - "line": 7, + "column": 4, + "line": 2, }, }, "range": Array [ - 64, - 65, + 25, + 36, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "doSomething", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 8, + "column": 16, + "line": 2, }, "start": Object { - "column": 4, - "line": 8, + "column": 15, + "line": 2, }, }, "range": Array [ - 70, - 73, + 36, + 37, ], "type": "Punctuator", - "value": "...", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 8, + "column": 17, + "line": 2, }, "start": Object { - "column": 7, - "line": 8, + "column": 16, + "line": 2, }, }, "range": Array [ - 73, - 76, + 37, + 38, ], - "type": "Identifier", - "value": "set", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 18, + "line": 2, }, "start": Object { - "column": 0, - "line": 9, + "column": 17, + "line": 2, }, }, "range": Array [ - 77, - 78, + 38, + 39, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 1, + "line": 3, }, "start": Object { - "column": 1, - "line": 9, + "column": 0, + "line": 3, }, }, "range": Array [ - 78, - 79, + 40, + 41, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/experimentalObjectRestSpread/spread-trailing-comma.src 1`] = ` +exports[`javascript fixtures/forOf/for-of-with-var-and-no-braces.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", + "await": false, + "body": Object { + "expression": Object { + "arguments": Array [], + "callee": Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 3, - "line": 1, + "column": 4, + "line": 2, }, }, - "method": false, + "name": "doSomething", "range": Array [ - 3, - 4, + 23, + 34, ], - "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", - }, + "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, - }, + "loc": Object { + "end": Object { + "column": 17, + "line": 2, }, - "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", + "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 { - "argument": Object { + "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 10, "line": 1, }, "start": Object { - "column": 12, + "column": 9, "line": 1, }, }, - "name": "c", + "name": "x", "range": Array [ - 12, - 13, + 9, + 10, ], "type": "Identifier", }, + "init": null, "loc": Object { "end": Object { - "column": 13, + "column": 10, "line": 1, }, "start": Object { @@ -71723,21 +97649,32 @@ Object { }, "range": Array [ 9, - 13, + 10, ], - "type": "SpreadElement", + "type": "VariableDeclarator", }, ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, "range": Array [ - 1, - 16, + 5, + 10, ], - "type": "ObjectExpression", + "type": "VariableDeclaration", }, "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { "column": 0, @@ -71746,15 +97683,33 @@ Object { }, "range": Array [ 0, - 17, + 37, ], - "type": "ExpressionStatement", + "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": 2, + "line": 3, }, "start": Object { "column": 0, @@ -71763,14 +97718,14 @@ Object { }, "range": Array [ 0, - 18, + 38, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -71780,533 +97735,349 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 5, "line": 1, }, "start": Object { - "column": 1, + "column": 4, "line": 1, }, }, "range": Array [ - 1, - 2, + 4, + 5, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 8, "line": 1, }, "start": Object { - "column": 3, + "column": 5, "line": 1, }, }, "range": Array [ - 3, - 4, + 5, + 8, ], - "type": "Identifier", - "value": "a", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 10, "line": 1, }, "start": Object { - "column": 4, + "column": 9, "line": 1, }, }, "range": Array [ - 4, - 5, + 9, + 10, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 13, "line": 1, }, "start": Object { - "column": 6, + "column": 11, "line": 1, }, }, "range": Array [ - 6, - 7, + 11, + 13, ], "type": "Identifier", - "value": "b", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 17, "line": 1, }, "start": Object { - "column": 7, + "column": 14, "line": 1, }, }, "range": Array [ - 7, - 8, + 14, + 17, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 18, "line": 1, }, "start": Object { - "column": 9, + "column": 17, "line": 1, }, }, "range": Array [ - 9, - 12, + 17, + 18, ], "type": "Punctuator", - "value": "...", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 12, - 13, + 23, + 34, ], "type": "Identifier", - "value": "c", + "value": "doSomething", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 13, - 14, + 34, + 35, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 17, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 15, - 16, + 35, + 36, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 18, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 17, + "line": 2, }, }, "range": Array [ - 16, - 17, + 36, + 37, ], "type": "Punctuator", - "value": ")", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/experimentalObjectRestSpread/two-spread.src 1`] = ` +exports[`javascript fixtures/forOf/invalid-for-of-with-const-and-no-braces.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": 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 { + "await": false, + "body": Object { + "expression": Object { + "arguments": Array [], + "callee": Object { "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 15, + "line": 2, }, "start": Object { - "column": 8, - "line": 5, + "column": 4, + "line": 2, }, }, - "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, - }, - }, - "range": Array [ - 68, - 74, - ], - "type": "SpreadElement", - }, - ], + "name": "doSomething", "range": Array [ + 25, 36, - 76, ], - "type": "ObjectExpression", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 17, + "line": 2, }, "start": Object { "column": 4, - "line": 5, + "line": 2, }, }, "range": Array [ - 32, - 76, + 25, + 38, ], - "type": "VariableDeclarator", + "type": "CallExpression", }, - ], - "kind": "var", + "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": 2, - "line": 9, + "column": 18, + "line": 2, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 28, - 77, + 0, + 39, ], - "type": "VariableDeclaration", + "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": 10, + "line": 3, }, "start": Object { "column": 0, @@ -72315,7 +98086,7 @@ Object { }, "range": Array [ 0, - 78, + 40, ], "sourceType": "script", "tokens": Array [ @@ -72335,12 +98106,12 @@ Object { 3, ], "type": "Keyword", - "value": "var", + "value": "for", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -72350,7 +98121,79 @@ Object { }, "range": Array [ 4, - 7, + 5, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 10, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 15, + ], + "type": "Identifier", + "value": "of", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 19, ], "type": "Identifier", "value": "foo", @@ -72358,25 +98201,25 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 20, "line": 1, }, "start": Object { - "column": 7, + "column": 19, "line": 1, }, }, "range": Array [ - 7, - 8, + 19, + 20, ], "type": "Punctuator", - "value": ",", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 15, "line": 2, }, "start": Object { @@ -72385,332 +98228,430 @@ Object { }, }, "range": Array [ - 13, - 16, + 25, + 36, ], "type": "Identifier", - "value": "get", + "value": "doSomething", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 16, "line": 2, }, "start": Object { - "column": 7, + "column": 15, "line": 2, }, }, "range": Array [ - 16, - 17, + 36, + 37, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 17, + "line": 2, }, "start": Object { - "column": 4, - "line": 3, + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +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", }, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "value": "set", - }, - Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 18, + "line": 2, }, "start": Object { - "column": 7, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 25, - 26, + 0, + 37, ], - "type": "Punctuator", - "value": ";", + "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, }, + }, + "range": Array [ + 0, + 38, + ], + "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", + "value": "for", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 5, + "line": 1, }, "start": Object { "column": 4, - "line": 5, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 5, - }, - "start": Object { - "column": 6, - "line": 5, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, + "line": 1, }, }, "range": Array [ - 36, - 37, + 4, + 5, ], "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": "(", }, Object { "loc": Object { "end": Object { "column": 8, - "line": 6, + "line": 1, }, "start": Object { - "column": 7, - "line": 6, + "column": 5, + "line": 1, }, }, "range": Array [ - 45, - 46, + 5, + 8, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 6, + "column": 10, + "line": 1, }, "start": Object { "column": 9, - "line": 6, + "line": 1, }, }, "range": Array [ - 47, - 50, + 9, + 10, ], "type": "Identifier", - "value": "foo", + "value": "x", }, Object { "loc": Object { "end": Object { "column": 13, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, + "line": 1, }, "start": Object { - "column": 4, - "line": 7, + "column": 11, + "line": 1, }, }, "range": Array [ - 56, - 59, + 11, + 13, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "of", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 7, + "column": 17, + "line": 1, }, "start": Object { - "column": 7, - "line": 7, + "column": 14, + "line": 1, }, }, "range": Array [ - 59, - 62, + 14, + 17, ], "type": "Identifier", - "value": "get", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 7, + "column": 18, + "line": 1, }, "start": Object { - "column": 10, - "line": 7, + "column": 17, + "line": 1, }, }, "range": Array [ - 62, - 63, + 17, + 18, ], "type": "Punctuator", - "value": ",", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 8, + "column": 15, + "line": 2, }, "start": Object { "column": 4, - "line": 8, + "line": 2, }, }, "range": Array [ - 68, - 71, + 23, + 34, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "doSomething", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 8, + "column": 16, + "line": 2, }, "start": Object { - "column": 7, - "line": 8, + "column": 15, + "line": 2, }, }, "range": Array [ - 71, - 74, + 34, + 35, ], - "type": "Identifier", - "value": "set", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 17, + "line": 2, }, "start": Object { - "column": 0, - "line": 9, + "column": 16, + "line": 2, }, }, "range": Array [ - 75, - 76, + 35, + 36, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 18, + "line": 2, }, "start": Object { - "column": 1, - "line": 9, + "column": 17, + "line": 2, }, }, "range": Array [ - 76, - 77, + 36, + 37, ], "type": "Punctuator", "value": ";", @@ -72720,68 +98661,107 @@ Object { } `; -exports[`javascript fixtures/experimentalOptionalCatchBinding/optional-catch-binding.src 1`] = ` +exports[`javascript fixtures/generators/anonymous-generator.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 { + "expression": Object { + "async": false, "body": Object { - "body": Array [], + "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", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 23, + ], + "type": "ExpressionStatement", + }, + ], "loc": Object { "end": Object { - "column": 15, + "column": 25, "line": 1, }, "start": Object { - "column": 13, + "column": 14, "line": 1, }, }, "range": Array [ - 13, - 15, + 14, + 25, ], "type": "BlockStatement", }, + "expression": false, + "generator": true, + "id": null, "loc": Object { "end": Object { - "column": 15, + "column": 25, "line": 1, }, "start": Object { - "column": 7, + "column": 1, "line": 1, }, }, - "param": null, + "params": Array [], "range": Array [ - 7, - 15, + 1, + 25, ], - "type": "CatchClause", + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 15, + "column": 27, "line": 1, }, "start": Object { @@ -72791,15 +98771,15 @@ Object { }, "range": Array [ 0, - 15, + 27, ], - "type": "TryStatement", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { "column": 0, @@ -72808,14 +98788,14 @@ Object { }, "range": Array [ 0, - 16, + 27, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -72825,355 +98805,395 @@ Object { }, "range": Array [ 0, - 3, + 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": "try", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 10, "line": 1, }, "start": Object { - "column": 4, + "column": 9, "line": 1, }, }, "range": Array [ - 4, - 5, + 9, + 10, ], "type": "Punctuator", - "value": "{", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 12, "line": 1, }, "start": Object { - "column": 5, + "column": 11, "line": 1, }, }, "range": Array [ - 5, - 6, + 11, + 12, ], "type": "Punctuator", - "value": "}", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 21, + ], + "type": "Keyword", + "value": "yield", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + "value": "v", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 25, "line": 1, }, "start": Object { - "column": 7, + "column": 24, "line": 1, }, }, "range": Array [ - 7, - 12, + 24, + 25, ], - "type": "Keyword", - "value": "catch", + "type": "Punctuator", + "value": "}", }, 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": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 27, "line": 1, }, "start": Object { - "column": 14, + "column": 26, "line": 1, }, }, "range": Array [ - 14, - 15, + 26, + 27, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/experimentalOptionalCatchBinding/optional-catch-binding-finally.src 1`] = ` +exports[`javascript fixtures/generators/async-generator-function.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 { + "async": true, + "body": Object { "body": Array [], "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 24, - "line": 1, + "column": 22, + "line": 2, }, }, "range": Array [ - 24, - 26, + 23, + 27, ], "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", - }, + "expression": false, + "generator": true, + "id": Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 16, + "line": 2, }, }, - "param": null, + "name": "foo", "range": Array [ - 7, - 15, + 17, + 20, ], - "type": "CatchClause", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, + "params": Array [], "range": Array [ - 0, - 26, + 1, + 27, ], - "type": "TryStatement", + "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 5, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, "range": Array [ - 0, - 27, + 1, + 28, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, "range": Array [ - 0, - 3, + 1, + 6, ], - "type": "Keyword", - "value": "try", + "type": "Identifier", + "value": "async", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 4, - "line": 1, + "column": 6, + "line": 2, }, }, "range": Array [ - 4, - 5, + 7, + 15, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 5, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 5, - 6, + 16, + 17, ], "type": "Punctuator", - "value": "}", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 7, - 12, + 17, + 20, ], - "type": "Keyword", - "value": "catch", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 20, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 19, + "line": 2, }, }, "range": Array [ - 13, - 14, + 20, + 21, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 21, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 20, + "line": 2, }, }, "range": Array [ - 14, - 15, + 21, + 22, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { "column": 23, - "line": 1, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 22, + "line": 2, }, }, "range": Array [ - 16, 23, - ], - "type": "Keyword", - "value": "finally", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ 24, - 25, ], "type": "Punctuator", "value": "{", @@ -73181,17 +99201,17 @@ Object { 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, + 27, ], "type": "Punctuator", "value": "}", @@ -73201,197 +99221,257 @@ Object { } `; -exports[`javascript fixtures/exponentiationOperators/exponential-operators.src 1`] = ` +exports[`javascript fixtures/generators/async-generator-method.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 { - "left": Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 12, + "line": 2, }, }, + "name": "f", "range": Array [ - 8, - 9, + 22, + 23, ], - "raw": "2", - "type": "Literal", - "value": 2, + "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 8, - "line": 1, + "column": 4, + "line": 2, }, }, - "operator": "**", "range": Array [ - 8, 14, + 63, ], - "right": Object { + "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": 14, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { "column": 13, - "line": 1, + "line": 2, }, }, + "params": Array [], "range": Array [ - 13, - 14, + 23, + 63, ], - "raw": "3", - "type": "Literal", - "value": 3, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, + "type": "FunctionExpression", }, }, - "range": Array [ - 4, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 15, - ], - "type": "VariableDeclaration", - }, - Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 8, + "line": 1, }, - "name": "x", - "range": Array [ - 16, - 17, - ], - "type": "Identifier", }, + "range": Array [ + 8, + 65, + ], + "type": "ClassBody", + }, + "id": Object { "loc": Object { "end": Object { "column": 7, - "line": 2, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 6, + "line": 1, }, }, - "operator": "**=", + "name": "C", "range": Array [ - 16, - 23, + 6, + 7, ], - "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", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 1, + "line": 5, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 16, - 24, + 0, + 65, ], - "type": "ExpressionStatement", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 6, }, "start": Object { "column": 0, @@ -73400,14 +99480,14 @@ Object { }, "range": Array [ 0, - 25, + 66, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -73417,133 +99497,187 @@ 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": "C", }, 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": 9, - "line": 1, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 8, - 9, + 14, + 19, ], - "type": "Numeric", - "value": "2", + "type": "Identifier", + "value": "async", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { "column": 10, - "line": 1, + "line": 2, }, }, "range": Array [ - 10, - 12, + 20, + 21, ], "type": "Punctuator", - "value": "**", + "value": "*", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + "value": "f", }, Object { "loc": Object { "end": Object { "column": 14, - "line": 1, + "line": 2, }, "start": Object { "column": 13, - "line": 1, + "line": 2, }, }, "range": Array [ - 13, - 14, + 23, + 24, ], - "type": "Numeric", - "value": "3", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 1, + "line": 2, }, "start": Object { "column": 14, - "line": 1, + "line": 2, }, }, "range": Array [ - 14, - 15, + 24, + 25, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 17, "line": 2, }, "start": Object { - "column": 0, + "column": 16, "line": 2, }, }, "range": Array [ - 16, - 17, + 26, + 27, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 36, + 41, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 42, + 43, ], "type": "Identifier", "value": "x", @@ -73551,310 +99685,290 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 17, + "line": 3, }, "start": Object { - "column": 2, - "line": 2, + "column": 16, + "line": 3, }, }, "range": Array [ - 18, - 21, + 44, + 45, ], "type": "Punctuator", - "value": "**=", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 23, + "line": 3, }, "start": Object { - "column": 6, - "line": 2, + "column": 18, + "line": 3, }, }, "range": Array [ - 22, - 23, + 46, + 51, ], - "type": "Numeric", - "value": "4", + "type": "Keyword", + "value": "yield", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 24, + "line": 3, }, "start": Object { - "column": 7, - "line": 2, + "column": 23, + "line": 3, }, }, "range": Array [ - 23, - 24, + 51, + 52, + ], + "type": "Punctuator", + "value": "*", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 3, + }, + "start": Object { + "column": 25, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + "value": "g", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 3, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 3, + }, + }, + "range": Array [ + 56, + 57, ], "type": "Punctuator", "value": ";", }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "}", + }, ], "type": "Program", } `; -exports[`javascript fixtures/forOf/for-of-with-function-initializer.src 1`] = ` +exports[`javascript fixtures/generators/double-yield.src 1`] = ` Object { "body": Array [ Object { - "await": false, - "body": Object { - "expression": Object { - "arguments": Array [ + "expression": Object { + "async": false, + "body": Object { + "body": 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", - }, + "expression": Object { + "argument": Object { + "argument": Object { "loc": Object { "end": Object { - "column": 41, + "column": 30, "line": 1, }, "start": Object { - "column": 26, + "column": 28, "line": 1, }, }, "range": Array [ - 26, - 41, + 28, + 30, ], - "type": "ReturnStatement", + "raw": "10", + "type": "Literal", + "value": 10, }, - ], + "delegate": false, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 30, + ], + "type": "YieldExpression", + }, + "delegate": false, "loc": Object { "end": Object { - "column": 43, + "column": 30, "line": 1, }, "start": Object { - "column": 24, + "column": 16, "line": 1, }, }, "range": Array [ - 24, - 43, + 16, + 30, ], - "type": "BlockStatement", + "type": "YieldExpression", }, - "expression": false, - "generator": false, - "id": null, "loc": Object { "end": Object { - "column": 43, + "column": 30, "line": 1, }, "start": Object { - "column": 13, + "column": 16, "line": 1, }, }, - "params": Array [], "range": Array [ - 13, - 43, + 16, + 30, ], - "type": "FunctionExpression", + "type": "ExpressionStatement", }, - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, }, - "range": Array [ - 9, - 43, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 14, + 32, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": true, + "id": null, "loc": Object { "end": Object { - "column": 43, + "column": 32, "line": 1, }, "start": Object { - "column": 5, + "column": 1, "line": 1, }, }, + "params": Array [], "range": Array [ - 5, - 43, + 1, + 32, ], - "type": "VariableDeclaration", + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 64, + "column": 34, "line": 1, }, "start": Object { @@ -73864,33 +99978,15 @@ Object { }, "range": Array [ 0, - 64, + 34, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 51, - "line": 1, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "name": "list", - "range": Array [ - 47, - 51, - ], - "type": "Identifier", - }, - "type": "ForOfStatement", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 34, + "line": 1, }, "start": Object { "column": 0, @@ -73899,14 +99995,14 @@ Object { }, "range": Array [ 0, - 65, + 34, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -73916,25 +100012,7 @@ 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, + 1, ], "type": "Punctuator", "value": "(", @@ -73942,20 +100020,20 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 9, "line": 1, }, "start": Object { - "column": 5, + "column": 1, "line": 1, }, }, "range": Array [ - 5, - 8, + 1, + 9, ], "type": "Keyword", - "value": "var", + "value": "function", }, Object { "loc": Object { @@ -73972,8 +100050,8 @@ Object { 9, 10, ], - "type": "Identifier", - "value": "i", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { @@ -73991,328 +100069,391 @@ Object { 12, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 13, "line": 1, }, "start": Object { - "column": 13, + "column": 12, "line": 1, }, }, "range": Array [ + 12, 13, - 21, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 15, "line": 1, }, "start": Object { - "column": 21, + "column": 14, "line": 1, }, }, "range": Array [ - 21, - 22, + 14, + 15, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 21, "line": 1, }, "start": Object { - "column": 22, + "column": 16, "line": 1, }, }, "range": Array [ - 22, - 23, + 16, + 21, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "yield", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 27, "line": 1, }, "start": Object { - "column": 24, + "column": 22, "line": 1, }, }, "range": Array [ - 24, - 25, + 22, + 27, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "yield", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 30, "line": 1, }, "start": Object { - "column": 26, + "column": 28, "line": 1, }, }, "range": Array [ - 26, - 32, + 28, + 30, ], - "type": "Keyword", - "value": "return", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 32, "line": 1, }, "start": Object { - "column": 33, + "column": 31, "line": 1, }, }, "range": Array [ - 33, - 35, + 31, + 32, ], - "type": "Numeric", - "value": "10", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 33, "line": 1, }, "start": Object { - "column": 36, + "column": 32, "line": 1, }, }, "range": Array [ - 36, - 38, + 32, + 33, ], - "type": "Keyword", - "value": "in", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 40, + "column": 34, "line": 1, }, "start": Object { - "column": 39, + "column": 33, "line": 1, }, }, "range": Array [ - 39, - 40, + 33, + 34, ], "type": "Punctuator", - "value": "[", + "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": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 16, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "t", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 41, + "column": 16, "line": 1, }, "start": Object { - "column": 40, + "column": 0, "line": 1, }, }, + "params": Array [], "range": Array [ - 40, - 41, + 0, + 16, ], - "type": "Punctuator", - "value": "]", + "type": "FunctionDeclaration", }, Object { "loc": Object { "end": Object { - "column": 43, + "column": 17, "line": 1, }, "start": Object { - "column": 42, + "column": 16, "line": 1, }, }, "range": Array [ - 42, - 43, + 16, + 17, ], - "type": "Punctuator", - "value": "}", + "type": "EmptyStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 17, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 46, + "column": 8, "line": 1, }, "start": Object { - "column": 44, + "column": 0, "line": 1, }, }, "range": Array [ - 44, - 46, + 0, + 8, ], - "type": "Identifier", - "value": "of", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 51, + "column": 9, "line": 1, }, "start": Object { - "column": 47, + "column": 8, "line": 1, }, }, "range": Array [ - 47, - 51, + 8, + 9, ], - "type": "Identifier", - "value": "list", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 52, + "column": 11, "line": 1, }, "start": Object { - "column": 51, + "column": 10, "line": 1, }, }, "range": Array [ - 51, - 52, + 10, + 11, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "t", }, Object { "loc": Object { "end": Object { - "column": 60, + "column": 12, "line": 1, }, "start": Object { - "column": 53, + "column": 11, "line": 1, }, }, "range": Array [ - 53, - 60, + 11, + 12, ], - "type": "Identifier", - "value": "process", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 61, + "column": 13, "line": 1, }, "start": Object { - "column": 60, + "column": 12, "line": 1, }, }, "range": Array [ - 60, - 61, + 12, + 13, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 62, + "column": 15, "line": 1, }, "start": Object { - "column": 61, + "column": 14, "line": 1, }, }, "range": Array [ - 61, - 62, + 14, + 15, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 63, + "column": 16, "line": 1, }, "start": Object { - "column": 62, + "column": 15, "line": 1, }, }, "range": Array [ - 62, - 63, + 15, + 16, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 64, + "column": 17, "line": 1, }, "start": Object { - "column": 63, + "column": 16, "line": 1, }, }, "range": Array [ - 63, - 64, + 16, + 17, ], "type": "Punctuator", "value": ";", @@ -74322,194 +100463,106 @@ Object { } `; -exports[`javascript fixtures/forOf/for-of-with-var-and-braces.src 1`] = ` +exports[`javascript fixtures/generators/generator-declaration.src 1`] = ` Object { "body": Array [ Object { - "await": false, + "async": false, "body": Object { "body": Array [ Object { "expression": Object { - "arguments": Array [], - "callee": Object { + "argument": Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, + "column": 28, + "line": 1, }, - }, - "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", - }, - ], - "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 { + "start": Object { + "column": 27, + "line": 1, + }, + }, + "name": "v", + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + }, + "delegate": true, "loc": Object { "end": Object { - "column": 10, + "column": 28, "line": 1, }, "start": Object { - "column": 9, + "column": 20, "line": 1, }, }, - "name": "x", "range": Array [ - 9, - 10, + 20, + 28, ], - "type": "Identifier", + "type": "YieldExpression", }, - "init": null, "loc": Object { "end": Object { - "column": 10, + "column": 28, "line": 1, }, "start": Object { - "column": 9, + "column": 20, "line": 1, }, }, "range": Array [ - 9, - 10, + 20, + 28, ], - "type": "VariableDeclarator", + "type": "ExpressionStatement", }, ], - "kind": "var", "loc": Object { "end": Object { - "column": 10, + "column": 30, "line": 1, }, "start": Object { - "column": 5, + "column": 18, "line": 1, }, }, "range": Array [ - 5, - 10, + 18, + 30, ], - "type": "VariableDeclaration", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "BlockStatement", }, - "range": Array [ - 0, - 41, - ], - "right": Object { + "expression": false, + "generator": true, + "id": Object { "loc": Object { "end": Object { - "column": 17, + "column": 14, "line": 1, }, "start": Object { - "column": 14, + "column": 10, "line": 1, }, }, - "name": "foo", + "name": "test", "range": Array [ + 10, 14, - 17, ], "type": "Identifier", }, - "type": "ForOfStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 42, - ], - "sourceType": "script", - "tokens": Array [ - Object { "loc": Object { "end": Object { - "column": 3, + "column": 30, "line": 1, }, "start": Object { @@ -74517,31 +100570,47 @@ Object { "line": 1, }, }, + "params": Array [], "range": Array [ 0, - 3, + 30, ], - "type": "Keyword", - "value": "for", + "type": "FunctionDeclaration", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 31, "line": 1, }, "start": Object { - "column": 4, + "column": 30, "line": 1, }, }, "range": Array [ - 4, - 5, + 30, + 31, ], - "type": "Punctuator", - "value": "(", + "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 { @@ -74549,85 +100618,85 @@ Object { "line": 1, }, "start": Object { - "column": 5, + "column": 0, "line": 1, }, }, "range": Array [ - 5, + 0, 8, ], "type": "Keyword", - "value": "var", + "value": "function", }, 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": "x", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 1, }, "start": Object { - "column": 11, + "column": 10, "line": 1, }, }, "range": Array [ - 11, - 13, + 10, + 14, ], "type": "Identifier", - "value": "of", + "value": "test", }, 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": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 17, "line": 1, }, "start": Object { - "column": 17, + "column": 16, "line": 1, }, }, "range": Array [ + 16, 17, - 18, ], "type": "Punctuator", "value": ")", @@ -74635,17 +100704,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": "{", @@ -74653,216 +100722,200 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 20, + "line": 1, }, }, "range": Array [ + 20, 25, - 36, ], - "type": "Identifier", - "value": "doSomething", + "type": "Keyword", + "value": "yield", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 36, - 37, + 26, + 27, ], "type": "Punctuator", - "value": "(", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 27, + "line": 1, }, }, "range": Array [ - 37, - 38, + 27, + 28, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "v", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 29, + "line": 1, }, }, "range": Array [ - 38, - 39, + 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 [ - 40, - 41, + 30, + 31, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/forOf/for-of-with-var-and-no-braces.src 1`] = ` +exports[`javascript fixtures/generators/yield-delegation.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": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "v", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + "delegate": true, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 24, + ], + "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": 24, "line": 1, }, "start": Object { - "column": 9, + "column": 16, "line": 1, }, }, - "name": "x", "range": Array [ - 9, - 10, + 16, + 24, ], - "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": 26, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, }, - "range": Array [ - 9, - 10, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 14, + 26, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": true, + "id": null, "loc": Object { "end": Object { - "column": 10, + "column": 26, "line": 1, }, "start": Object { - "column": 5, + "column": 1, "line": 1, }, }, + "params": Array [], "range": Array [ - 5, - 10, + 1, + 26, ], - "type": "VariableDeclaration", + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { "column": 0, @@ -74871,33 +100924,15 @@ Object { }, "range": Array [ 0, - 37, + 28, ], - "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", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { "column": 0, @@ -74906,14 +100941,14 @@ Object { }, "range": Array [ 0, - 38, + 28, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -74923,64 +100958,64 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "for", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { - "column": 4, + "column": 1, "line": 1, }, }, "range": Array [ - 4, - 5, + 1, + 9, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, "range": Array [ - 5, - 8, + 9, + 10, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 12, "line": 1, }, "start": Object { - "column": 9, + "column": 11, "line": 1, }, }, "range": Array [ - 9, - 10, + 11, + 12, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -74989,21 +101024,21 @@ Object { "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, + 12, 13, ], - "type": "Identifier", - "value": "of", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 1, }, "start": Object { @@ -75013,79 +101048,97 @@ Object { }, "range": Array [ 14, - 17, + 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": "foo", + "type": "Keyword", + "value": "yield", }, 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": 15, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ 23, - 34, + 24, ], "type": "Identifier", - "value": "doSomething", + "value": "v", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 34, - 35, + 25, + 26, ], "type": "Punctuator", - "value": "(", + "value": "}", }, 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 [ - 35, - 36, + 26, + 27, ], "type": "Punctuator", "value": ")", @@ -75093,17 +101146,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 27, + "line": 1, }, }, "range": Array [ - 36, - 37, + 27, + 28, ], "type": "Punctuator", "value": ";", @@ -75113,124 +101166,91 @@ Object { } `; -exports[`javascript fixtures/forOf/invalid-for-of-with-const-and-no-braces.src 1`] = ` +exports[`javascript fixtures/generators/yield-without-value.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": null, + "delegate": false, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 21, + ], + "type": "YieldExpression", }, - }, - "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, + "column": 22, "line": 1, }, "start": Object { - "column": 11, + "column": 16, "line": 1, }, }, - "name": "x", "range": Array [ - 11, - 12, + 16, + 22, ], - "type": "Identifier", + "type": "ExpressionStatement", }, - "init": null, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, }, - "range": Array [ - 11, - 12, - ], - "type": "VariableDeclarator", }, - ], - "kind": "const", + "range": Array [ + 14, + 24, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": true, + "id": null, "loc": Object { "end": Object { - "column": 12, + "column": 24, "line": 1, }, "start": Object { - "column": 5, + "column": 1, "line": 1, }, }, + "params": Array [], "range": Array [ - 5, - 12, + 1, + 24, ], - "type": "VariableDeclaration", + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { "column": 0, @@ -75239,33 +101259,15 @@ Object { }, "range": Array [ 0, - 39, + 26, ], - "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", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 2, }, "start": Object { "column": 0, @@ -75274,14 +101276,14 @@ Object { }, "range": Array [ 0, - 40, + 27, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -75291,28 +101293,28 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "for", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { - "column": 4, + "column": 1, "line": 1, }, }, "range": Array [ - 4, - 5, + 1, + 9, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { @@ -75321,16 +101323,16 @@ Object { "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, "range": Array [ - 5, + 9, 10, ], - "type": "Keyword", - "value": "const", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { @@ -75347,113 +101349,113 @@ Object { 11, 12, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 13, "line": 1, }, "start": Object { - "column": 13, + "column": 12, "line": 1, }, }, "range": Array [ + 12, 13, - 15, ], - "type": "Identifier", - "value": "of", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 15, "line": 1, }, "start": Object { - "column": 16, + "column": 14, "line": 1, }, }, "range": Array [ - 16, - 19, + 14, + 15, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 21, "line": 1, }, "start": Object { - "column": 19, + "column": 16, "line": 1, }, }, "range": Array [ - 19, - 20, + 16, + 21, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "yield", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 25, - 36, + 21, + 22, ], - "type": "Identifier", - "value": "doSomething", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 36, - 37, + 23, + 24, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ - 37, - 38, + 24, + 25, ], "type": "Punctuator", "value": ")", @@ -75461,17 +101463,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 38, - 39, + 25, + 26, ], "type": "Punctuator", "value": ";", @@ -75481,124 +101483,128 @@ Object { } `; -exports[`javascript fixtures/forOf/invalid-for-of-with-let-and-no-braces.src 1`] = ` +exports[`javascript fixtures/generators/yield-without-value-in-call.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 { + "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", }, - }, - "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": 26, "line": 1, }, "start": Object { - "column": 9, + "column": 16, "line": 1, }, }, - "name": "x", "range": Array [ - 9, - 10, + 16, + 26, ], - "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": 28, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, }, - "range": Array [ - 9, - 10, - ], - "type": "VariableDeclarator", }, - ], - "kind": "let", + "range": Array [ + 14, + 28, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": true, + "id": null, "loc": Object { "end": Object { - "column": 10, + "column": 28, "line": 1, }, "start": Object { - "column": 5, + "column": 1, "line": 1, }, }, + "params": Array [], "range": Array [ - 5, - 10, + 1, + 28, ], - "type": "VariableDeclaration", + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { "column": 0, @@ -75607,33 +101613,15 @@ Object { }, "range": Array [ 0, - 37, + 30, ], - "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", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 2, }, "start": Object { "column": 0, @@ -75642,14 +101630,14 @@ Object { }, "range": Array [ 0, - 38, + 31, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -75659,64 +101647,64 @@ Object { }, "range": Array [ 0, - 3, + 1, ], - "type": "Keyword", - "value": "for", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { - "column": 4, + "column": 1, "line": 1, }, }, "range": Array [ - 4, - 5, + 1, + 9, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { - "column": 5, + "column": 9, "line": 1, }, }, "range": Array [ - 5, - 8, + 9, + 10, ], - "type": "Keyword", - "value": "let", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 12, "line": 1, }, "start": Object { - "column": 9, + "column": 11, "line": 1, }, }, "range": Array [ - 9, - 10, + 11, + 12, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -75725,21 +101713,21 @@ Object { "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, + 12, 13, ], - "type": "Identifier", - "value": "of", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 1, }, "start": Object { @@ -75749,10 +101737,10 @@ Object { }, "range": Array [ 14, - 17, + 15, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -75761,13 +101749,67 @@ Object { "line": 1, }, "start": Object { - "column": 17, + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "type": "Identifier", + "value": "fn", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, "line": 1, }, }, "range": Array [ - 17, 18, + 19, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 24, + ], + "type": "Keyword", + "value": "yield", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, ], "type": "Punctuator", "value": ")", @@ -75775,53 +101817,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 23, - 34, + 25, + 26, ], - "type": "Identifier", - "value": "doSomething", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 27, + "line": 1, }, }, "range": Array [ - 34, - 35, + 27, + 28, ], "type": "Punctuator", - "value": "(", + "value": "}", }, 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 [ - 35, - 36, + 28, + 29, ], "type": "Punctuator", "value": ")", @@ -75829,17 +101871,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 29, + "line": 1, }, }, "range": Array [ - 36, - 37, + 29, + 30, ], "type": "Punctuator", "value": ";", @@ -75849,7 +101891,7 @@ Object { } `; -exports[`javascript fixtures/generators/anonymous-generator.src 1`] = ` +exports[`javascript fixtures/generators/yield-without-value-no-semi.src 1`] = ` Object { "body": Array [ Object { @@ -75859,28 +101901,11 @@ 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", - }, + "argument": null, "delegate": false, "loc": Object { "end": Object { - "column": 23, + "column": 21, "line": 1, }, "start": Object { @@ -75890,13 +101915,13 @@ Object { }, "range": Array [ 16, - 23, + 21, ], "type": "YieldExpression", }, "loc": Object { "end": Object { - "column": 23, + "column": 21, "line": 1, }, "start": Object { @@ -75906,14 +101931,14 @@ Object { }, "range": Array [ 16, - 23, + 21, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 25, + "column": 23, "line": 1, }, "start": Object { @@ -75923,7 +101948,7 @@ Object { }, "range": Array [ 14, - 25, + 23, ], "type": "BlockStatement", }, @@ -75932,7 +101957,7 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 25, + "column": 23, "line": 1, }, "start": Object { @@ -75943,13 +101968,13 @@ Object { "params": Array [], "range": Array [ 1, - 25, + 23, ], "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 27, + "column": 25, "line": 1, }, "start": Object { @@ -75959,15 +101984,15 @@ Object { }, "range": Array [ 0, - 27, + 25, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -75976,7 +102001,7 @@ Object { }, "range": Array [ 0, - 27, + 26, ], "sourceType": "script", "tokens": Array [ @@ -76109,71 +102134,361 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/globalReturn/return-identifier.src 1`] = ` +Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "fooz", + "range": Array [ + 7, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "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": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 11, + ], + "type": "Identifier", + "value": "fooz", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/globalReturn/return-no-arg.src 1`] = ` +Object { + "body": Array [ + Object { + "argument": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "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": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "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": 12, "line": 1, }, "start": Object { - "column": 22, + "column": 0, "line": 1, }, }, "range": Array [ - 22, - 23, + 0, + 12, ], - "type": "Identifier", - "value": "v", + "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": 25, + "column": 6, "line": 1, }, "start": Object { - "column": 24, + "column": 0, "line": 1, }, }, "range": Array [ - 24, - 25, + 0, + 6, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 11, "line": 1, }, "start": Object { - "column": 25, + "column": 7, "line": 1, }, }, "range": Array [ - 25, - 26, + 7, + 11, ], - "type": "Punctuator", - "value": ")", + "type": "Boolean", + "value": "true", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 12, "line": 1, }, "start": Object { - "column": 26, + "column": 11, "line": 1, }, }, "range": Array [ - 26, - 27, + 11, + 12, ], "type": "Punctuator", "value": ";", @@ -76183,464 +102498,378 @@ Object { } `; -exports[`javascript fixtures/generators/async-generator-function.src 1`] = ` +exports[`javascript fixtures/importMeta/simple-import-meta.src 1`] = ` Object { "body": Array [ Object { - "async": true, - "body": Object { - "body": Array [], + "expression": Object { + "computed": false, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 15, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 0, + "line": 1, }, }, - "range": Array [ - 23, - 27, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, + "object": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, }, - "start": Object { - "column": 16, - "line": 2, + "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", }, - "name": "foo", "range": Array [ - 17, - 20, + 0, + 15, ], - "type": "Identifier", + "type": "MemberExpression", }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 16, + "line": 1, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, - "params": Array [], "range": Array [ - 1, - 27, + 0, + 16, ], - "type": "FunctionDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 2, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 1, - 28, + 0, + 17, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { "column": 0, - "line": 2, + "line": 1, }, }, "range": Array [ - 1, + 0, 6, ], - "type": "Identifier", - "value": "async", + "type": "Keyword", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 7, + "line": 1, }, "start": Object { "column": 6, - "line": 2, + "line": 1, }, }, "range": Array [ + 6, 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": "*", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 17, - 20, + 7, + 11, ], "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": "(", + "value": "meta", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 21, - 22, + 11, + 12, ], "type": "Punctuator", - "value": ")", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 23, - 24, + 12, + 15, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "url", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 16, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 15, + "line": 1, }, }, "range": Array [ - 26, - 27, + 15, + 16, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/generators/async-generator-method.src 1`] = ` +exports[`javascript fixtures/labels/label-break.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", - }, - ], + "body": Object { + "body": Array [ + Object { + "label": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 15, + "line": 3, }, "start": Object { - "column": 16, - "line": 2, + "column": 10, + "line": 3, }, }, - "range": Array [ - 26, - 63, - ], - "type": "BlockStatement", + "name": "loop1", + "range": Array [ + 33, + 38, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, }, - "expression": false, - "generator": true, - "id": null, + "range": Array [ + 27, + 39, + ], + "type": "BreakStatement", + }, + Object { + "label": null, "loc": Object { "end": Object { - "column": 5, + "column": 10, "line": 4, }, "start": Object { - "column": 13, - "line": 2, + "column": 4, + "line": 4, }, }, - "params": Array [], "range": Array [ - 23, - 63, + 44, + 50, ], - "type": "FunctionExpression", + "type": "BreakStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 2, }, }, - ], + "range": Array [ + 21, + 54, + ], + "type": "BlockStatement", + }, "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 5, }, "start": Object { - "column": 8, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 8, - 65, + 9, + 54, ], - "type": "ClassBody", + "test": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 15, + 19, + ], + "raw": "true", + "type": "Literal", + "value": true, + }, + "type": "WhileStatement", }, - "id": Object { + "label": Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, - "name": "C", + "name": "loop1", "range": Array [ - 6, - 7, + 0, + 5, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 5, }, "start": Object { @@ -76650,10 +102879,9 @@ Object { }, "range": Array [ 0, - 65, + 54, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "LabeledStatement", }, ], "loc": Object { @@ -76668,7 +102896,7 @@ Object { }, "range": Array [ 0, - 66, + 55, ], "sourceType": "script", "tokens": Array [ @@ -76687,80 +102915,80 @@ Object { 0, 5, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "loop1", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 6, "line": 1, }, "start": Object { - "column": 6, + "column": 5, "line": 1, }, }, "range": Array [ + 5, 6, - 7, ], - "type": "Identifier", - "value": "C", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 8, 9, + 14, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "while", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 8, "line": 2, }, "start": Object { - "column": 4, + "column": 7, "line": 2, }, }, "range": Array [ 14, - 19, + 15, ], - "type": "Identifier", - "value": "async", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 12, "line": 2, }, "start": Object { - "column": 10, + "column": 8, "line": 2, }, }, "range": Array [ - 20, - 21, + 15, + 19, ], - "type": "Punctuator", - "value": "*", + "type": "Boolean", + "value": "true", }, Object { "loc": Object { @@ -76774,260 +103002,536 @@ Object { }, }, "range": Array [ - 22, - 23, + 19, + 20, ], - "type": "Identifier", - "value": "f", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 2, }, "start": Object { - "column": 13, + "column": 14, "line": 2, }, }, "range": Array [ - 23, - 24, + 21, + 22, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 9, + "line": 3, }, "start": Object { - "column": 14, - "line": 2, + "column": 4, + "line": 3, }, }, "range": Array [ - 24, - 25, + 27, + 32, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "break", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 15, + "line": 3, }, "start": Object { - "column": 16, - "line": 2, + "column": 10, + "line": 3, }, }, "range": Array [ - 26, - 27, + 33, + 38, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "loop1", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 16, "line": 3, }, "start": Object { - "column": 8, + "column": 15, "line": 3, }, }, "range": Array [ - 36, - 41, + 38, + 39, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 44, + 49, ], "type": "Keyword", - "value": "const", + "value": "break", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 10, + "line": 4, }, "start": Object { - "column": 14, - "line": 3, + "column": 9, + "line": 4, }, }, "range": Array [ - 42, - 43, + 49, + 50, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/labels/label-continue.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Object { + "body": Array [ + Object { + "label": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 3, + }, + }, + "name": "loop1", + "range": Array [ + 36, + 41, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 27, + 42, + ], + "type": "ContinueStatement", + }, + Object { + "label": null, + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 47, + 56, + ], + "type": "ContinueStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 21, + 60, + ], + "type": "BlockStatement", + }, + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 9, + 60, + ], + "test": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 15, + 19, + ], + "raw": "true", + "type": "Literal", + "value": true, + }, + "type": "WhileStatement", + }, + "label": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "name": "loop1", + "range": Array [ + 0, + 5, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 60, + ], + "type": "LabeledStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 61, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, ], "type": "Identifier", - "value": "x", + "value": "loop1", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 3, + "column": 6, + "line": 1, }, "start": Object { - "column": 16, - "line": 3, + "column": 5, + "line": 1, }, }, "range": Array [ - 44, - 45, + 5, + 6, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 7, + "line": 2, }, "start": Object { - "column": 18, - "line": 3, + "column": 2, + "line": 2, }, }, "range": Array [ - 46, - 51, + 9, + 14, ], "type": "Keyword", - "value": "yield", + "value": "while", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 3, + "column": 8, + "line": 2, }, "start": Object { - "column": 23, - "line": 3, + "column": 7, + "line": 2, }, }, "range": Array [ - 51, - 52, + 14, + 15, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 15, + 19, + ], + "type": "Boolean", + "value": "true", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, ], "type": "Punctuator", - "value": "*", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 12, "line": 3, }, "start": Object { - "column": 25, + "column": 4, "line": 3, }, }, "range": Array [ - 53, - 54, + 27, + 35, ], - "type": "Identifier", - "value": "g", + "type": "Keyword", + "value": "continue", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 18, "line": 3, }, "start": Object { - "column": 26, + "column": 13, "line": 3, }, }, "range": Array [ - 54, - 55, + 36, + 41, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "loop1", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 19, "line": 3, }, "start": Object { - "column": 27, + "column": 18, "line": 3, }, }, "range": Array [ - 55, - 56, + 41, + 42, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 3, + "column": 12, + "line": 4, }, "start": Object { - "column": 28, - "line": 3, + "column": 4, + "line": 4, }, }, "range": Array [ - 56, - 57, + 47, + 55, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "continue", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 13, "line": 4, }, "start": Object { - "column": 4, + "column": 12, "line": 4, }, }, "range": Array [ - 62, - 63, + 55, + 56, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 5, }, "start": Object { - "column": 0, + "column": 2, "line": 5, }, }, "range": Array [ - 64, - 65, + 59, + 60, ], "type": "Punctuator", "value": "}", @@ -77037,144 +103541,141 @@ Object { } `; -exports[`javascript fixtures/generators/double-yield.src 1`] = ` +exports[`javascript fixtures/modules/error-delete.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "async": false, - "body": Object { - "body": Array [ - 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, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 30, - ], - "type": "YieldExpression", - }, - "delegate": false, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 30, - ], - "type": "YieldExpression", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "source": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 17, + ], + "raw": "\\"x\\"", + "type": "Literal", + "value": "x", + }, + "specifiers": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, + "start": Object { + "column": 7, + "line": 1, }, - "range": Array [ - 16, - 30, - ], - "type": "ExpressionStatement", }, + "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": 32, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 7, + "line": 2, }, }, + "name": "x", "range": Array [ - 14, - 32, + 26, + 27, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": true, - "id": null, "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 1, - "line": 1, + "column": 0, + "line": 2, }, }, - "params": Array [], + "operator": "delete", + "prefix": true, "range": Array [ - 1, - 32, + 19, + 27, ], - "type": "FunctionExpression", + "type": "UnaryExpression", }, "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, "range": Array [ - 0, - 34, + 19, + 28, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 0, + "line": 3, }, "start": Object { "column": 0, @@ -77183,14 +103684,14 @@ Object { }, "range": Array [ 0, - 34, + 29, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 6, "line": 1, }, "start": Object { @@ -77200,64 +103701,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", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 10, - ], - "type": "Punctuator", - "value": "*", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 8, "line": 1, }, "start": Object { - "column": 11, + "column": 7, "line": 1, }, }, "range": Array [ - 11, - 12, + 7, + 8, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -77266,21 +103731,21 @@ Object { "line": 1, }, "start": Object { - "column": 12, + "column": 9, "line": 1, }, }, "range": Array [ - 12, + 9, 13, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 17, "line": 1, }, "start": Object { @@ -77290,115 +103755,79 @@ Object { }, "range": Array [ 14, - 15, + 17, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "\\"x\\"", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 18, "line": 1, }, "start": Object { - "column": 16, + "column": 17, "line": 1, }, }, "range": Array [ - 16, - 21, + 17, + 18, ], - "type": "Keyword", - "value": "yield", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 6, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 22, - 27, + 19, + 25, ], "type": "Keyword", - "value": "yield", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 30, - ], - "type": "Numeric", - "value": "10", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 32, - ], - "type": "Punctuator", - "value": "}", + "value": "delete", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 32, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 32, - 33, + 26, + 27, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 33, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 33, - 34, + 27, + 28, ], "type": "Punctuator", "value": ";", @@ -77408,53 +103837,89 @@ Object { } `; -exports[`javascript fixtures/generators/empty-generator-declaration.src 1`] = ` +exports[`javascript fixtures/modules/error-function.src 1`] = ` Object { "body": Array [ Object { "async": false, "body": Object { - "body": Array [], + "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", + }, + "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": 16, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 14, + "column": 13, "line": 1, }, }, "range": Array [ - 14, - 16, + 13, + 41, ], "type": "BlockStatement", }, "expression": false, - "generator": true, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, - "name": "t", + "name": "x", "range": Array [ + 9, 10, - 11, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -77464,32 +103929,15 @@ Object { "params": Array [], "range": Array [ 0, - 16, + 41, ], "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": 17, - "line": 1, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -77498,7 +103946,7 @@ Object { }, "range": Array [ 0, - 17, + 43, ], "sourceType": "script", "tokens": Array [ @@ -77523,20 +103971,20 @@ Object { 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": "Punctuator", - "value": "*", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -77553,8 +104001,8 @@ Object { 10, 11, ], - "type": "Identifier", - "value": "t", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -77572,185 +104020,380 @@ 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": 7, + "line": 2, + }, + "start": Object { + "column": 1, + "line": 2, + }, + }, + "range": Array [ + 16, + 22, + ], + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 1, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 14, - 15, + 23, + 30, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { "column": 16, - "line": 1, + "line": 2, + }, + }, + "range": Array [ + 31, + 38, + ], + "type": "Identifier", + "value": "friends", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ - 15, - 16, + 38, + 39, ], "type": "Punctuator", - "value": "}", + "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, + 40, + 41, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/generators/generator-declaration.src 1`] = ` +exports[`javascript fixtures/modules/error-strict.src 1`] = ` Object { "body": Array [ Object { - "async": false, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "source": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 25, + ], + "raw": "\\"house\\"", + "type": "Literal", + "value": "house", + }, + "specifiers": Array [ + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "local": Object { + "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 { - "argument": 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": 28, - "line": 1, + "column": 12, + "line": 4, }, "start": Object { - "column": 27, - "line": 1, + "column": 1, + "line": 4, }, }, - "name": "v", + "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 [ - 27, - 28, + 44, + 55, ], - "type": "Identifier", + "type": "MemberExpression", }, - "delegate": true, "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 18, + "line": 4, }, "start": Object { - "column": 20, - "line": 1, + "column": 1, + "line": 4, }, }, "range": Array [ - 20, - 28, + 44, + 61, ], - "type": "YieldExpression", + "type": "CallExpression", }, "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 19, + "line": 4, }, "start": Object { - "column": 20, - "line": 1, + "column": 1, + "line": 4, }, }, "range": Array [ - 20, - 28, + 44, + 62, ], "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 18, - "line": 1, + "column": 13, + "line": 3, }, }, "range": Array [ - 18, - 30, + 41, + 64, ], "type": "BlockStatement", }, - "expression": false, - "generator": true, - "id": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "object": Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 10, - "line": 1, + "column": 6, + "line": 3, }, }, - "name": "test", + "name": "house", "range": Array [ - 10, - 14, + 34, + 39, ], "type": "Identifier", }, + "range": Array [ + 28, + 64, + ], + "type": "WithStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 65, + ], + "sourceType": "module", + "tokens": Array [ + Object { "loc": Object { "end": Object { - "column": 30, + "column": 6, "line": 1, }, "start": Object { @@ -77758,351 +104401,349 @@ Object { "line": 1, }, }, - "params": Array [], "range": Array [ 0, - 30, + 6, ], - "type": "FunctionDeclaration", + "type": "Keyword", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 12, "line": 1, }, "start": Object { - "column": 30, + "column": 7, "line": 1, }, }, "range": Array [ - 30, - 31, + 7, + 12, ], - "type": "EmptyStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "house", }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 17, "line": 1, }, "start": Object { - "column": 0, + "column": 13, "line": 1, }, }, "range": Array [ - 0, - 8, + 13, + 17, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 25, "line": 1, }, "start": Object { - "column": 8, + "column": 18, "line": 1, }, }, "range": Array [ - 8, - 9, + 18, + 25, ], - "type": "Punctuator", - "value": "*", + "type": "String", + "value": "\\"house\\"", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 26, "line": 1, }, "start": Object { - "column": 10, + "column": 25, "line": 1, }, }, "range": Array [ - 10, - 14, + 25, + 26, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 28, + 32, + ], + "type": "Keyword", + "value": "with", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 34, + 39, ], "type": "Identifier", - "value": "test", + "value": "house", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 12, + "line": 3, }, "start": Object { - "column": 15, - "line": 1, + "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 [ - 15, - 16, + 44, + 51, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "console", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 9, + "line": 4, }, "start": Object { - "column": 16, - "line": 1, + "column": 8, + "line": 4, }, }, "range": Array [ - 16, - 17, + 51, + 52, ], "type": "Punctuator", - "value": ")", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 12, + "line": 4, }, "start": Object { - "column": 18, - "line": 1, + "column": 9, + "line": 4, }, }, "range": Array [ - 18, - 19, + 52, + 55, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "log", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 13, + "line": 4, }, "start": Object { - "column": 20, - "line": 1, + "column": 12, + "line": 4, }, }, "range": Array [ - 20, - 25, + 55, + 56, ], - "type": "Keyword", - "value": "yield", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 17, + "line": 4, }, "start": Object { - "column": 26, - "line": 1, + "column": 13, + "line": 4, }, }, "range": Array [ - 26, - 27, + 56, + 60, ], - "type": "Punctuator", - "value": "*", + "type": "Identifier", + "value": "roof", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 18, + "line": 4, }, "start": Object { - "column": 27, - "line": 1, + "column": 17, + "line": 4, }, }, "range": Array [ - 27, - 28, + 60, + 61, ], - "type": "Identifier", - "value": "v", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 19, + "line": 4, }, "start": Object { - "column": 29, - "line": 1, + "column": 18, + "line": 4, }, }, "range": Array [ - 29, - 30, + 61, + 62, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 30, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 30, - 31, + 63, + 64, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/generators/yield-delegation.src 1`] = ` +exports[`javascript fixtures/modules/export-default-array.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "async": false, - "body": 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, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 24, - ], - "type": "YieldExpression", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 24, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 26, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": true, - "id": null, + "declaration": Object { + "elements": Array [], "loc": Object { "end": Object { - "column": 26, + "column": 17, "line": 1, }, "start": Object { - "column": 1, + "column": 15, "line": 1, }, }, - "params": Array [], "range": Array [ - 1, - 26, + 15, + 17, ], - "type": "FunctionExpression", + "type": "ArrayExpression", }, "loc": Object { "end": Object { - "column": 28, + "column": 18, "line": 1, }, "start": Object { @@ -78112,15 +104753,15 @@ Object { }, "range": Array [ 0, - 28, + 18, ], - "type": "ExpressionStatement", + "type": "ExportDefaultDeclaration", }, ], "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -78129,14 +104770,14 @@ Object { }, "range": Array [ 0, - 28, + 19, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 6, "line": 1, }, "start": Object { @@ -78146,298 +104787,320 @@ Object { }, "range": Array [ 0, - 1, + 6, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 14, "line": 1, }, "start": Object { - "column": 1, + "column": 7, "line": 1, }, }, "range": Array [ - 1, - 9, + 7, + 14, ], "type": "Keyword", - "value": "function", + "value": "default", }, 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": 17, "line": 1, }, "start": Object { - "column": 11, + "column": 16, "line": 1, }, }, "range": Array [ - 11, - 12, + 16, + 17, ], "type": "Punctuator", - "value": "(", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 18, "line": 1, }, "start": Object { - "column": 12, + "column": 17, "line": 1, }, }, "range": Array [ - 12, - 13, + 17, + 18, ], "type": "Punctuator", - "value": ")", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-default-class.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, + "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", }, - "start": Object { - "column": 14, - "line": 1, + "id": null, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 1, + }, }, + "range": Array [ + 15, + 25, + ], + "superClass": null, + "type": "ClassDeclaration", }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "{", - }, - Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 16, + "column": 0, "line": 1, }, }, "range": Array [ - 16, - 21, + 0, + 25, ], - "type": "Keyword", - "value": "yield", + "type": "ExportDefaultDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 23, + "column": 6, "line": 1, }, "start": Object { - "column": 22, + "column": 0, "line": 1, }, }, "range": Array [ - 22, - 23, + 0, + 6, ], - "type": "Punctuator", - "value": "*", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 14, "line": 1, }, "start": Object { - "column": 23, + "column": 7, "line": 1, }, }, "range": Array [ - 23, - 24, + 7, + 14, ], - "type": "Identifier", - "value": "v", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 20, "line": 1, }, "start": Object { - "column": 25, + "column": 15, "line": 1, }, }, "range": Array [ - 25, - 26, + 15, + 20, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 22, "line": 1, }, "start": Object { - "column": 26, + "column": 21, "line": 1, }, }, "range": Array [ - 26, - 27, + 21, + 22, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 27, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 27, - 28, + 24, + 25, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/generators/yield-without-value.src 1`] = ` +exports[`javascript fixtures/modules/export-default-expression.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", - }, - ], + "declaration": Object { + "left": Object { "loc": Object { "end": Object { - "column": 24, + "column": 17, "line": 1, }, "start": Object { - "column": 14, + "column": 16, "line": 1, }, }, "range": Array [ - 14, - 24, + 16, + 17, ], - "type": "BlockStatement", + "raw": "1", + "type": "Literal", + "value": 1, }, - "expression": false, - "generator": true, - "id": null, "loc": Object { "end": Object { - "column": 24, + "column": 21, "line": 1, }, "start": Object { - "column": 1, + "column": 16, "line": 1, }, }, - "params": Array [], + "operator": "+", "range": Array [ - 1, - 24, + 16, + 21, ], - "type": "FunctionExpression", + "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": 26, + "column": 23, "line": 1, }, "start": Object { @@ -78447,9 +105110,9 @@ Object { }, "range": Array [ 0, - 26, + 23, ], - "type": "ExpressionStatement", + "type": "ExportDefaultDeclaration", }, ], "loc": Object { @@ -78464,14 +105127,14 @@ Object { }, "range": Array [ 0, - 27, + 24, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 6, "line": 1, }, "start": Object { @@ -78481,61 +105144,43 @@ 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": "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": "Punctuator", - "value": "*", + "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": "(", @@ -78543,38 +105188,38 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 17, "line": 1, }, "start": Object { - "column": 12, + "column": 16, "line": 1, }, }, "range": Array [ - 12, - 13, + 16, + 17, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 19, "line": 1, }, "start": Object { - "column": 14, + "column": 18, "line": 1, }, }, "range": Array [ - 14, - 15, + 18, + 19, ], "type": "Punctuator", - "value": "{", + "value": "+", }, Object { "loc": Object { @@ -78583,16 +105228,16 @@ Object { "line": 1, }, "start": Object { - "column": 16, + "column": 20, "line": 1, }, }, "range": Array [ - 16, + 20, 21, ], - "type": "Keyword", - "value": "yield", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { @@ -78610,58 +105255,22 @@ Object { 22, ], "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", "value": ")", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 23, "line": 1, }, "start": Object { - "column": 25, + "column": 22, "line": 1, }, }, "range": Array [ - 25, - 26, + 22, + 23, ], "type": "Punctuator", "value": ";", @@ -78671,127 +105280,53 @@ Object { } `; -exports[`javascript fixtures/generators/yield-without-value-in-call.src 1`] = ` +exports[`javascript fixtures/modules/export-default-function.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { + "declaration": 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", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 26, - ], - "type": "ExpressionStatement", - }, - ], + "body": Array [], "loc": Object { "end": Object { - "column": 28, + "column": 29, "line": 1, }, "start": Object { - "column": 14, + "column": 27, "line": 1, }, }, "range": Array [ - 14, - 28, + 27, + 29, ], "type": "BlockStatement", }, "expression": false, - "generator": true, + "generator": false, "id": null, "loc": Object { "end": Object { - "column": 28, + "column": 29, "line": 1, }, "start": Object { - "column": 1, + "column": 15, "line": 1, }, }, "params": Array [], "range": Array [ - 1, - 28, + 15, + 29, ], - "type": "FunctionExpression", + "type": "FunctionDeclaration", }, "loc": Object { "end": Object { - "column": 30, + "column": 29, "line": 1, }, "start": Object { @@ -78801,9 +105336,9 @@ Object { }, "range": Array [ 0, - 30, + 29, ], - "type": "ExpressionStatement", + "type": "ExportDefaultDeclaration", }, ], "loc": Object { @@ -78818,14 +105353,14 @@ Object { }, "range": Array [ 0, - 31, + 30, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 6, "line": 1, }, "start": Object { @@ -78835,61 +105370,61 @@ Object { }, "range": Array [ 0, - 1, + 6, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 14, "line": 1, }, "start": Object { - "column": 1, + "column": 7, "line": 1, }, }, "range": Array [ - 1, - 9, + 7, + 14, ], "type": "Keyword", - "value": "function", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 23, "line": 1, }, "start": Object { - "column": 9, + "column": 15, "line": 1, }, }, "range": Array [ - 9, - 10, + 15, + 23, ], - "type": "Punctuator", - "value": "*", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 25, "line": 1, }, "start": Object { - "column": 11, + "column": 24, "line": 1, }, }, "range": Array [ - 11, - 12, + 24, + 25, ], "type": "Punctuator", "value": "(", @@ -78897,17 +105432,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 26, "line": 1, }, "start": Object { - "column": 12, + "column": 25, "line": 1, }, }, "range": Array [ - 12, - 13, + 25, + 26, ], "type": "Punctuator", "value": ")", @@ -78915,17 +105450,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 28, "line": 1, }, "start": Object { - "column": 14, + "column": 27, "line": 1, }, }, "range": Array [ - 14, - 15, + 27, + 28, ], "type": "Punctuator", "value": "{", @@ -78933,236 +105468,294 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 29, "line": 1, }, "start": Object { - "column": 16, + "column": 28, "line": 1, }, }, "range": Array [ - 16, - 18, + 28, + 29, ], - "type": "Identifier", - "value": "fn", + "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", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 30, + ], + "superClass": null, + "type": "ClassDeclaration", + }, "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 18, + "column": 0, "line": 1, }, }, "range": Array [ - 18, - 19, + 0, + 30, ], - "type": "Punctuator", - "value": "(", + "type": "ExportDefaultDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 31, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 24, + "column": 6, "line": 1, }, "start": Object { - "column": 19, + "column": 0, "line": 1, }, }, "range": Array [ - 19, - 24, + 0, + 6, ], "type": "Keyword", - "value": "yield", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 14, "line": 1, }, "start": Object { - "column": 24, + "column": 7, "line": 1, }, }, "range": Array [ - 24, - 25, + 7, + 14, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 20, "line": 1, }, "start": Object { - "column": 25, + "column": 15, "line": 1, }, }, "range": Array [ - 25, - 26, + 15, + 20, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 25, "line": 1, }, "start": Object { - "column": 27, + "column": 21, "line": 1, }, }, "range": Array [ - 27, - 28, + 21, + 25, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "Test", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 27, "line": 1, }, "start": Object { - "column": 28, + "column": 26, "line": 1, }, }, "range": Array [ - 28, - 29, + 26, + 27, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/generators/yield-without-value-no-semi.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": 21, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 21, - ], - "type": "ExpressionStatement", - }, - ], + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 29, + 30, + ], + "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": 23, + "column": 32, "line": 1, }, "start": Object { - "column": 14, + "column": 30, "line": 1, }, }, "range": Array [ - 14, - 23, + 30, + 32, ], "type": "BlockStatement", }, "expression": false, - "generator": true, - "id": null, + "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": 23, + "column": 32, "line": 1, }, "start": Object { - "column": 1, + "column": 15, "line": 1, }, }, "params": Array [], "range": Array [ - 1, - 23, + 15, + 32, ], - "type": "FunctionExpression", + "type": "FunctionDeclaration", }, "loc": Object { "end": Object { - "column": 25, + "column": 32, "line": 1, }, "start": Object { @@ -79172,9 +105765,9 @@ Object { }, "range": Array [ 0, - 25, + 32, ], - "type": "ExpressionStatement", + "type": "ExportDefaultDeclaration", }, ], "loc": Object { @@ -79189,14 +105782,14 @@ Object { }, "range": Array [ 0, - 26, + 33, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 6, "line": 1, }, "start": Object { @@ -79206,25 +105799,43 @@ Object { }, "range": Array [ 0, - 1, + 6, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 14, "line": 1, }, "start": Object { - "column": 1, + "column": 7, "line": 1, }, }, "range": Array [ - 1, - 9, + 7, + 14, + ], + "type": "Keyword", + "value": "default", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 23, ], "type": "Keyword", "value": "function", @@ -79232,35 +105843,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 27, "line": 1, }, "start": Object { - "column": 9, + "column": 24, "line": 1, }, }, "range": Array [ - 9, - 10, + 24, + 27, ], - "type": "Punctuator", - "value": "*", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 28, "line": 1, }, "start": Object { - "column": 11, + "column": 27, "line": 1, }, }, "range": Array [ - 11, - 12, + 27, + 28, ], "type": "Punctuator", "value": "(", @@ -79268,17 +105879,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 29, "line": 1, }, "start": Object { - "column": 12, + "column": 28, "line": 1, }, }, "range": Array [ - 12, - 13, + 28, + 29, ], "type": "Punctuator", "value": ")", @@ -79286,17 +105897,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 31, "line": 1, }, "start": Object { - "column": 14, + "column": 30, "line": 1, }, }, "range": Array [ - 14, - 15, + 30, + 31, ], "type": "Punctuator", "value": "{", @@ -79304,71 +105915,150 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 32, "line": 1, }, "start": Object { - "column": 16, + "column": 31, "line": 1, }, }, "range": Array [ - 16, - 21, + 31, + 32, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-default-number.src 1`] = ` +Object { + "body": Array [ + Object { + "declaration": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 17, + ], + "raw": "42", + "type": "Literal", + "value": 42, + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "type": "ExportDefaultDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 19, + ], + "sourceType": "module", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 6, ], "type": "Keyword", - "value": "yield", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 14, "line": 1, }, "start": Object { - "column": 22, + "column": 7, "line": 1, }, }, "range": Array [ - 22, - 23, + 7, + 14, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 17, "line": 1, }, "start": Object { - "column": 23, + "column": 15, "line": 1, }, }, "range": Array [ - 23, - 24, + 15, + 17, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "42", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 18, "line": 1, }, "start": Object { - "column": 24, + "column": 17, "line": 1, }, }, "range": Array [ - 24, - 25, + 17, + 18, ], "type": "Punctuator", "value": ";", @@ -79378,31 +106068,90 @@ Object { } `; -exports[`javascript fixtures/globalReturn/return-identifier.src 1`] = ` +exports[`javascript fixtures/modules/export-default-object.src 1`] = ` Object { "body": Array [ Object { - "argument": Object { + "declaration": Object { "loc": Object { "end": Object { - "column": 11, + "column": 25, "line": 1, }, "start": Object { - "column": 7, + "column": 15, "line": 1, }, }, - "name": "fooz", + "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", + "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 [ - 7, - 11, + 15, + 25, ], - "type": "Identifier", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 12, + "column": 26, "line": 1, }, "start": Object { @@ -79412,9 +106161,9 @@ Object { }, "range": Array [ 0, - 12, + 26, ], - "type": "ReturnStatement", + "type": "ExportDefaultDeclaration", }, ], "loc": Object { @@ -79429,9 +106178,9 @@ Object { }, "range": Array [ 0, - 13, + 27, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { @@ -79449,12 +106198,12 @@ Object { 6, ], "type": "Keyword", - "value": "return", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 14, "line": 1, }, "start": Object { @@ -79464,104 +106213,115 @@ Object { }, "range": Array [ 7, - 11, + 14, ], - "type": "Identifier", - "value": "fooz", + "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": "{", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/globalReturn/return-no-arg.src 1`] = ` -Object { - "body": Array [ Object { - "argument": null, "loc": Object { "end": Object { - "column": 7, + "column": 20, "line": 1, }, "start": Object { - "column": 0, + "column": 17, "line": 1, }, }, "range": Array [ - 0, - 7, + 17, + 20, ], - "type": "ReturnStatement", + "type": "Identifier", + "value": "foo", }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ":", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Numeric", + "value": "1", }, - }, - "range": Array [ - 0, - 8, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 25, "line": 1, }, "start": Object { - "column": 0, + "column": 24, "line": 1, }, }, "range": Array [ - 0, - 6, + 24, + 25, ], - "type": "Keyword", - "value": "return", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 26, "line": 1, }, "start": Object { - "column": 6, + "column": 25, "line": 1, }, }, "range": Array [ - 6, - 7, + 25, + 26, ], "type": "Punctuator", "value": ";", @@ -79571,32 +106331,31 @@ Object { } `; -exports[`javascript fixtures/globalReturn/return-true.src 1`] = ` +exports[`javascript fixtures/modules/export-default-value.src 1`] = ` Object { "body": Array [ Object { - "argument": Object { + "declaration": Object { "loc": Object { "end": Object { - "column": 11, + "column": 18, "line": 1, }, "start": Object { - "column": 7, + "column": 15, "line": 1, }, }, + "name": "foo", "range": Array [ - 7, - 11, + 15, + 18, ], - "raw": "true", - "type": "Literal", - "value": true, + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 12, + "column": 19, "line": 1, }, "start": Object { @@ -79606,9 +106365,9 @@ Object { }, "range": Array [ 0, - 12, + 19, ], - "type": "ReturnStatement", + "type": "ExportDefaultDeclaration", }, ], "loc": Object { @@ -79623,9 +106382,9 @@ Object { }, "range": Array [ 0, - 13, + 20, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { @@ -79643,12 +106402,12 @@ Object { 6, ], "type": "Keyword", - "value": "return", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 14, "line": 1, }, "start": Object { @@ -79658,25 +106417,43 @@ Object { }, "range": Array [ 7, - 11, + 14, ], - "type": "Boolean", - "value": "true", + "type": "Keyword", + "value": "default", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 19, "line": 1, }, "start": Object { - "column": 11, + "column": 18, "line": 1, }, }, "range": Array [ - 11, - 12, + 18, + 19, ], "type": "Punctuator", "value": ";", @@ -79686,102 +106463,13 @@ Object { } `; -exports[`javascript fixtures/importMeta/simple-import-meta.src 1`] = ` +exports[`javascript fixtures/modules/export-from-batch.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "meta": Object { - "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, - ], - "type": "MemberExpression", - }, "loc": Object { "end": Object { - "column": 16, + "column": 20, "line": 1, }, "start": Object { @@ -79791,9 +106479,28 @@ Object { }, "range": Array [ 0, - 16, + 20, ], - "type": "ExpressionStatement", + "source": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 19, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, + "type": "ExportAllDeclaration", }, ], "loc": Object { @@ -79808,7 +106515,7 @@ Object { }, "range": Array [ 0, - 17, + 21, ], "sourceType": "module", "tokens": Array [ @@ -79828,94 +106535,76 @@ Object { 6, ], "type": "Keyword", - "value": "import", + "value": "export", }, 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": 11, + "column": 13, "line": 1, }, "start": Object { - "column": 7, + "column": 9, "line": 1, }, }, "range": Array [ - 7, - 11, + 9, + 13, ], "type": "Identifier", - "value": "meta", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 12, - ], - "type": "Punctuator", - "value": ".", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 19, "line": 1, }, "start": Object { - "column": 12, + "column": 14, "line": 1, }, }, "range": Array [ - 12, - 15, + 14, + 19, ], - "type": "Identifier", - "value": "url", + "type": "String", + "value": "\\"foo\\"", }, 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": "Punctuator", "value": ";", @@ -79925,13 +106614,14 @@ Object { } `; -exports[`javascript fixtures/modules/error-delete.src 1`] = ` +exports[`javascript fixtures/modules/export-from-default.src 1`] = ` Object { "body": Array [ Object { + "declaration": null, "loc": Object { "end": Object { - "column": 18, + "column": 28, "line": 1, }, "start": Object { @@ -79941,125 +106631,89 @@ Object { }, "range": Array [ 0, - 18, + 28, ], "source": Object { "loc": Object { "end": Object { - "column": 17, + "column": 27, "line": 1, }, "start": Object { - "column": 14, + "column": 22, "line": 1, }, }, "range": Array [ - 14, - 17, + 22, + 27, ], - "raw": "\\"x\\"", + "raw": "\\"foo\\"", "type": "Literal", - "value": "x", + "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": 8, + "column": 15, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 8, + "column": 15, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, - "name": "x", + "name": "default", "range": Array [ - 7, 8, + 15, ], "type": "Identifier", }, "range": Array [ - 7, 8, + 15, ], - "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": 9, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, + "type": "ExportSpecifier", }, - }, - "range": Array [ - 19, - 28, ], - "type": "ExpressionStatement", + "type": "ExportNamedDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 2, }, "start": Object { "column": 0, @@ -80088,7 +106742,7 @@ Object { 6, ], "type": "Keyword", - "value": "import", + "value": "export", }, Object { "loc": Object { @@ -80105,49 +106759,49 @@ Object { 7, 8, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 1, }, "start": Object { - "column": 9, + "column": 8, "line": 1, }, }, "range": Array [ - 9, - 13, + 8, + 15, ], - "type": "Identifier", - "value": "from", + "type": "Keyword", + "value": "default", }, 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": "String", - "value": "\\"x\\"", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 21, "line": 1, }, "start": Object { @@ -80157,56 +106811,38 @@ Object { }, "range": Array [ 17, - 18, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 19, - 25, + 21, ], - "type": "Keyword", - "value": "delete", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 26, + 22, 27, ], - "type": "Identifier", - "value": "x", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 27, + "line": 1, }, }, "range": Array [ @@ -80221,107 +106857,106 @@ Object { } `; -exports[`javascript fixtures/modules/error-function.src 1`] = ` +exports[`javascript fixtures/modules/export-from-named-as-default.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", - }, - "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, - }, + "declaration": null, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, - "range": Array [ - 13, - 41, - ], - "type": "BlockStatement", }, - "expression": false, - "generator": false, - "id": Object { + "range": Array [ + 0, + 35, + ], + "source": Object { "loc": Object { "end": Object { - "column": 10, + "column": 34, "line": 1, }, "start": Object { - "column": 9, + "column": 29, "line": 1, }, }, - "name": "x", "range": Array [ - 9, - 10, + 29, + 34, ], - "type": "Identifier", + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "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", }, - }, - "params": Array [], - "range": Array [ - 0, - 41, ], - "type": "FunctionDeclaration", + "type": "ExportNamedDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 2, }, "start": Object { "column": 0, @@ -80330,14 +106965,14 @@ Object { }, "range": Array [ 0, - 43, + 36, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 6, "line": 1, }, "start": Object { @@ -80347,28 +106982,28 @@ Object { }, "range": Array [ 0, - 8, + 6, ], "type": "Keyword", - "value": "function", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, "range": Array [ - 9, - 10, + 7, + 8, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -80377,155 +107012,138 @@ Object { "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, + 8, 11, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "foo", }, 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": 14, + "column": 22, "line": 1, }, "start": Object { - "column": 13, + "column": 15, "line": 1, }, }, "range": Array [ - 13, - 14, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "range": Array [ - 16, + 15, 22, ], "type": "Keyword", - "value": "export", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ + 22, 23, - 30, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ - 31, - 38, + 24, + 28, ], "type": "Identifier", - "value": "friends", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 34, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 29, + "line": 1, }, }, "range": Array [ - 38, - 39, + 29, + 34, ], - "type": "Punctuator", - "value": ";", + "type": "String", + "value": "\\"foo\\"", }, 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 [ - 40, - 41, + 34, + 35, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/error-strict.src 1`] = ` +exports[`javascript fixtures/modules/export-from-named-as-specifier.src 1`] = ` Object { "body": Array [ Object { + "declaration": null, "loc": Object { "end": Object { - "column": 26, + "column": 31, "line": 1, }, "start": Object { @@ -80535,233 +107153,89 @@ Object { }, "range": Array [ 0, - 26, + 31, ], "source": Object { "loc": Object { "end": Object { - "column": 25, + "column": 30, "line": 1, }, "start": Object { - "column": 18, + "column": 25, "line": 1, }, }, "range": Array [ - 18, 25, + 30, ], - "raw": "\\"house\\"", + "raw": "\\"foo\\"", "type": "Literal", - "value": "house", + "value": "foo", }, "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": 12, + "column": 18, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 12, + "column": 11, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, - "name": "house", + "name": "foo", "range": Array [ - 7, - 12, + 8, + 11, ], "type": "Identifier", }, "range": Array [ - 7, - 12, + 8, + 18, ], - "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": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, + "type": "ExportSpecifier", }, - "name": "house", - "range": Array [ - 34, - 39, - ], - "type": "Identifier", - }, - "range": Array [ - 28, - 64, ], - "type": "WithStatement", + "type": "ExportNamedDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 2, }, "start": Object { "column": 0, @@ -80770,7 +107244,7 @@ Object { }, "range": Array [ 0, - 65, + 32, ], "sourceType": "module", "tokens": Array [ @@ -80790,166 +107264,22 @@ Object { 6, ], "type": "Keyword", - "value": "import", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 8, "line": 1, }, "start": Object { "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "Identifier", - "value": "house", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 17, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 25, - ], - "type": "String", - "value": "\\"house\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 28, - 32, - ], - "type": "Keyword", - "value": "with", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 33, - 34, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 34, - 39, - ], - "type": "Identifier", - "value": "house", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, + "line": 1, }, }, "range": Array [ - 41, - 42, + 7, + 8, ], "type": "Punctuator", "value": "{", @@ -80957,189 +107287,281 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, - "line": 4, + "column": 11, + "line": 1, }, "start": Object { - "column": 1, - "line": 4, + "column": 8, + "line": 1, }, }, "range": Array [ - 44, - 51, + 8, + 11, ], "type": "Identifier", - "value": "console", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 4, + "column": 14, + "line": 1, }, "start": Object { - "column": 8, - "line": 4, + "column": 12, + "line": 1, }, }, "range": Array [ - 51, - 52, + 12, + 14, ], - "type": "Punctuator", - "value": ".", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 4, + "column": 18, + "line": 1, }, "start": Object { - "column": 9, - "line": 4, + "column": 15, + "line": 1, }, }, "range": Array [ - 52, - 55, + 15, + 18, ], "type": "Identifier", - "value": "log", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 19, + "line": 1, }, "start": Object { - "column": 12, - "line": 4, + "column": 18, + "line": 1, }, }, "range": Array [ - 55, - 56, + 18, + 19, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 4, + "column": 24, + "line": 1, }, "start": Object { - "column": 13, - "line": 4, + "column": 20, + "line": 1, }, }, "range": Array [ - 56, - 60, + 20, + 24, ], "type": "Identifier", - "value": "roof", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 4, + "column": 30, + "line": 1, }, "start": Object { - "column": 17, - "line": 4, + "column": 25, + "line": 1, }, }, "range": Array [ - 60, - 61, + 25, + 30, ], - "type": "Punctuator", - "value": ")", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 4, + "column": 31, + "line": 1, }, "start": Object { - "column": 18, - "line": 4, + "column": 30, + "line": 1, }, }, "range": Array [ - 61, - 62, + 30, + 31, ], "type": "Punctuator", "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/export-from-named-as-specifiers.src 1`] = ` +Object { + "body": Array [ Object { + "declaration": null, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 40, + "line": 1, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 63, - 64, + 0, + 40, ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/modules/export-default-array.src 1`] = ` -Object { - "body": Array [ - Object { - "declaration": Object { - "elements": Array [], + "source": Object { "loc": Object { "end": Object { - "column": 17, + "column": 39, "line": 1, }, "start": Object { - "column": 15, + "column": 34, "line": 1, }, }, "range": Array [ - 15, - 17, + 34, + 39, ], - "type": "ArrayExpression", + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", }, - "loc": Object { - "end": Object { - "column": 18, - "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, - 18, ], - "type": "ExportDefaultDeclaration", + "type": "ExportNamedDeclaration", }, ], "loc": Object { @@ -81154,7 +107576,7 @@ Object { }, "range": Array [ 0, - 19, + 41, ], "sourceType": "module", "tokens": Array [ @@ -81179,7 +107601,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -81189,314 +107611,272 @@ Object { }, "range": Array [ 7, - 14, + 8, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, "range": Array [ - 15, - 16, + 8, + 11, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 14, "line": 1, }, "start": Object { - "column": 16, + "column": 12, "line": 1, }, }, "range": Array [ - 16, - 17, + 12, + 14, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 22, "line": 1, }, "start": Object { - "column": 17, + "column": 15, "line": 1, }, }, "range": Array [ - 17, - 18, + 15, + 22, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "default", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/modules/export-default-class.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, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 25, - ], - "superClass": null, - "type": "ClassDeclaration", - }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 23, + "line": 1, }, "start": Object { - "column": 0, + "column": 22, "line": 1, }, }, "range": Array [ - 0, - 25, + 22, + 23, ], - "type": "ExportDefaultDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ",", }, - }, - "range": Array [ - 0, - 26, - ], - "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": 14, + "column": 28, "line": 1, }, "start": Object { - "column": 7, + "column": 27, "line": 1, }, }, "range": Array [ - 7, - 14, + 27, + 28, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 33, "line": 1, }, "start": Object { - "column": 15, + "column": 29, "line": 1, }, }, "range": Array [ - 15, - 20, + 29, + 33, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 39, "line": 1, }, "start": Object { - "column": 21, + "column": 34, "line": 1, }, }, "range": Array [ - 21, - 22, + 34, + 39, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "\\"foo\\"", }, 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 [ - 24, - 25, + 39, + 40, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/export-default-expression.src 1`] = ` +exports[`javascript fixtures/modules/export-from-specifier.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, + "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": 21, + "column": 23, "line": 1, }, "start": Object { - "column": 16, + "column": 18, "line": 1, }, - }, - "operator": "+", - "range": Array [ - 16, - 21, - ], - "right": Object { + }, + "range": Array [ + 18, + 23, + ], + "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": 21, + "column": 11, "line": 1, }, "start": Object { - "column": 20, + "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 [ - 20, - 21, + 8, + 11, ], - "raw": "2", - "type": "Literal", - "value": 2, - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "ExportSpecifier", }, - }, - "range": Array [ - 0, - 23, ], - "type": "ExportDefaultDeclaration", + "type": "ExportNamedDeclaration", }, ], "loc": Object { @@ -81511,7 +107891,7 @@ Object { }, "range": Array [ 0, - 24, + 25, ], "sourceType": "module", "tokens": Array [ @@ -81536,7 +107916,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -81546,115 +107926,97 @@ Object { }, "range": Array [ 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, + 8, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 11, "line": 1, }, "start": Object { - "column": 16, + "column": 8, "line": 1, }, }, "range": Array [ - 16, - 17, + 8, + 11, ], - "type": "Numeric", - "value": "1", + "type": "Identifier", + "value": "foo", }, 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": "+", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 17, "line": 1, }, "start": Object { - "column": 20, + "column": 13, "line": 1, }, }, "range": Array [ - 20, - 21, + 13, + 17, ], - "type": "Numeric", - "value": "2", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 23, "line": 1, }, "start": Object { - "column": 21, + "column": 18, "line": 1, }, }, "range": Array [ - 21, - 22, + 18, + 23, ], - "type": "Punctuator", - "value": ")", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 24, "line": 1, }, "start": Object { - "column": 22, + "column": 23, "line": 1, }, }, "range": Array [ - 22, 23, + 24, ], "type": "Punctuator", "value": ";", @@ -81664,65 +108026,153 @@ Object { } `; -exports[`javascript fixtures/modules/export-default-function.src 1`] = ` +exports[`javascript fixtures/modules/export-from-specifiers.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", + "declaration": null, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, }, - "expression": false, - "generator": false, - "id": null, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 29, + ], + "source": Object { "loc": Object { "end": Object { - "column": 29, + "column": 28, "line": 1, }, "start": Object { - "column": 15, + "column": 23, "line": 1, }, }, - "params": Array [], "range": Array [ - 15, - 29, + 23, + 28, ], - "type": "FunctionDeclaration", + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", }, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, + "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", }, - "start": Object { - "column": 0, - "line": 1, + 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", }, - }, - "range": Array [ - 0, - 29, ], - "type": "ExportDefaultDeclaration", + "type": "ExportNamedDeclaration", }, ], "loc": Object { @@ -81762,7 +108212,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -81772,64 +108222,100 @@ Object { }, "range": Array [ 7, - 14, + 8, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, "range": Array [ - 15, - 23, + 8, + 11, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 12, "line": 1, }, "start": Object { - "column": 24, + "column": 11, "line": 1, }, }, "range": Array [ - 24, - 25, + 11, + 12, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 16, "line": 1, }, "start": Object { - "column": 25, + "column": 13, "line": 1, }, }, "range": Array [ - 25, - 26, + 13, + 16, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, ], "type": "Punctuator", - "value": ")", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 22, + ], + "type": "Identifier", + "value": "from", }, Object { "loc": Object { @@ -81838,16 +108324,16 @@ Object { "line": 1, }, "start": Object { - "column": 27, + "column": 23, "line": 1, }, }, "range": Array [ - 27, + 23, 28, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { @@ -81865,75 +108351,78 @@ Object { 29, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/export-default-named-class.src 1`] = ` +exports[`javascript fixtures/modules/export-function.src 1`] = ` Object { "body": Array [ Object { "declaration": Object { + "async": false, "body": Object { "body": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { - "column": 26, + "column": 23, "line": 1, }, }, "range": Array [ - 26, - 30, + 23, + 25, ], - "type": "ClassBody", + "type": "BlockStatement", }, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 25, + "column": 19, "line": 1, }, "start": Object { - "column": 21, + "column": 16, "line": 1, }, }, - "name": "Test", + "name": "foo", "range": Array [ - 21, - 25, + 16, + 19, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { - "column": 15, + "column": 7, "line": 1, }, }, + "params": Array [], "range": Array [ - 15, - 30, + 7, + 25, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "FunctionDeclaration", }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { "column": 0, @@ -81942,15 +108431,17 @@ Object { }, "range": Array [ 0, - 30, + 25, ], - "type": "ExportDefaultDeclaration", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -81959,7 +108450,7 @@ Object { }, "range": Array [ 0, - 31, + 26, ], "sourceType": "module", "tokens": Array [ @@ -81984,7 +108475,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { @@ -81994,33 +108485,51 @@ Object { }, "range": Array [ 7, - 14, + 15, ], "type": "Keyword", - "value": "default", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 19, "line": 1, }, "start": Object { - "column": 15, + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 19, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, "line": 1, }, }, "range": Array [ - 15, 20, + 21, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 22, "line": 1, }, "start": Object { @@ -82030,25 +108539,25 @@ Object { }, "range": Array [ 21, - 25, + 22, ], - "type": "Identifier", - "value": "Test", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 24, "line": 1, }, "start": Object { - "column": 26, + "column": 23, "line": 1, }, }, "range": Array [ - 26, - 27, + 23, + 24, ], "type": "Punctuator", "value": "{", @@ -82056,17 +108565,17 @@ Object { 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 [ - 29, - 30, + 24, + 25, ], "type": "Punctuator", "value": "}", @@ -82076,82 +108585,82 @@ Object { } `; -exports[`javascript fixtures/modules/export-default-named-function.src 1`] = ` +exports[`javascript fixtures/modules/export-named-as-default.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, + "declaration": null, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "source": null, + "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", }, - "range": Array [ - 30, - 32, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { "loc": Object { "end": Object { - "column": 27, + "column": 22, "line": 1, }, "start": Object { - "column": 24, + "column": 8, "line": 1, }, }, - "name": "foo", + "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 [ - 24, - 27, + 8, + 22, ], - "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 { @@ -82166,7 +108675,7 @@ Object { }, "range": Array [ 0, - 33, + 25, ], "sourceType": "module", "tokens": Array [ @@ -82191,7 +108700,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -82201,43 +108710,25 @@ Object { }, "range": Array [ 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 23, + 8, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 11, "line": 1, }, "start": Object { - "column": 24, + "column": 8, "line": 1, }, }, "range": Array [ - 24, - 27, + 8, + 11, ], "type": "Identifier", "value": "foo", @@ -82245,106 +108736,88 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 14, "line": 1, }, "start": Object { - "column": 27, + "column": 12, "line": 1, }, }, "range": Array [ - 27, - 28, + 12, + 14, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 22, "line": 1, }, "start": Object { - "column": 28, + "column": 15, "line": 1, }, }, "range": Array [ - 28, - 29, + 15, + 22, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 23, "line": 1, }, "start": Object { - "column": 30, + "column": 22, "line": 1, }, }, "range": Array [ - 30, - 31, + 22, + 23, ], "type": "Punctuator", - "value": "{", + "value": "}", }, 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": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/export-default-number.src 1`] = ` +exports[`javascript fixtures/modules/export-named-as-specifier.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 17, - ], - "raw": "42", - "type": "Literal", - "value": 42, - }, + "declaration": null, "loc": Object { "end": Object { - "column": 18, + "column": 20, "line": 1, }, "start": Object { @@ -82354,9 +108827,65 @@ Object { }, "range": Array [ 0, - 18, + 20, ], - "type": "ExportDefaultDeclaration", + "source": null, + "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", + }, + ], + "type": "ExportNamedDeclaration", }, ], "loc": Object { @@ -82371,7 +108900,7 @@ Object { }, "range": Array [ 0, - 19, + 21, ], "sourceType": "module", "tokens": Array [ @@ -82396,7 +108925,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -82406,15 +108935,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": 18, "line": 1, }, "start": Object { @@ -82424,25 +108989,43 @@ Object { }, "range": Array [ 15, - 17, + 18, ], - "type": "Numeric", - "value": "42", + "type": "Identifier", + "value": "bar", }, 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": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, ], "type": "Punctuator", "value": ";", @@ -82452,102 +109035,135 @@ Object { } `; -exports[`javascript fixtures/modules/export-default-object.src 1`] = ` +exports[`javascript fixtures/modules/export-named-as-specifiers.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, + "declaration": null, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 29, + ], + "source": null, + "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", }, - "start": Object { - "column": 15, - "line": 1, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, + "local": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, }, - "name": "foo", - "range": Array [ - 17, - 20, - ], - "type": "Identifier", }, - "kind": "init", + "name": "foo", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 8, + 22, + ], + "type": "ExportSpecifier", + }, + Object { + "exported": Object { "loc": Object { "end": Object { - "column": 23, + "column": 27, "line": 1, }, "start": Object { - "column": 17, + "column": 24, "line": 1, }, }, - "method": false, + "name": "bar", "range": Array [ - 17, - 23, + 24, + 27, ], - "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": 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, }, - "range": Array [ - 22, - 23, - ], - "raw": "1", - "type": "Literal", - "value": 1, }, + "name": "bar", + "range": Array [ + 24, + 27, + ], + "type": "Identifier", }, - ], - "range": Array [ - 15, - 25, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "range": Array [ + 24, + 27, + ], + "type": "ExportSpecifier", }, - }, - "range": Array [ - 0, - 26, ], - "type": "ExportDefaultDeclaration", + "type": "ExportNamedDeclaration", }, ], "loc": Object { @@ -82562,7 +109178,7 @@ Object { }, "range": Array [ 0, - 27, + 30, ], "sourceType": "module", "tokens": Array [ @@ -82587,7 +109203,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -82597,64 +109213,64 @@ Object { }, "range": Array [ 7, - 14, + 8, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, "range": Array [ - 15, - 16, + 8, + 11, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 14, "line": 1, }, "start": Object { - "column": 17, + "column": 12, "line": 1, }, }, "range": Array [ - 17, - 20, + 12, + 14, ], "type": "Identifier", - "value": "foo", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 22, "line": 1, }, "start": Object { - "column": 20, + "column": 15, "line": 1, }, }, "range": Array [ - 20, - 21, + 15, + 22, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { @@ -82671,13 +109287,13 @@ Object { 22, 23, ], - "type": "Numeric", - "value": "1", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 27, "line": 1, }, "start": Object { @@ -82687,7 +109303,25 @@ Object { }, "range": Array [ 24, - 25, + 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": "}", @@ -82695,17 +109329,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 26, + "column": 29, "line": 1, }, "start": Object { - "column": 25, + "column": 28, "line": 1, }, }, "range": Array [ - 25, - 26, + 28, + 29, ], "type": "Punctuator", "value": ";", @@ -82715,32 +109349,68 @@ Object { } `; -exports[`javascript fixtures/modules/export-default-value.src 1`] = ` +exports[`javascript fixtures/modules/export-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": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 22, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "Test", + "range": Array [ + 13, + 17, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 15, + "column": 7, "line": 1, }, }, - "name": "foo", "range": Array [ - 15, - 18, + 7, + 22, ], - "type": "Identifier", + "superClass": null, + "type": "ClassDeclaration", }, "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -82749,15 +109419,17 @@ Object { }, "range": Array [ 0, - 19, + 22, ], - "type": "ExportDefaultDeclaration", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -82766,7 +109438,7 @@ Object { }, "range": Array [ 0, - 20, + 23, ], "sourceType": "module", "tokens": Array [ @@ -82791,7 +109463,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 12, "line": 1, }, "start": Object { @@ -82801,28 +109473,28 @@ Object { }, "range": Array [ 7, - 14, + 12, ], "type": "Keyword", - "value": "default", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 17, "line": 1, }, "start": Object { - "column": 15, + "column": 13, "line": 1, }, }, "range": Array [ - 15, - 18, + 13, + 17, ], "type": "Identifier", - "value": "foo", + "value": "Test", }, Object { "loc": Object { @@ -82840,172 +109512,39 @@ Object { 19, ], "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/modules/export-from-batch.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, - }, - "start": Object { - "column": 14, - "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, + "value": "{", }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "*", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 13, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 19, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, + "line": 3, }, }, "range": Array [ - 19, - 20, + 21, + 22, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/export-from-default.src 1`] = ` +exports[`javascript fixtures/modules/export-named-empty.src 1`] = ` Object { "body": Array [ Object { "declaration": null, "loc": Object { "end": Object { - "column": 28, + "column": 10, "line": 1, }, "start": Object { @@ -83015,82 +109554,10 @@ Object { }, "range": Array [ 0, - 28, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 27, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "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", - }, + 10, ], + "source": null, + "specifiers": Array [], "type": "ExportNamedDeclaration", }, ], @@ -83106,7 +109573,7 @@ Object { }, "range": Array [ 0, - 29, + 11, ], "sourceType": "module", "tokens": Array [ @@ -83149,7 +109616,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 9, "line": 1, }, "start": Object { @@ -83159,25 +109626,7 @@ Object { }, "range": Array [ 8, - 15, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 16, + 9, ], "type": "Punctuator", "value": "}", @@ -83185,53 +109634,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 27, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, + "column": 10, "line": 1, }, "start": Object { - "column": 27, + "column": 9, "line": 1, }, }, "range": Array [ - 27, - 28, + 9, + 10, ], "type": "Punctuator", "value": ";", @@ -83241,67 +109654,49 @@ Object { } `; -exports[`javascript fixtures/modules/export-from-named-as-default.src 1`] = ` +exports[`javascript fixtures/modules/export-named-specifier.src 1`] = ` Object { "body": Array [ Object { "declaration": null, - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, - "range": Array [ - 29, - 34, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", }, + "range": Array [ + 0, + 13, + ], + "source": null, "specifiers": Array [ 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 { @@ -83329,7 +109724,7 @@ Object { }, "range": Array [ 8, - 22, + 11, ], "type": "ExportSpecifier", }, @@ -83349,7 +109744,7 @@ Object { }, "range": Array [ 0, - 36, + 14, ], "sourceType": "module", "tokens": Array [ @@ -83410,53 +109805,17 @@ 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": 22, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 22, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, "start": Object { - "column": 22, + "column": 11, "line": 1, }, }, "range": Array [ - 22, - 23, + 11, + 12, ], "type": "Punctuator", "value": "}", @@ -83464,53 +109823,17 @@ Object { 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, + "column": 13, "line": 1, }, "start": Object { - "column": 34, + "column": 12, "line": 1, }, }, "range": Array [ - 34, - 35, + 12, + 13, ], "type": "Punctuator", "value": ";", @@ -83520,14 +109843,14 @@ Object { } `; -exports[`javascript fixtures/modules/export-from-named-as-specifier.src 1`] = ` +exports[`javascript fixtures/modules/export-named-specifiers.src 1`] = ` Object { "body": Array [ Object { "declaration": null, "loc": Object { "end": Object { - "column": 31, + "column": 18, "line": 1, }, "start": Object { @@ -83537,50 +109860,32 @@ Object { }, "range": Array [ 0, - 31, + 18, ], - "source": Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 30, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, + "source": null, "specifiers": Array [ 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 { @@ -83608,7 +109913,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", }, @@ -83628,7 +109986,7 @@ Object { }, "range": Array [ 0, - 32, + 19, ], "sourceType": "module", "tokens": Array [ @@ -83689,35 +110047,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", @@ -83725,17 +110083,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 17, "line": 1, }, "start": Object { - "column": 18, + "column": 16, "line": 1, }, }, "range": Array [ - 18, - 19, + 16, + 17, ], "type": "Punctuator", "value": "}", @@ -83743,53 +110101,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 24, - ], - "type": "Identifier", - "value": "from", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 30, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 31, + "column": 18, "line": 1, }, "start": Object { - "column": 30, + "column": 17, "line": 1, }, }, "range": Array [ - 30, - 31, + 17, + 18, ], "type": "Punctuator", "value": ";", @@ -83799,14 +110121,14 @@ Object { } `; -exports[`javascript fixtures/modules/export-from-named-as-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/export-named-specifiers-comma.src 1`] = ` Object { "body": Array [ Object { "declaration": null, "loc": Object { "end": Object { - "column": 40, + "column": 19, "line": 1, }, "start": Object { @@ -83816,50 +110138,32 @@ Object { }, "range": Array [ 0, - 40, + 19, ], - "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 { "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 { @@ -83887,7 +110191,7 @@ Object { }, "range": Array [ 8, - 22, + 11, ], "type": "ExportSpecifier", }, @@ -83895,52 +110199,52 @@ Object { "exported": Object { "loc": Object { "end": Object { - "column": 27, + "column": 16, "line": 1, }, "start": Object { - "column": 24, + "column": 13, "line": 1, }, }, "name": "bar", "range": Array [ - 24, - 27, + 13, + 16, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 27, + "column": 16, "line": 1, }, "start": Object { - "column": 24, + "column": 13, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 27, + "column": 16, "line": 1, }, "start": Object { - "column": 24, + "column": 13, "line": 1, }, }, "name": "bar", "range": Array [ - 24, - 27, + 13, + 16, ], "type": "Identifier", }, "range": Array [ - 24, - 27, + 13, + 16, ], "type": "ExportSpecifier", }, @@ -83960,7 +110264,7 @@ Object { }, "range": Array [ 0, - 41, + 20, ], "sourceType": "module", "tokens": Array [ @@ -84021,53 +110325,17 @@ 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": 22, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 22, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, "start": Object { - "column": 22, + "column": 11, "line": 1, }, }, "range": Array [ - 22, - 23, + 11, + 12, ], "type": "Punctuator", "value": ",", @@ -84075,17 +110343,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 27, + "column": 16, "line": 1, }, "start": Object { - "column": 24, + "column": 13, "line": 1, }, }, "range": Array [ - 24, - 27, + 13, + 16, ], "type": "Identifier", "value": "bar", @@ -84093,71 +110361,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 17, "line": 1, }, "start": Object { - "column": 27, + "column": 16, "line": 1, }, }, "range": Array [ - 27, - 28, + 16, + 17, ], "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", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 39, + "column": 18, "line": 1, }, "start": Object { - "column": 34, + "column": 17, "line": 1, }, }, "range": Array [ - 34, - 39, + 17, + 18, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": "}", }, 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": ";", @@ -84167,99 +110417,82 @@ Object { } `; -exports[`javascript fixtures/modules/export-from-specifier.src 1`] = ` +exports[`javascript fixtures/modules/export-var.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, - }, - }, - "range": Array [ - 18, - 23, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "exported": 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": 11, + "column": 14, "line": 1, }, "start": Object { - "column": 8, + "column": 11, "line": 1, }, }, - "name": "foo", "range": Array [ - 8, 11, + 14, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 15, + "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", + "start": Object { + "column": 7, + "line": 1, }, - "range": Array [ - 8, - 11, - ], - "type": "ExportSpecifier", }, + "range": Array [ + 7, + 15, + ], + "type": "VariableDeclaration", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, ], + "source": null, + "specifiers": Array [], "type": "ExportNamedDeclaration", }, ], @@ -84275,7 +110508,7 @@ Object { }, "range": Array [ 0, - 25, + 16, ], "sourceType": "module", "tokens": Array [ @@ -84300,7 +110533,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { @@ -84310,33 +110543,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": "foo", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { @@ -84346,61 +110561,25 @@ Object { }, "range": Array [ 11, - 12, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 17, + 14, ], "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\\"", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 15, "line": 1, }, "start": Object { - "column": 23, + "column": 14, "line": 1, }, }, "range": Array [ - 23, - 24, + 14, + 15, ], "type": "Punctuator", "value": ";", @@ -84410,152 +110589,121 @@ Object { } `; -exports[`javascript fixtures/modules/export-from-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/export-var-anonymous-function.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 28, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "exported": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "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": "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, + "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, - 11, - ], - "type": "ExportSpecifier", - }, - Object { - "exported": Object { "loc": Object { "end": Object { - "column": 16, + "column": 31, "line": 1, }, "start": Object { - "column": 13, + "column": 11, "line": 1, }, }, - "name": "bar", "range": Array [ - 13, - 16, + 11, + 31, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 32, + "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", + "start": Object { + "column": 7, + "line": 1, }, - "range": Array [ - 13, - 16, - ], - "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", }, ], @@ -84571,7 +110719,7 @@ Object { }, "range": Array [ 0, - 30, + 33, ], "sourceType": "module", "tokens": Array [ @@ -84596,7 +110744,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { @@ -84606,25 +110754,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", @@ -84632,107 +110780,125 @@ Object { 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": 16, + "column": 25, "line": 1, }, "start": Object { - "column": 13, + "column": 17, "line": 1, }, }, "range": Array [ - 13, - 16, + 17, + 25, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 27, "line": 1, }, "start": Object { - "column": 16, + "column": 26, "line": 1, }, }, "range": Array [ - 16, - 17, + 26, + 27, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 28, "line": 1, }, "start": Object { - "column": 18, + "column": 27, "line": 1, }, }, "range": Array [ - 18, - 22, + 27, + 28, ], - "type": "Identifier", - "value": "from", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 30, "line": 1, }, "start": Object { - "column": 23, + "column": 29, "line": 1, }, }, "range": Array [ - 23, - 28, + 29, + 30, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 31, "line": 1, }, "start": Object { - "column": 28, + "column": 30, "line": 1, }, }, "range": Array [ - 28, - 29, + 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": ";", @@ -84742,53 +110908,71 @@ Object { } `; -exports[`javascript fixtures/modules/export-function.src 1`] = ` +exports[`javascript fixtures/modules/export-var-number.src 1`] = ` Object { "body": Array [ Object { "declaration": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 23, - "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 [ - 23, - 25, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 19, - "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": 16, - "line": 1, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, }, + "range": Array [ + 11, + 18, + ], + "type": "VariableDeclarator", }, - "name": "foo", - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 25, + "column": 19, "line": 1, }, "start": Object { @@ -84796,16 +110980,15 @@ Object { "line": 1, }, }, - "params": Array [], "range": Array [ 7, - 25, + 19, ], - "type": "FunctionDeclaration", + "type": "VariableDeclaration", }, "loc": Object { "end": Object { - "column": 25, + "column": 19, "line": 1, }, "start": Object { @@ -84815,7 +110998,7 @@ Object { }, "range": Array [ 0, - 25, + 19, ], "source": null, "specifiers": Array [], @@ -84834,7 +111017,7 @@ Object { }, "range": Array [ 0, - 26, + 20, ], "sourceType": "module", "tokens": Array [ @@ -84859,7 +111042,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 10, "line": 1, }, "start": Object { @@ -84869,25 +111052,25 @@ Object { }, "range": Array [ 7, - 15, + 10, ], "type": "Keyword", - "value": "function", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 14, "line": 1, }, "start": Object { - "column": 16, + "column": 11, "line": 1, }, }, "range": Array [ - 16, - 19, + 11, + 14, ], "type": "Identifier", "value": "foo", @@ -84895,88 +111078,69 @@ Object { 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, + "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": 24, + "column": 18, "line": 1, }, "start": Object { - "column": 23, + "column": 17, "line": 1, }, }, "range": Array [ - 23, - 24, + 17, + 18, ], - "type": "Punctuator", - "value": "{", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 19, "line": 1, }, "start": Object { - "column": 24, + "column": 18, "line": 1, }, }, "range": Array [ - 24, - 25, + 18, + 19, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/export-named-as-default.src 1`] = ` +exports[`javascript fixtures/modules/import-default.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 24, + "column": 22, "line": 1, }, "start": Object { @@ -84986,65 +111150,65 @@ Object { }, "range": Array [ 0, - 24, + 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": 22, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "default", - "range": Array [ - 15, - 22, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 22, + "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, - 22, + 7, + 10, ], - "type": "ExportSpecifier", + "type": "ImportDefaultSpecifier", }, ], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "loc": Object { @@ -85059,7 +111223,7 @@ Object { }, "range": Array [ 0, - 25, + 23, ], "sourceType": "module", "tokens": Array [ @@ -85079,12 +111243,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { @@ -85094,25 +111258,7 @@ 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": "foo", @@ -85120,71 +111266,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { - "column": 12, + "column": 11, "line": 1, }, }, "range": Array [ - 12, - 14, + 11, + 15, ], "type": "Identifier", - "value": "as", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 21, "line": 1, }, "start": Object { - "column": 15, + "column": 16, "line": 1, }, }, "range": Array [ - 15, - 22, + 16, + 21, ], - "type": "Keyword", - "value": "default", + "type": "String", + "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": 24, - "line": 1, - }, "start": Object { - "column": 23, + "column": 21, "line": 1, }, }, "range": Array [ - 23, - 24, + 21, + 22, ], "type": "Punctuator", "value": ";", @@ -85194,14 +111322,13 @@ Object { } `; -exports[`javascript fixtures/modules/export-named-as-specifier.src 1`] = ` +exports[`javascript fixtures/modules/import-default-and-named-specifiers.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 20, + "column": 29, "line": 1, }, "start": Object { @@ -85211,65 +111338,118 @@ Object { }, "range": Array [ 0, - 20, + 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": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "local": Object { "loc": Object { "end": Object { - "column": 18, + "column": 10, "line": 1, }, "start": Object { - "column": 15, + "column": 7, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 7, + 10, + ], + "type": "Identifier", + }, + "range": Array [ + 7, + 10, + ], + "type": "ImportDefaultSpecifier", + }, + Object { + "imported": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, "line": 1, }, }, "name": "bar", "range": Array [ - 15, - 18, + 13, + 16, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 18, + "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, - 18, + 13, + 16, ], - "type": "ExportSpecifier", + "type": "ImportSpecifier", }, ], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "loc": Object { @@ -85284,7 +111464,7 @@ Object { }, "range": Array [ 0, - 21, + 30, ], "sourceType": "module", "tokens": Array [ @@ -85304,12 +111484,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { @@ -85319,10 +111499,10 @@ Object { }, "range": Array [ 7, - 8, + 10, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { @@ -85331,21 +111511,21 @@ 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": 14, + "column": 13, "line": 1, }, "start": Object { @@ -85355,25 +111535,25 @@ Object { }, "range": Array [ 12, - 14, + 13, ], - "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", @@ -85381,17 +111561,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 17, "line": 1, }, "start": Object { - "column": 18, + "column": 16, "line": 1, }, }, "range": Array [ - 18, - 19, + 16, + 17, ], "type": "Punctuator", "value": "}", @@ -85399,17 +111579,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 22, "line": 1, }, "start": Object { - "column": 19, + "column": 18, "line": 1, }, }, "range": Array [ - 19, - 20, + 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": ";", @@ -85419,14 +111635,13 @@ Object { } `; -exports[`javascript fixtures/modules/export-named-as-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/import-default-and-namespace-specifiers.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 29, + "column": 32, "line": 1, }, "start": Object { @@ -85436,118 +111651,100 @@ Object { }, "range": Array [ 0, - 29, + 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": 22, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "default", - "range": Array [ - 15, - 22, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 22, + "column": 10, "line": 1, }, "start": Object { - "column": 8, + "column": 7, "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", - }, - Object { - "exported": Object { + }, + }, + "local": Object { "loc": Object { "end": Object { - "column": 27, + "column": 10, "line": 1, }, "start": Object { - "column": 24, + "column": 7, "line": 1, }, }, - "name": "bar", + "name": "foo", "range": Array [ - 24, - 27, + 7, + 10, ], "type": "Identifier", }, + "range": Array [ + 7, + 10, + ], + "type": "ImportDefaultSpecifier", + }, + Object { "loc": Object { "end": Object { - "column": 27, + "column": 20, "line": 1, }, "start": Object { - "column": 24, + "column": 12, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 27, + "column": 20, "line": 1, }, "start": Object { - "column": 24, + "column": 17, "line": 1, }, }, "name": "bar", "range": Array [ - 24, - 27, + 17, + 20, ], "type": "Identifier", }, "range": Array [ - 24, - 27, + 12, + 20, ], - "type": "ExportSpecifier", + "type": "ImportNamespaceSpecifier", }, ], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "loc": Object { @@ -85562,7 +111759,7 @@ Object { }, "range": Array [ 0, - 30, + 33, ], "sourceType": "module", "tokens": Array [ @@ -85582,12 +111779,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { @@ -85597,10 +111794,10 @@ Object { }, "range": Array [ 7, - 8, + 10, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { @@ -85609,21 +111806,21 @@ 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": 14, + "column": 13, "line": 1, }, "start": Object { @@ -85633,97 +111830,97 @@ Object { }, "range": Array [ 12, - 14, + 13, ], - "type": "Identifier", - "value": "as", + "type": "Punctuator", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 15, + "column": 14, "line": 1, }, }, "range": Array [ - 15, - 22, + 14, + 16, ], - "type": "Keyword", - "value": "default", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 1, }, "start": Object { - "column": 22, + "column": 17, "line": 1, }, }, "range": Array [ - 22, - 23, + 17, + 20, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 25, "line": 1, }, "start": Object { - "column": 24, + "column": 21, "line": 1, }, }, "range": Array [ - 24, - 27, + 21, + 25, ], "type": "Identifier", - "value": "bar", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 31, "line": 1, }, "start": Object { - "column": 27, + "column": 26, "line": 1, }, }, "range": Array [ - 27, - 28, + 26, + 31, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"foo\\"", }, 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": ";", @@ -85733,87 +111930,105 @@ Object { } `; -exports[`javascript fixtures/modules/export-named-class.src 1`] = ` +exports[`javascript fixtures/modules/import-default-as.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, - }, - }, - "range": Array [ - 18, - 22, - ], - "type": "ClassBody", + "loc": Object { + "end": Object { + "column": 35, + "line": 1, }, - "id": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "name": "Test", - "range": Array [ - 13, - 17, - ], - "type": "Identifier", + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 35, + ], + "source": Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 34, + "line": 1, }, "start": Object { - "column": 7, + "column": 29, "line": 1, }, }, "range": Array [ - 7, - 22, + 29, + 34, ], - "superClass": null, - "type": "ClassDeclaration", + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, + "specifiers": Array [ + Object { + "imported": 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": 22, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + }, + "range": Array [ + 8, + 22, + ], + "type": "ImportSpecifier", }, - }, - "range": Array [ - 0, - 22, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -85822,7 +112037,7 @@ Object { }, "range": Array [ 0, - 23, + 36, ], "sourceType": "module", "tokens": Array [ @@ -85842,12 +112057,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 8, "line": 1, }, "start": Object { @@ -85857,78 +112072,149 @@ Object { }, "range": Array [ 7, - 12, + 8, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 15, ], "type": "Keyword", - "value": "class", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 18, "line": 1, }, "start": Object { - "column": 13, + "column": 16, "line": 1, }, }, "range": Array [ - 13, - 17, + 16, + 18, ], "type": "Identifier", - "value": "Test", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 22, "line": 1, }, "start": Object { - "column": 18, + "column": 19, "line": 1, }, }, "range": Array [ - 18, 19, + 22, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 23, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 22, + "line": 1, }, }, "range": Array [ - 21, 22, + 23, ], "type": "Punctuator", "value": "}", }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 28, + ], + "type": "Identifier", + "value": "from", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 34, + ], + "type": "String", + "value": "\\"foo\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ";", + }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/export-named-empty.src 1`] = ` +exports[`javascript fixtures/modules/import-jquery.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 10, + "column": 22, "line": 1, }, "start": Object { @@ -85938,11 +112224,65 @@ Object { }, "range": Array [ 0, - 10, + 22, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", + "source": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 22, + ], + "raw": "\\"jquery\\"", + "type": "Literal", + "value": "jquery", + }, + "specifiers": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "local": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "$", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + "range": Array [ + 7, + 8, + ], + "type": "ImportDefaultSpecifier", + }, + ], + "type": "ImportDeclaration", }, ], "loc": Object { @@ -85957,7 +112297,7 @@ Object { }, "range": Array [ 0, - 11, + 23, ], "sourceType": "module", "tokens": Array [ @@ -85977,7 +112317,7 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { @@ -85994,126 +112334,89 @@ Object { 7, 8, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "$", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 13, "line": 1, }, "start": Object { - "column": 8, + "column": 9, "line": 1, }, }, "range": Array [ - 8, 9, + 13, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 22, "line": 1, }, "start": Object { - "column": 9, + "column": 14, "line": 1, }, }, "range": Array [ - 9, - 10, + 14, + 22, ], - "type": "Punctuator", - "value": ";", + "type": "String", + "value": "\\"jquery\\"", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/export-named-specifier.src 1`] = ` +exports[`javascript fixtures/modules/import-module.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, - }, + "column": 13, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 13, + ], + "source": Object { + "loc": Object { + "end": Object { + "column": 12, + "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", + "start": Object { + "column": 7, + "line": 1, }, - "range": Array [ - 8, - 11, - ], - "type": "ExportSpecifier", }, - ], - "type": "ExportNamedDeclaration", + "range": Array [ + 7, + 12, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, + "specifiers": Array [], + "type": "ImportDeclaration", }, ], "loc": Object { @@ -86148,12 +112451,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 12, "line": 1, }, "start": Object { @@ -86163,46 +112466,10 @@ 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": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, 12, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { @@ -86227,14 +112494,13 @@ Object { } `; -exports[`javascript fixtures/modules/export-named-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/import-named-as-specifier.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 18, + "column": 31, "line": 1, }, "start": Object { @@ -86244,12 +112510,30 @@ Object { }, "range": Array [ 0, - 18, + 31, ], - "source": null, + "source": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 30, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, "specifiers": Array [ Object { - "exported": Object { + "imported": Object { "loc": Object { "end": Object { "column": 11, @@ -86260,7 +112544,7 @@ Object { "line": 1, }, }, - "name": "foo", + "name": "bar", "range": Array [ 8, 11, @@ -86269,7 +112553,7 @@ Object { }, "loc": Object { "end": Object { - "column": 11, + "column": 18, "line": 1, }, "start": Object { @@ -86280,82 +112564,29 @@ Object { "local": Object { "loc": Object { "end": Object { - "column": 11, + "column": 18, "line": 1, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, - "name": "foo", + "name": "baz", "range": Array [ - 8, - 11, + 15, + 18, ], "type": "Identifier", }, "range": Array [ 8, - 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, + 18, ], - "type": "ExportSpecifier", + "type": "ImportSpecifier", }, ], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "loc": Object { @@ -86370,7 +112601,7 @@ Object { }, "range": Array [ 0, - 19, + 32, ], "sourceType": "module", "tokens": Array [ @@ -86390,7 +112621,7 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { @@ -86426,58 +112657,58 @@ Object { 11, ], "type": "Identifier", - "value": "foo", + "value": "bar", }, 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": 18, "line": 1, }, "start": Object { - "column": 13, + "column": 15, "line": 1, }, }, "range": Array [ - 13, - 16, + 15, + 18, ], "type": "Identifier", - "value": "bar", + "value": "baz", }, 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": "}", @@ -86485,17 +112716,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 24, "line": 1, }, "start": Object { - "column": 17, + "column": 20, "line": 1, }, }, "range": Array [ - 17, - 18, + 20, + 24, + ], + "type": "Identifier", + "value": "from", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 30, + ], + "type": "String", + "value": "\\"foo\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, ], "type": "Punctuator", "value": ";", @@ -86505,14 +112772,13 @@ Object { } `; -exports[`javascript fixtures/modules/export-named-specifiers-comma.src 1`] = ` +exports[`javascript fixtures/modules/import-named-as-specifiers.src 1`] = ` Object { "body": Array [ Object { - "declaration": null, "loc": Object { "end": Object { - "column": 19, + "column": 36, "line": 1, }, "start": Object { @@ -86522,12 +112788,30 @@ Object { }, "range": Array [ 0, - 19, + 36, ], - "source": null, + "source": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 35, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, "specifiers": Array [ Object { - "exported": Object { + "imported": Object { "loc": Object { "end": Object { "column": 11, @@ -86538,7 +112822,7 @@ Object { "line": 1, }, }, - "name": "foo", + "name": "bar", "range": Array [ 8, 11, @@ -86547,7 +112831,7 @@ Object { }, "loc": Object { "end": Object { - "column": 11, + "column": 18, "line": 1, }, "start": Object { @@ -86558,82 +112842,82 @@ Object { "local": Object { "loc": Object { "end": Object { - "column": 11, + "column": 18, "line": 1, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, - "name": "foo", + "name": "baz", "range": Array [ - 8, - 11, + 15, + 18, ], "type": "Identifier", }, "range": Array [ 8, - 11, + 18, ], - "type": "ExportSpecifier", + "type": "ImportSpecifier", }, Object { - "exported": 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": "ExportSpecifier", + "type": "ImportSpecifier", }, ], - "type": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "loc": Object { @@ -86648,7 +112932,7 @@ Object { }, "range": Array [ 0, - 20, + 37, ], "sourceType": "module", "tokens": Array [ @@ -86668,7 +112952,7 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { @@ -86704,58 +112988,58 @@ Object { 11, ], "type": "Identifier", - "value": "foo", + "value": "bar", }, 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": 18, "line": 1, }, "start": Object { - "column": 13, + "column": 15, "line": 1, }, }, "range": Array [ - 13, - 16, + 15, + 18, ], "type": "Identifier", - "value": "bar", + "value": "baz", }, 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": ",", @@ -86763,17 +113047,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 23, "line": 1, }, "start": Object { - "column": 17, + "column": 20, "line": 1, }, }, "range": Array [ - 17, - 18, + 20, + 23, + ], + "type": "Identifier", + "value": "xyz", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, ], "type": "Punctuator", "value": "}", @@ -86781,89 +113083,69 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 29, "line": 1, }, "start": Object { - "column": 18, + "column": 25, "line": 1, }, }, "range": Array [ - 18, - 19, + 25, + 29, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "from", }, - ], - "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, - }, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 35, + ], + "type": "String", + "value": "\\"foo\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, }, - "range": Array [ - 7, - 15, - ], - "type": "VariableDeclaration", }, + "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": 15, + "column": 21, "line": 1, }, "start": Object { @@ -86873,11 +113155,29 @@ Object { }, "range": Array [ 0, - 15, + 21, ], - "source": null, + "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": "ExportNamedDeclaration", + "type": "ImportDeclaration", }, ], "loc": Object { @@ -86892,7 +113192,7 @@ Object { }, "range": Array [ 0, - 16, + 22, ], "sourceType": "module", "tokens": Array [ @@ -86912,12 +113212,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { @@ -86927,10 +113227,28 @@ Object { }, "range": Array [ 7, - 10, + 8, ], - "type": "Keyword", - "value": "var", + "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 { @@ -86939,31 +113257,49 @@ Object { "line": 1, }, "start": Object { - "column": 11, + "column": 10, "line": 1, }, }, "range": Array [ - 11, + 10, 14, ], "type": "Identifier", - "value": "bar", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 20, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, 15, + 20, + ], + "type": "String", + "value": "\\"foo\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, ], "type": "Punctuator", "value": ";", @@ -86973,122 +113309,99 @@ Object { } `; -exports[`javascript fixtures/modules/export-var-anonymous-function.src 1`] = ` +exports[`javascript fixtures/modules/import-named-specifier.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", + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "source": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 23, + ], + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", + }, + "specifiers": Array [ + Object { + "imported": Object { + "loc": Object { + "end": Object { + "column": 11, + "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": "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": 31, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "column": 8, "line": 1, }, }, + "name": "bar", "range": Array [ + 8, 11, - 31, ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, + "type": "Identifier", }, + "range": Array [ + 8, + 11, + ], + "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 { @@ -87103,7 +113416,7 @@ Object { }, "range": Array [ 0, - 33, + 25, ], "sourceType": "module", "tokens": Array [ @@ -87123,12 +113436,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { @@ -87138,255 +113451,252 @@ Object { }, "range": Array [ 7, - 10, + 8, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "column": 8, "line": 1, }, }, "range": Array [ + 8, 11, - 14, ], "type": "Identifier", - "value": "foo", + "value": "bar", }, 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": "=", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 17, "line": 1, }, "start": Object { - "column": 17, + "column": 13, "line": 1, }, }, "range": Array [ + 13, 17, - 25, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 23, "line": 1, }, "start": Object { - "column": 26, + "column": 18, "line": 1, }, }, "range": Array [ - 26, - 27, + 18, + 23, ], - "type": "Punctuator", - "value": "(", + "type": "String", + "value": "\\"foo\\"", }, 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": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/modules/import-named-specifiers.src 1`] = ` +Object { + "body": Array [ 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, + "column": 0, "line": 1, }, }, "range": Array [ - 30, - 31, + 0, + 29, ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, + "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", }, - "range": Array [ - 31, - 32, - ], - "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, - }, + "specifiers": Array [ + Object { + "imported": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, }, - "name": "foo", - "range": Array [ - 11, - 14, - ], - "type": "Identifier", }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "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, }, - "range": Array [ - 17, - 18, - ], - "raw": "1", - "type": "Literal", - "value": 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, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, }, + }, + "local": Object { "loc": Object { "end": Object { - "column": 18, + "column": 16, "line": 1, }, "start": Object { - "column": 11, + "column": 13, "line": 1, }, }, + "name": "baz", "range": Array [ - 11, - 18, + 13, + 16, ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, + "type": "Identifier", }, + "range": Array [ + 13, + 16, + ], + "type": "ImportSpecifier", }, - "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 { @@ -87401,7 +113711,7 @@ Object { }, "range": Array [ 0, - 20, + 30, ], "sourceType": "module", "tokens": Array [ @@ -87421,12 +113731,12 @@ Object { 6, ], "type": "Keyword", - "value": "export", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { @@ -87436,69 +113746,87 @@ Object { }, "range": Array [ 7, - 10, + 8, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "column": 8, "line": 1, }, }, "range": Array [ + 8, 11, - 14, ], "type": "Identifier", - "value": "foo", + "value": "bar", }, 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": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 16, "line": 1, }, "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { "column": 17, "line": 1, }, + "start": Object { + "column": 16, + "line": 1, + }, }, "range": Array [ + 16, 17, - 18, ], - "type": "Numeric", - "value": "1", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 22, "line": 1, }, "start": Object { @@ -87508,7 +113836,43 @@ Object { }, "range": Array [ 18, - 19, + 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": ";", @@ -87518,13 +113882,13 @@ Object { } `; -exports[`javascript fixtures/modules/import-default.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 { @@ -87534,22 +113898,22 @@ Object { }, "range": Array [ 0, - 22, + 30, ], "source": Object { "loc": Object { "end": Object { - "column": 21, + "column": 29, "line": 1, }, "start": Object { - "column": 16, + "column": 24, "line": 1, }, }, "range": Array [ - 16, - 21, + 24, + 29, ], "raw": "\\"foo\\"", "type": "Literal", @@ -87557,39 +113921,110 @@ 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": 11, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "local": 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, + 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", @@ -87607,7 +114042,7 @@ Object { }, "range": Array [ 0, - 23, + 31, ], "sourceType": "module", "tokens": Array [ @@ -87632,7 +114067,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { @@ -87642,15 +114077,33 @@ Object { }, "range": Array [ 7, - 10, + 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", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 12, "line": 1, }, "start": Object { @@ -87660,15 +114113,33 @@ Object { }, "range": Array [ 11, - 15, + 12, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 16, ], "type": "Identifier", - "value": "from", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 17, "line": 1, }, "start": Object { @@ -87678,7 +114149,61 @@ Object { }, "range": Array [ 16, - 21, + 17, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 23, + ], + "type": "Identifier", + "value": "from", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 29, ], "type": "String", "value": "\\"foo\\"", @@ -87686,17 +114211,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 30, "line": 1, }, "start": Object { - "column": 21, + "column": 29, "line": 1, }, }, "range": Array [ - 21, - 22, + 29, + 30, ], "type": "Punctuator", "value": ";", @@ -87706,13 +114231,13 @@ Object { } `; -exports[`javascript fixtures/modules/import-default-and-named-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/import-namespace-specifier.src 1`] = ` Object { "body": Array [ Object { "loc": Object { "end": Object { - "column": 29, + "column": 27, "line": 1, }, "start": Object { @@ -87722,22 +114247,22 @@ Object { }, "range": Array [ 0, - 29, + 27, ], "source": Object { "loc": Object { "end": Object { - "column": 28, + "column": 26, "line": 1, }, "start": Object { - "column": 23, + "column": 21, "line": 1, }, }, "range": Array [ - 23, - 28, + 21, + 26, ], "raw": "\\"foo\\"", "type": "Literal", @@ -87747,7 +114272,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 1, }, "start": Object { @@ -87758,79 +114283,26 @@ Object { "local": Object { "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 1, }, "start": Object { - "column": 7, + "column": 12, "line": 1, }, }, "name": "foo", "range": Array [ - 7, - 10, + 12, + 15, ], "type": "Identifier", }, "range": Array [ 7, - 10, - ], - "type": "ImportDefaultSpecifier", - }, - Object { - "imported": 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, + 15, ], - "type": "ImportSpecifier", + "type": "ImportNamespaceSpecifier", }, ], "type": "ImportDeclaration", @@ -87845,135 +114317,99 @@ Object { "column": 0, "line": 1, }, - }, - "range": Array [ - 0, - 30, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "import", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 10, - ], - "type": "Identifier", - "value": "foo", - }, + }, + "range": Array [ + 0, + 28, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 11, + "column": 6, "line": 1, }, "start": Object { - "column": 10, + "column": 0, "line": 1, }, }, "range": Array [ - 10, - 11, + 0, + 6, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 8, "line": 1, }, "start": Object { - "column": 12, + "column": 7, "line": 1, }, }, "range": Array [ - 12, - 13, + 7, + 8, ], "type": "Punctuator", - "value": "{", + "value": "*", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 11, "line": 1, }, "start": Object { - "column": 13, + "column": 9, "line": 1, }, }, "range": Array [ - 13, - 16, + 9, + 11, ], "type": "Identifier", - "value": "bar", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 1, }, "start": Object { - "column": 16, + "column": 12, "line": 1, }, }, "range": Array [ - 16, - 17, + 12, + 15, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 20, "line": 1, }, "start": Object { - "column": 18, + "column": 16, "line": 1, }, }, "range": Array [ - 18, - 22, + 16, + 20, ], "type": "Identifier", "value": "from", @@ -87981,17 +114417,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 26, "line": 1, }, "start": Object { - "column": 23, + "column": 21, "line": 1, }, }, "range": Array [ - 23, - 28, + 21, + 26, ], "type": "String", "value": "\\"foo\\"", @@ -87999,17 +114435,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 29, + "column": 27, "line": 1, }, "start": Object { - "column": 28, + "column": 26, "line": 1, }, }, "range": Array [ - 28, - 29, + 26, + 27, ], "type": "Punctuator", "value": ";", @@ -88019,13 +114455,13 @@ Object { } `; -exports[`javascript fixtures/modules/import-default-and-namespace-specifiers.src 1`] = ` +exports[`javascript fixtures/modules/import-null-as-nil.src 1`] = ` Object { "body": Array [ Object { "loc": Object { "end": Object { - "column": 32, + "column": 33, "line": 1, }, "start": Object { @@ -88035,71 +114471,54 @@ Object { }, "range": Array [ 0, - 32, + 33, ], "source": Object { "loc": Object { "end": Object { - "column": 31, + "column": 33, "line": 1, }, "start": Object { - "column": 26, + "column": 28, "line": 1, }, }, "range": Array [ - 26, - 31, + 28, + 33, ], - "raw": "\\"foo\\"", + "raw": "\\"bar\\"", "type": "Literal", - "value": "foo", + "value": "bar", }, "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": 13, "line": 1, }, "start": Object { - "column": 7, + "column": 9, "line": 1, }, }, - "name": "foo", + "name": "null", "range": Array [ - 7, - 10, + 9, + 13, ], "type": "Identifier", }, - "range": Array [ - 7, - 10, - ], - "type": "ImportDefaultSpecifier", - }, - Object { "loc": Object { "end": Object { "column": 20, "line": 1, }, "start": Object { - "column": 12, + "column": 9, "line": 1, }, }, @@ -88114,7 +114533,7 @@ Object { "line": 1, }, }, - "name": "bar", + "name": "nil", "range": Array [ 17, 20, @@ -88122,10 +114541,10 @@ Object { "type": "Identifier", }, "range": Array [ - 12, + 9, 20, ], - "type": "ImportNamespaceSpecifier", + "type": "ImportSpecifier", }, ], "type": "ImportDeclaration", @@ -88143,7 +114562,7 @@ Object { }, "range": Array [ 0, - 33, + 34, ], "sourceType": "module", "tokens": Array [ @@ -88168,7 +114587,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { @@ -88178,28 +114597,10 @@ Object { }, "range": Array [ 7, - 10, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, + 8, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { @@ -88208,16 +114609,16 @@ Object { "line": 1, }, "start": Object { - "column": 12, + "column": 9, "line": 1, }, }, "range": Array [ - 12, + 9, 13, ], - "type": "Punctuator", - "value": "*", + "type": "Null", + "value": "null", }, Object { "loc": Object { @@ -88253,12 +114654,12 @@ Object { 20, ], "type": "Identifier", - "value": "bar", + "value": "nil", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 22, "line": 1, }, "start": Object { @@ -88268,145 +114669,129 @@ Object { }, "range": Array [ 21, - 25, + 22, ], - "type": "Identifier", - "value": "from", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 27, "line": 1, }, "start": Object { - "column": 26, + "column": 23, "line": 1, }, }, "range": Array [ - 26, - 31, + 23, + 27, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Identifier", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 33, "line": 1, }, "start": Object { - "column": 31, + "column": 28, "line": 1, }, }, "range": Array [ - 31, - 32, + 28, + 33, ], - "type": "Punctuator", - "value": ";", + "type": "String", + "value": "\\"bar\\"", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/import-default-as.src 1`] = ` +exports[`javascript fixtures/modules/invalid-await.src 1`] = ` Object { "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 35, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, - }, - "range": Array [ - 29, - 34, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "imported": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "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", }, - "name": "default", - "range": Array [ - 8, - 15, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { + "init": null, "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 19, + "column": 11, "line": 1, }, }, - "name": "foo", "range": Array [ - 19, - 22, + 11, + 16, ], - "type": "Identifier", + "type": "VariableDeclarator", }, - "range": Array [ - 8, - 22, - ], - "type": "ImportSpecifier", + ], + "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": 17, + "line": 1, }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, ], - "type": "ImportDeclaration", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "loc": Object { @@ -88421,7 +114806,7 @@ Object { }, "range": Array [ 0, - 36, + 18, ], "sourceType": "module", "tokens": Array [ @@ -88441,12 +114826,12 @@ Object { 6, ], "type": "Keyword", - "value": "import", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "line": 1, }, "start": Object { @@ -88456,33 +114841,33 @@ Object { }, "range": Array [ 7, - 8, + 10, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 16, "line": 1, }, "start": Object { - "column": 8, + "column": 11, "line": 1, }, }, "range": Array [ - 8, - 15, + 11, + 16, ], "type": "Keyword", - "value": "default", + "value": "await", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 17, "line": 1, }, "start": Object { @@ -88492,113 +114877,203 @@ Object { }, "range": Array [ 16, - 18, + 17, ], - "type": "Identifier", - "value": "as", + "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": 23, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 23, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "type": "ExportDefaultDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 22, + "column": 6, "line": 1, }, "start": Object { - "column": 19, + "column": 0, "line": 1, }, }, "range": Array [ - 19, - 22, + 0, + 6, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 14, "line": 1, }, "start": Object { - "column": 22, + "column": 7, "line": 1, }, }, "range": Array [ - 22, - 23, + 7, + 14, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 20, "line": 1, }, "start": Object { - "column": 24, + "column": 15, "line": 1, }, }, "range": Array [ - 24, - 28, + 15, + 20, ], - "type": "Identifier", - "value": "from", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 22, "line": 1, }, "start": Object { - "column": 29, + "column": 21, "line": 1, }, }, "range": Array [ - 29, - 34, + 21, + 22, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 23, "line": 1, }, "start": Object { - "column": 34, + "column": 22, "line": 1, }, }, "range": Array [ - 34, - 35, + 22, + 23, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/import-jquery.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": 22, + "column": 16, "line": 1, }, "start": Object { @@ -88608,65 +115083,65 @@ Object { }, "range": Array [ 0, - 22, + 16, ], - "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", - }, + "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": 8, + "column": 15, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, "local": Object { "loc": Object { "end": Object { - "column": 8, + "column": 15, "line": 1, }, "start": Object { - "column": 7, + "column": 8, "line": 1, }, }, - "name": "$", + "name": "default", "range": Array [ - 7, 8, + 15, ], "type": "Identifier", }, "range": Array [ - 7, 8, + 15, ], - "type": "ImportDefaultSpecifier", + "type": "ExportSpecifier", }, ], - "type": "ImportDeclaration", + "type": "ExportNamedDeclaration", }, ], "loc": Object { @@ -88681,7 +115156,7 @@ Object { }, "range": Array [ 0, - 23, + 17, ], "sourceType": "module", "tokens": Array [ @@ -88701,7 +115176,7 @@ Object { 6, ], "type": "Keyword", - "value": "import", + "value": "export", }, Object { "loc": Object { @@ -88718,57 +115193,69 @@ Object { 7, 8, ], - "type": "Identifier", - "value": "$", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 1, }, "start": Object { - "column": 9, + "column": 8, "line": 1, }, }, "range": Array [ - 9, - 13, + 8, + 15, ], - "type": "Identifier", - "value": "from", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 14, + "column": 15, "line": 1, }, }, "range": Array [ - 14, - 22, + 15, + 16, ], - "type": "String", - "value": "\\"jquery\\"", + "type": "Punctuator", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/import-module.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": 13, + "column": 20, "line": 1, }, "start": Object { @@ -88778,28 +115265,63 @@ Object { }, "range": Array [ 0, - 13, + 20, ], "source": Object { "loc": Object { "end": Object { - "column": 12, + "column": 19, "line": 1, }, "start": Object { - "column": 7, + "column": 16, "line": 1, }, }, + "name": "bar", "range": Array [ - 7, - 12, + 16, + 19, ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", + "type": "Identifier", }, - "specifiers": Array [], + "specifiers": Array [ + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "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, + ], + "type": "ImportDefaultSpecifier", + }, + ], "type": "ImportDeclaration", }, ], @@ -88815,7 +115337,7 @@ Object { }, "range": Array [ 0, - 14, + 21, ], "sourceType": "module", "tokens": Array [ @@ -88840,7 +115362,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 10, "line": 1, }, "start": Object { @@ -88850,25 +115372,61 @@ Object { }, "range": Array [ 7, - 12, + 10, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 1, }, "start": Object { - "column": 12, + "column": 11, "line": 1, }, }, "range": Array [ - 12, - 13, + 11, + 15, + ], + "type": "Identifier", + "value": "from", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 19, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, ], "type": "Punctuator", "value": ";", @@ -88878,13 +115436,16 @@ Object { } `; -exports[`javascript fixtures/modules/import-named-as-specifier.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": 31, + "column": 21, "line": 1, }, "start": Object { @@ -88894,30 +115455,29 @@ Object { }, "range": Array [ 0, - 31, + 21, ], "source": Object { "loc": Object { "end": Object { - "column": 30, + "column": 21, "line": 1, }, "start": Object { - "column": 25, + "column": 18, "line": 1, }, }, + "name": "bar", "range": Array [ - 25, - 30, + 18, + 21, ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", + "type": "Identifier", }, "specifiers": Array [ Object { - "imported": Object { + "exported": Object { "loc": Object { "end": Object { "column": 11, @@ -88928,7 +115488,7 @@ Object { "line": 1, }, }, - "name": "bar", + "name": "foo", "range": Array [ 8, 11, @@ -88937,7 +115497,7 @@ Object { }, "loc": Object { "end": Object { - "column": 18, + "column": 11, "line": 1, }, "start": Object { @@ -88948,29 +115508,29 @@ Object { "local": Object { "loc": Object { "end": Object { - "column": 18, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 8, "line": 1, }, }, - "name": "baz", + "name": "foo", "range": Array [ - 15, - 18, + 8, + 11, ], "type": "Identifier", }, "range": Array [ 8, - 18, + 11, ], - "type": "ImportSpecifier", + "type": "ExportSpecifier", }, ], - "type": "ImportDeclaration", + "type": "ExportNamedDeclaration", }, ], "loc": Object { @@ -88985,7 +115545,7 @@ Object { }, "range": Array [ 0, - 32, + 22, ], "sourceType": "module", "tokens": Array [ @@ -89005,7 +115565,7 @@ Object { 6, ], "type": "Keyword", - "value": "import", + "value": "export", }, Object { "loc": Object { @@ -89041,112 +115601,331 @@ Object { 11, ], "type": "Identifier", - "value": "bar", + "value": "foo", }, 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": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 17, ], "type": "Identifier", - "value": "as", + "value": "from", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 21, "line": 1, }, "start": Object { - "column": 15, + "column": 18, "line": 1, }, }, "range": Array [ - 15, 18, + 21, ], "type": "Identifier", - "value": "baz", + "value": "bar", }, + ], + "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`] = ` +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": 18, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "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 [ + 8, + 18, + ], + "type": "MetaProperty", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 18, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { "column": 19, "line": 1, }, "start": Object { - "column": 18, + "column": 0, "line": 1, }, }, "range": Array [ - 18, + 0, 19, ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 11, "line": 1, }, "start": Object { - "column": 20, + "column": 8, "line": 1, }, }, "range": Array [ - 20, - 24, + 8, + 11, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, ], - "type": "Identifier", - "value": "from", + "type": "Punctuator", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 18, "line": 1, }, "start": Object { - "column": 25, + "column": 12, "line": 1, }, }, "range": Array [ - 25, - 30, + 12, + 18, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Identifier", + "value": "target", }, 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": ";", @@ -89156,152 +115935,174 @@ Object { } `; -exports[`javascript fixtures/modules/import-named-as-specifiers.src 1`] = ` +exports[`javascript fixtures/newTarget/invalid-unknown-property.src 1`] = ` Object { "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 36, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "range": Array [ - 30, - 35, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ + "declarations": Array [ Object { - "imported": Object { + "id": Object { "loc": Object { "end": Object { - "column": 11, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 4, "line": 1, }, }, - "name": "bar", + "name": "f", "range": Array [ - 8, - 11, + 4, + 5, ], "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 15, - "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", }, - "name": "baz", - "range": Array [ - 15, - 18, - ], - "type": "Identifier", - }, - "range": Array [ - 8, - 18, - ], - "type": "ImportSpecifier", - }, - Object { - "imported": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 23, + "column": 44, "line": 1, }, "start": Object { - "column": 20, + "column": 8, "line": 1, }, }, - "name": "xyz", + "params": Array [], "range": Array [ - 20, - 23, + 8, + 44, ], - "type": "Identifier", + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 23, + "column": 44, "line": 1, }, "start": Object { - "column": 20, + "column": 4, "line": 1, }, }, - "local": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "name": "xyz", - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - }, "range": Array [ - 20, - 23, + 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 { @@ -89316,14 +116117,14 @@ Object { }, "range": Array [ 0, - 37, + 45, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 3, "line": 1, }, "start": Object { @@ -89333,33 +116134,51 @@ 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": 11, + "column": 16, "line": 1, }, "start": Object { @@ -89369,28 +116188,28 @@ Object { }, "range": Array [ 8, - 11, + 16, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 17, "line": 1, }, "start": Object { - "column": 12, + "column": 16, "line": 1, }, }, "range": Array [ - 12, - 14, + 16, + 17, ], - "type": "Identifier", - "value": "as", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { @@ -89399,75 +116218,75 @@ Object { "line": 1, }, "start": Object { - "column": 15, + "column": 17, "line": 1, }, }, "range": Array [ - 15, + 17, 18, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 20, "line": 1, }, "start": Object { - "column": 18, + "column": 19, "line": 1, }, }, "range": Array [ - 18, 19, + 20, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 24, "line": 1, }, "start": Object { - "column": 20, + "column": 21, "line": 1, }, }, "range": Array [ - 20, - 23, + 21, + 24, ], - "type": "Identifier", - "value": "xyz", + "type": "Keyword", + "value": "new", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 25, "line": 1, }, "start": Object { - "column": 23, + "column": 24, "line": 1, }, }, "range": Array [ - 23, 24, + 25, ], "type": "Punctuator", - "value": "}", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 41, "line": 1, }, "start": Object { @@ -89477,97 +116296,226 @@ Object { }, "range": Array [ 25, - 29, + 41, ], "type": "Identifier", - "value": "from", + "value": "unknown_property", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 42, "line": 1, }, "start": Object { - "column": 30, + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 43, "line": 1, }, }, - "range": Array [ - 30, - 35, - ], - "type": "String", - "value": "\\"foo\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "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", }, - "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, + "column": 1, + "line": 3, }, "start": Object { "column": 0, "line": 1, }, }, + "params": Array [], "range": Array [ 0, - 21, + 40, ], - "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", + "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -89576,14 +116524,14 @@ Object { }, "range": Array [ 0, - 22, + 41, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 8, "line": 1, }, "start": Object { @@ -89593,51 +116541,33 @@ Object { }, "range": Array [ 0, - 6, + 8, ], "type": "Keyword", - "value": "import", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 10, "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, + 10, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 11, "line": 1, }, "start": Object { @@ -89647,440 +116577,342 @@ Object { }, "range": Array [ 10, - 14, + 11, ], - "type": "Identifier", - "value": "from", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 12, "line": 1, }, "start": Object { - "column": 15, + "column": 11, "line": 1, }, }, "range": Array [ - 15, - 20, + 11, + 12, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 14, "line": 1, }, "start": Object { - "column": 20, + "column": 13, "line": 1, }, }, "range": Array [ - 20, - 21, + 13, + 14, ], "type": "Punctuator", - "value": ";", + "value": "{", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/modules/import-named-specifier.src 1`] = ` -Object { - "body": Array [ Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 0, - 24, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 23, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "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", - }, + 19, + 22, ], - "type": "ImportDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Keyword", + "value": "var", }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 0, - 6, + 23, + 24, ], - "type": "Keyword", - "value": "import", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 7, - 8, + 25, + 26, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 8, - "line": 1, + "column": 12, + "line": 2, }, }, "range": Array [ - 8, - 11, + 27, + 30, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "new", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 11, - 12, + 30, + 31, ], "type": "Punctuator", - "value": "}", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 13, - 17, + 31, + 37, ], "type": "Identifier", - "value": "from", + "value": "target", }, Object { "loc": Object { "end": Object { "column": 23, - "line": 1, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 22, + "line": 2, }, }, "range": Array [ - 18, - 23, + 37, + 38, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 23, - 24, + 39, + 40, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/import-named-specifiers.src 1`] = ` +exports[`javascript fixtures/objectLiteral/object-literal-in-lhs.src 1`] = ` Object { "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 28, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "imported": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, + "expression": Object { + "left": Object { + "computed": false, "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 8, + "column": 0, "line": 1, }, }, - "local": Object { - "loc": Object { - "end": Object { - "column": 11, - "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", }, - "start": Object { - "column": 8, - "line": 1, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, }, + "name": "fn", + "range": Array [ + 0, + 2, + ], + "type": "Identifier", }, - "name": "bar", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "range": Array [ - 8, - 11, - ], - "type": "ImportSpecifier", - }, - Object { - "imported": Object { "loc": Object { "end": Object { - "column": 16, + "column": 6, "line": 1, }, "start": Object { - "column": 13, + "column": 0, "line": 1, }, }, - "name": "baz", "range": Array [ - 13, - 16, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, + 0, + 6, + ], + "type": "CallExpression", }, - "local": Object { + "property": Object { "loc": Object { "end": Object { - "column": 16, + "column": 8, "line": 1, }, "start": Object { - "column": 13, + "column": 7, "line": 1, }, }, - "name": "baz", + "name": "x", "range": Array [ - 13, - 16, + 7, + 8, ], "type": "Identifier", }, "range": Array [ - 13, - 16, + 0, + 8, ], - "type": "ImportSpecifier", + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 14, + ], + "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": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 15, ], - "type": "ImportDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { @@ -90095,14 +116927,14 @@ Object { }, "range": Array [ 0, - 30, + 16, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 2, "line": 1, }, "start": Object { @@ -90112,312 +116944,355 @@ Object { }, "range": Array [ 0, - 6, + 2, ], - "type": "Keyword", - "value": "import", + "type": "Identifier", + "value": "fn", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 3, "line": 1, }, "start": Object { - "column": 7, + "column": 2, "line": 1, }, }, "range": Array [ - 7, - 8, + 2, + 3, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 4, "line": 1, }, "start": Object { - "column": 8, + "column": 3, "line": 1, }, }, "range": Array [ - 8, - 11, + 3, + 4, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 5, "line": 1, }, "start": Object { - "column": 11, + "column": 4, "line": 1, }, }, "range": Array [ - 11, - 12, + 4, + 5, ], "type": "Punctuator", - "value": ",", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 6, "line": 1, }, "start": Object { - "column": 13, + "column": 5, "line": 1, }, }, "range": Array [ - 13, - 16, + 5, + 6, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 7, "line": 1, }, "start": Object { - "column": 16, + "column": 6, "line": 1, }, }, "range": Array [ - 16, - 17, + 6, + 7, ], "type": "Punctuator", - "value": "}", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 8, "line": 1, }, "start": Object { - "column": 18, + "column": 7, "line": 1, }, }, "range": Array [ - 18, - 22, + 7, + 8, ], "type": "Identifier", - "value": "from", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 10, "line": 1, }, "start": Object { - "column": 23, + "column": 9, "line": 1, }, }, "range": Array [ - 23, - 28, + 9, + 10, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 14, "line": 1, }, "start": Object { - "column": 28, + "column": 11, "line": 1, }, }, "range": Array [ - 28, - 29, + 11, + 14, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "obj", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/modules/import-named-specifiers-comma.src 1`] = ` -Object { - "body": Array [ Object { "loc": Object { "end": Object { - "column": 30, + "column": 15, "line": 1, }, "start": Object { - "column": 0, + "column": 14, "line": 1, }, }, "range": Array [ - 0, - 30, + 14, + 15, ], - "source": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 29, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/objectLiteralComputedProperties/computed-addition-property.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ Object { - "imported": Object { + "id": Object { "loc": Object { "end": Object { - "column": 11, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 4, "line": 1, }, }, - "name": "bar", + "name": "x", "range": Array [ - 8, - 11, + 4, + 5, ], "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { + "init": Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 1, + "line": 3, }, "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, + "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", + }, }, - }, - "name": "baz", + ], "range": Array [ - 13, - 16, + 8, + 28, ], - "type": "Identifier", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 13, + "column": 4, "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, + 4, + 28, ], - "type": "ImportSpecifier", + "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, @@ -90426,14 +117301,14 @@ Object { }, "range": Array [ 0, - 31, + 30, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 3, "line": 1, }, "start": Object { @@ -90443,33 +117318,51 @@ 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": "x", + }, + 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": 11, + "column": 9, "line": 1, }, "start": Object { @@ -90479,133 +117372,169 @@ Object { }, "range": Array [ 8, - 11, + 9, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 11, - 12, + 14, + 15, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Numeric", + "value": "5", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, ], "type": "Punctuator", - "value": ",", + "value": "+", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ - 13, - 16, + 19, + 20, ], - "type": "Identifier", - "value": "baz", + "type": "Numeric", + "value": "5", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 16, - 17, + 20, + 21, ], "type": "Punctuator", - "value": ",", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 17, - 18, + 21, + 22, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 19, 23, + 26, ], "type": "Identifier", - "value": "from", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 24, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 24, - 29, + 27, + 28, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { - "column": 29, - "line": 1, + "column": 1, + "line": 3, }, }, "range": Array [ + 28, 29, - 30, ], "type": "Punctuator", "value": ";", @@ -90615,87 +117544,166 @@ Object { } `; -exports[`javascript fixtures/modules/import-namespace-specifier.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/computed-and-identifier.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 { + "expression": Object { "loc": Object { "end": Object { - "column": 26, + "column": 17, "line": 1, }, "start": Object { - "column": 21, + "column": 1, "line": 1, }, }, - "range": Array [ - 21, - 26, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 15, - "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", }, - "start": Object { - "column": 7, - "line": 1, + "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, }, }, - "local": Object { + 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": 15, + "column": 16, "line": 1, }, "start": Object { - "column": 12, + "column": 11, "line": 1, }, }, - "name": "foo", + "method": false, "range": Array [ - 12, - 15, + 11, + 16, ], - "type": "Identifier", + "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 [ - 7, - 15, - ], - "type": "ImportNamespaceSpecifier", + ], + "range": Array [ + 1, + 17, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 19, ], - "type": "ImportDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { "column": 0, @@ -90704,14 +117712,14 @@ Object { }, "range": Array [ 0, - 28, + 19, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 1, "line": 1, }, "start": Object { @@ -90721,270 +117729,154 @@ Object { }, "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, + 1, ], "type": "Punctuator", - "value": "*", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 2, "line": 1, }, "start": Object { - "column": 9, + "column": 1, "line": 1, }, }, "range": Array [ - 9, - 11, + 1, + 2, ], - "type": "Identifier", - "value": "as", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 3, "line": 1, }, "start": Object { - "column": 12, + "column": 2, "line": 1, }, }, "range": Array [ - 12, - 15, + 2, + 3, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 4, "line": 1, }, "start": Object { - "column": 16, + "column": 3, "line": 1, }, }, "range": Array [ - 16, - 20, + 3, + 4, ], "type": "Identifier", - "value": "from", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 5, "line": 1, }, "start": Object { - "column": 21, + "column": 4, "line": 1, }, }, "range": Array [ - 21, - 26, + 4, + 5, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 6, "line": 1, }, "start": Object { - "column": 26, + "column": 5, "line": 1, }, }, "range": Array [ - 26, - 27, + 5, + 6, ], "type": "Punctuator", - "value": ";", + "value": ":", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/modules/import-null-as-nil.src 1`] = ` -Object { - "body": Array [ Object { "loc": Object { "end": Object { - "column": 33, + "column": 9, "line": 1, }, "start": Object { - "column": 0, + "column": 7, "line": 1, }, }, "range": Array [ - 0, - 33, - ], - "source": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 33, - ], - "raw": "\\"bar\\"", - "type": "Literal", - "value": "bar", - }, - "specifiers": Array [ - Object { - "imported": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "null", - "range": Array [ - 9, - 13, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "local": Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "name": "nil", - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - }, - "range": Array [ - 9, - 20, - ], - "type": "ImportSpecifier", - }, + 7, + 9, ], - "type": "ImportDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Numeric", + "value": "10", }, - }, - "range": Array [ - 0, - 34, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 10, "line": 1, }, "start": Object { - "column": 0, + "column": 9, "line": 1, }, }, "range": Array [ - 0, - 6, + 9, + 10, ], - "type": "Keyword", - "value": "import", + "type": "Punctuator", + "value": ",", }, 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": "{", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { @@ -90993,16 +117885,16 @@ Object { "line": 1, }, "start": Object { - "column": 9, + "column": 12, "line": 1, }, }, "range": Array [ - 9, + 12, 13, ], - "type": "Null", - "value": "null", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { @@ -91018,42 +117910,24 @@ Object { "range": Array [ 14, 16, - ], - "type": "Identifier", - "value": "as", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 20, - ], - "type": "Identifier", - "value": "nil", + ], + "type": "Numeric", + "value": "20", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 17, "line": 1, }, "start": Object { - "column": 21, + "column": 16, "line": 1, }, }, "range": Array [ - 21, - 22, + 16, + 17, ], "type": "Punctuator", "value": "}", @@ -91061,107 +117935,247 @@ Object { Object { "loc": Object { "end": Object { - "column": 27, + "column": 18, "line": 1, }, "start": Object { - "column": 23, + "column": 17, "line": 1, }, }, "range": Array [ - 23, - 27, + 17, + 18, ], - "type": "Identifier", - "value": "from", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 33, + "column": 19, "line": 1, }, "start": Object { - "column": 28, + "column": 18, "line": 1, }, }, "range": Array [ - 28, - 33, + 18, + 19, ], - "type": "String", - "value": "\\"bar\\"", + "type": "Punctuator", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/modules/invalid-await.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/computed-getter-and-setter.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "declarations": Array [ + "expression": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ Object { - "id": Object { + "computed": true, + "key": Object { "loc": Object { "end": Object { - "column": 16, + "column": 8, "line": 1, }, "start": Object { - "column": 11, + "column": 7, "line": 1, }, }, - "name": "await", + "name": "x", "range": Array [ - 11, - 16, + 7, + 8, ], "type": "Identifier", }, - "init": null, + "kind": "get", "loc": Object { "end": Object { - "column": 16, + "column": 14, "line": 1, }, "start": Object { - "column": 11, + "column": 2, "line": 1, }, }, + "method": false, + "range": Array [ + 2, + 14, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 14, + ], + "type": "BlockStatement", + }, + "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": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + "kind": "set", + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "method": false, "range": Array [ - 11, 16, + 29, ], - "type": "VariableDeclarator", + "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", + }, }, ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, "range": Array [ - 7, - 17, + 1, + 30, ], - "type": "VariableDeclaration", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 17, + "column": 32, "line": 1, }, "start": Object { @@ -91171,17 +118185,15 @@ Object { }, "range": Array [ 0, - 17, + 32, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { "column": 0, @@ -91190,14 +118202,14 @@ Object { }, "range": Array [ 0, - 18, + 32, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 1, "line": 1, }, "start": Object { @@ -91207,166 +118219,69 @@ 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": 16, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 16, + 1, ], - "type": "Keyword", - "value": "await", + "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": "{", }, - ], - "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": 23, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 23, - ], - "superClass": null, - "type": "ClassDeclaration", - }, "loc": Object { "end": Object { - "column": 23, + "column": 5, "line": 1, }, "start": Object { - "column": 0, + "column": 2, "line": 1, }, }, "range": Array [ - 0, - 23, + 2, + 5, ], - "type": "ExportDefaultDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "get", }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 7, "line": 1, }, "start": Object { - "column": 0, + "column": 6, "line": 1, }, }, "range": Array [ - 0, 6, + 7, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { @@ -91376,209 +118291,100 @@ Object { }, "range": Array [ 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, + 8, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 9, "line": 1, }, "start": Object { - "column": 21, + "column": 8, "line": 1, }, }, "range": Array [ - 21, - 22, + 8, + 9, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 10, "line": 1, }, "start": Object { - "column": 22, + "column": 9, "line": 1, }, }, "range": Array [ - 22, - 23, + 9, + 10, ], "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": 11, "line": 1, }, "start": Object { - "column": 0, + "column": 10, "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", - }, + 10, + 11, ], - "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": 13, "line": 1, }, "start": Object { - "column": 0, + "column": 12, "line": 1, }, }, "range": Array [ - 0, - 6, + 12, + 13, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": "{", }, 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 { @@ -91587,340 +118393,378 @@ Object { "line": 1, }, "start": Object { - "column": 8, + "column": 14, "line": 1, }, }, "range": Array [ - 8, + 14, 15, ], - "type": "Keyword", - "value": "default", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 19, "line": 1, }, "start": Object { - "column": 15, + "column": 16, "line": 1, }, }, "range": Array [ - 15, 16, + 19, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "set", }, - ], - "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`] = ` -Object { - "body": Array [ Object { "loc": Object { "end": Object { - "column": 20, + "column": 21, "line": 1, }, "start": Object { - "column": 0, + "column": 20, "line": 1, }, }, "range": Array [ - 0, 20, + 21, ], - "source": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, }, - "name": "bar", - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - }, - "specifiers": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 7, - "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, - ], - "type": "ImportDefaultSpecifier", + "start": Object { + "column": 21, + "line": 1, }, + }, + "range": Array [ + 21, + 22, ], - "type": "ImportDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, + "type": "Identifier", + "value": "x", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "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": 24, "line": 1, }, "start": Object { - "column": 0, + "column": 23, "line": 1, }, }, "range": Array [ - 0, - 6, + 23, + 24, ], - "type": "Keyword", - "value": "import", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 25, "line": 1, }, "start": Object { - "column": 7, + "column": 24, "line": 1, }, }, "range": Array [ - 7, - 10, + 24, + 25, ], "type": "Identifier", - "value": "foo", + "value": "v", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 26, "line": 1, }, "start": Object { - "column": 11, + "column": 25, "line": 1, }, }, "range": Array [ - 11, - 15, + 25, + 26, ], - "type": "Identifier", - "value": "from", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 28, "line": 1, }, "start": Object { - "column": 16, + "column": 27, "line": 1, }, }, "range": Array [ - 16, - 19, + 27, + 28, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 29, "line": 1, }, "start": Object { - "column": 19, + "column": 28, "line": 1, }, }, "range": Array [ - 19, - 20, + 28, + 29, ], "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, + "column": 30, "line": 1, }, "start": Object { - "column": 0, + "column": 29, "line": 1, }, }, "range": Array [ - 0, - 21, + 29, + 30, ], - "source": Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, }, - "name": "bar", - "range": Array [ - 18, - 21, - ], - "type": "Identifier", }, - "specifiers": Array [ + "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 { - "exported": Object { + "id": Object { "loc": Object { "end": Object { - "column": 11, + "column": 5, "line": 1, }, "start": Object { - "column": 8, + "column": 4, "line": 1, }, }, - "name": "foo", + "name": "x", "range": Array [ - 8, - 11, + 4, + 5, ], "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "local": Object { + "init": Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 8, "line": 1, }, }, - "name": "foo", + "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 [ 8, - 11, + 28, ], - "type": "Identifier", + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, "range": Array [ - 8, - 11, + 4, + 28, ], - "type": "ExportSpecifier", + "type": "VariableDeclarator", }, ], - "type": "ExportNamedDeclaration", + "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, @@ -91929,138 +118773,214 @@ Object { }, "range": Array [ 0, - 22, + 30, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, "line": 1, }, "start": Object { - "column": 0, + "column": 8, "line": 1, }, }, "range": Array [ - 0, - 6, + 8, + 9, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 7, - 8, + 14, + 15, ], "type": "Punctuator", - "value": "{", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 20, + ], + "type": "String", + "value": "\\"hey\\"", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 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-variable-property.src 1`] = ` Object { "body": Array [ Object { @@ -92087,60 +119007,83 @@ Object { "init": Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 8, "line": 1, }, }, - "meta": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "properties": Array [ + Object { + "computed": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 15, + 18, + ], + "type": "Identifier", }, - }, - "name": "new", - "range": Array [ - 8, - 11, - ], - "type": "Identifier", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, }, - "start": Object { - "column": 12, - "line": 1, + "method": false, + "range": Array [ + 14, + 24, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "foo", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", }, }, - "name": "target", - "range": Array [ - 12, - 18, - ], - "type": "Identifier", - }, + ], "range": Array [ 8, - 18, + 26, ], - "type": "MetaProperty", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 4, @@ -92149,7 +119092,7 @@ Object { }, "range": Array [ 4, - 18, + 26, ], "type": "VariableDeclarator", }, @@ -92157,8 +119100,8 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { "column": 0, @@ -92167,7 +119110,7 @@ Object { }, "range": Array [ 0, - 19, + 27, ], "type": "VariableDeclaration", }, @@ -92175,7 +119118,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -92184,7 +119127,7 @@ Object { }, "range": Array [ 0, - 20, + 28, ], "sourceType": "script", "tokens": Array [ @@ -92245,7 +119188,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 9, "line": 1, }, "start": Object { @@ -92255,56 +119198,56 @@ Object { }, "range": Array [ 8, - 11, + 9, ], - "type": "Keyword", - "value": "new", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 11, - 12, + 14, + 15, ], "type": "Punctuator", - "value": ".", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 5, + "line": 2, }, }, "range": Array [ - 12, + 15, 18, ], "type": "Identifier", - "value": "target", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ @@ -92312,6 +119255,78 @@ Object { 19, ], "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 1, + "line": 3, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", "value": ";", }, ], @@ -92319,162 +119334,94 @@ Object { } `; -exports[`javascript fixtures/newTarget/invalid-unknown-property.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 { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "name": "f", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", + "expression": Object { + "loc": Object { + "end": Object { + "column": 10, + "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", - }, - ], + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": true, + "key": Object { "loc": Object { "end": Object { - "column": 44, + "column": 4, "line": 1, }, "start": Object { - "column": 19, + "column": 3, "line": 1, }, }, + "name": "x", "range": Array [ - 19, - 44, + 3, + 4, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, + "kind": "init", "loc": Object { "end": Object { - "column": 44, + "column": 9, "line": 1, }, "start": Object { - "column": 8, + "column": 2, "line": 1, }, }, - "params": Array [], + "method": false, "range": Array [ - 8, - 44, + 2, + 9, ], - "type": "FunctionExpression", - }, - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, + "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 [ - 4, - 44, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", + ], + "range": Array [ + 1, + 10, + ], + "type": "ObjectExpression", + }, "loc": Object { "end": Object { - "column": 44, + "column": 12, "line": 1, }, "start": Object { @@ -92484,9 +119431,9 @@ Object { }, "range": Array [ 0, - 44, + 12, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { @@ -92501,14 +119448,14 @@ Object { }, "range": Array [ 0, - 45, + 13, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -92518,388 +119465,318 @@ 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": "f", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 2, "line": 1, }, "start": Object { - "column": 6, + "column": 1, "line": 1, }, }, "range": Array [ - 6, - 7, + 1, + 2, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 3, "line": 1, }, "start": Object { - "column": 8, + "column": 2, "line": 1, }, }, "range": Array [ - 8, - 16, + 2, + 3, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 4, "line": 1, }, "start": Object { - "column": 16, + "column": 3, "line": 1, }, }, "range": Array [ - 16, - 17, + 3, + 4, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 5, "line": 1, }, "start": Object { - "column": 17, + "column": 4, "line": 1, }, }, "range": Array [ - 17, - 18, + 4, + 5, ], "type": "Punctuator", - "value": ")", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 6, "line": 1, }, "start": Object { - "column": 19, + "column": 5, "line": 1, }, }, "range": Array [ - 19, - 20, + 5, + 6, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 9, "line": 1, }, "start": Object { - "column": 21, + "column": 7, "line": 1, }, }, "range": Array [ - 21, - 24, + 7, + 9, ], - "type": "Keyword", - "value": "new", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 10, "line": 1, }, "start": Object { - "column": 24, + "column": 9, "line": 1, }, }, "range": Array [ - 24, - 25, + 9, + 10, ], "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 41, - ], - "type": "Identifier", - "value": "unknown_property", + "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": 12, "line": 1, }, "start": Object { - "column": 43, + "column": 11, "line": 1, }, }, "range": Array [ - 43, - 44, + 11, + 12, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/newTarget/simple-new-target.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/standalone-expression-with-addition.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ + "expression": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": 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", + "computed": true, + "key": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, }, - "property": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "target", - "range": Array [ - 31, - 37, - ], - "type": "Identifier", + "start": Object { + "column": 3, + "line": 1, }, - "range": Array [ - 27, - 37, - ], - "type": "MetaProperty", }, + "range": Array [ + 3, + 6, + ], + "raw": "\\"x\\"", + "type": "Literal", + "value": "x", + }, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "operator": "+", + "range": Array [ + 3, + 12, + ], + "right": Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 23, - 37, + 9, + 12, ], - "type": "VariableDeclarator", + "raw": "\\"y\\"", + "type": "Literal", + "value": "y", }, - ], - "kind": "var", + "type": "BinaryExpression", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 2, + "line": 1, }, }, + "method": false, "range": Array [ - 19, - 38, + 2, + 17, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 1, + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 17, + ], + "raw": "10", + "type": "Literal", + "value": 10, + }, }, - }, - "range": Array [ - 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, + 1, + 18, ], - "type": "Identifier", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [], "range": Array [ 0, - 40, + 20, ], - "type": "FunctionDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -92908,14 +119785,14 @@ Object { }, "range": Array [ 0, - 41, + 21, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 1, "line": 1, }, "start": Object { @@ -92925,366 +119802,319 @@ Object { }, "range": Array [ 0, - 8, + 1, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 2, "line": 1, }, "start": Object { - "column": 9, + "column": 1, "line": 1, }, }, "range": Array [ - 9, - 10, + 1, + 2, ], - "type": "Identifier", - "value": "f", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 3, "line": 1, }, "start": Object { - "column": 10, + "column": 2, "line": 1, }, }, "range": Array [ - 10, - 11, + 2, + 3, ], "type": "Punctuator", - "value": "(", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 6, "line": 1, }, "start": Object { - "column": 11, + "column": 3, "line": 1, }, }, "range": Array [ - 11, - 12, + 3, + 6, ], - "type": "Punctuator", - "value": ")", + "type": "String", + "value": "\\"x\\"", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 8, "line": 1, }, "start": Object { - "column": 13, + "column": 7, "line": 1, }, }, "range": Array [ - 13, - 14, + 7, + 8, ], "type": "Punctuator", - "value": "{", + "value": "+", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 12, + "line": 1, }, "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, + "line": 1, }, }, "range": Array [ - 23, - 24, + 9, + 12, ], - "type": "Identifier", - "value": "x", + "type": "String", + "value": "\\"y\\"", }, 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 [ - 25, - 26, + 12, + 13, ], "type": "Punctuator", - "value": "=", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 27, - 30, + 13, + 14, ], - "type": "Keyword", - "value": "new", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { "column": 15, - "line": 2, + "line": 1, }, }, "range": Array [ - 30, - 31, + 15, + 17, ], - "type": "Punctuator", - "value": ".", + "type": "Numeric", + "value": "10", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 31, - 37, + 17, + 18, ], - "type": "Identifier", - "value": "target", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 37, - 38, + 18, + 19, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 20, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 19, + "line": 1, }, }, "range": Array [ - 39, - 40, + 19, + 20, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/objectLiteral/object-literal-in-lhs.src 1`] = ` +exports[`javascript fixtures/objectLiteralComputedProperties/standalone-expression-with-method.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, - }, + "loc": Object { + "end": Object { + "column": 21, + "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 { + "start": Object { + "column": 1, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": true, + "key": Object { "loc": Object { "end": Object { - "column": 2, + "column": 4, "line": 1, }, "start": Object { - "column": 0, + "column": 3, "line": 1, }, }, - "name": "fn", + "name": "x", "range": Array [ - 0, - 2, + 3, + 4, ], "type": "Identifier", }, + "kind": "init", "loc": Object { "end": Object { - "column": 6, + "column": 20, "line": 1, }, "start": Object { - "column": 0, + "column": 2, "line": 1, }, }, + "method": false, "range": Array [ - 0, - 6, + 2, + 20, ], - "type": "CallExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, + "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", }, - "start": Object { - "column": 7, - "line": 1, + "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", }, - "name": "x", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", - }, - "range": Array [ - 0, - 8, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, }, - }, - "operator": "=", + ], "range": Array [ - 0, - 14, + 1, + 21, ], - "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", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 15, + "column": 23, "line": 1, }, "start": Object { @@ -93294,7 +120124,7 @@ Object { }, "range": Array [ 0, - 15, + 23, ], "type": "ExpressionStatement", }, @@ -93311,14 +120141,14 @@ Object { }, "range": Array [ 0, - 16, + 24, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 2, + "column": 1, "line": 1, }, "start": Object { @@ -93328,10 +120158,28 @@ 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, ], - "type": "Identifier", - "value": "fn", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -93349,7 +120197,7 @@ Object { 3, ], "type": "Punctuator", - "value": "(", + "value": "[", }, Object { "loc": Object { @@ -93366,8 +120214,8 @@ Object { 3, 4, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -93385,7 +120233,7 @@ Object { 5, ], "type": "Punctuator", - "value": "}", + "value": "]", }, Object { "loc": Object { @@ -93403,94 +120251,148 @@ Object { 6, ], "type": "Punctuator", - "value": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 15, "line": 1, }, "start": Object { - "column": 6, + "column": 7, "line": 1, }, }, "range": Array [ - 6, 7, + 15, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, ], "type": "Punctuator", - "value": ".", + "value": "(", }, 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": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ")", }, 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": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 20, "line": 1, }, "start": Object { - "column": 11, + "column": 19, "line": 1, }, }, "range": Array [ - 11, - 14, + 19, + 20, ], - "type": "Identifier", - "value": "obj", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 21, "line": 1, }, "start": Object { - "column": 14, + "column": 20, "line": 1, }, }, "range": Array [ - 14, - 15, + 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": ";", @@ -93500,9 +120402,119 @@ Object { } `; -exports[`javascript fixtures/objectLiteralComputedProperties/computed-addition-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 { @@ -93510,17 +120522,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", }, @@ -93528,129 +120540,148 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 8, }, "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, - }, + "line": 5, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 6, }, - "range": Array [ - 15, - 16, - ], - "raw": "5", - "type": "Literal", - "value": 5, + "start": Object { + "column": 1, + "line": 6, + }, + }, + "name": "__proto__", + "range": Array [ + 43, + 52, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 17, + "line": 6, + }, + "start": Object { + "column": 1, + "line": 6, }, + }, + "method": false, + "range": Array [ + 43, + 59, + ], + "shorthand": false, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 17, + "line": 6, }, "start": Object { - "column": 5, - "line": 2, + "column": 12, + "line": 6, }, }, - "operator": "+", + "name": "proto", "range": Array [ - 15, - 20, + 54, + 59, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 7, + }, + "start": Object { + "column": 1, + "line": 7, }, - "range": Array [ - 19, - 20, - ], - "raw": "5", - "type": "Literal", - "value": 5, }, - "type": "BinaryExpression", + "name": "__proto__", + "range": Array [ + 62, + 71, + ], + "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 17, + "line": 7, }, "start": Object { - "column": 4, - "line": 2, + "column": 1, + "line": 7, }, }, "method": false, "range": Array [ - 14, - 26, + 62, + 78, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 17, + "line": 7, }, "start": Object { - "column": 13, - "line": 2, + "column": 12, + "line": 7, }, }, - "name": "foo", + "name": "proto", "range": Array [ - 23, - 26, + 73, + 78, ], "type": "Identifier", }, }, ], "range": Array [ - 8, - 28, + 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, - 28, + 36, + 80, ], "type": "VariableDeclarator", }, @@ -93659,24 +120690,24 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 3, + "line": 8, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, - 29, + 32, + 81, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 4, + "column": 2, + "line": 8, }, "start": Object { "column": 0, @@ -93685,14 +120716,14 @@ Object { }, "range": Array [ 0, - 30, + 81, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 12, "line": 1, }, "start": Object { @@ -93702,199 +120733,91 @@ 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", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 7, + 12, ], - "type": "Punctuator", - "value": "=", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 13, "line": 1, }, "start": Object { - "column": 8, + "column": 12, "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, + 12, + 13, ], "type": "Punctuator", - "value": "[", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 3, + "line": 3, }, "start": Object { - "column": 5, - "line": 2, + "column": 0, + "line": 3, }, }, "range": Array [ 15, - 16, - ], - "type": "Numeric", - "value": "5", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 17, 18, ], - "type": "Punctuator", - "value": "+", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 9, + "line": 3, }, "start": Object { - "column": 9, - "line": 2, + "column": 4, + "line": 3, }, }, "range": Array [ 19, - 20, + 24, ], - "type": "Numeric", - "value": "5", + "type": "Identifier", + "value": "proto", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 2, + "line": 3, }, "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, + "line": 3, }, }, "range": Array [ - 21, - 22, + 25, + 26, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { "column": 13, - "line": 2, - }, - }, - "range": Array [ - 23, - 26, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, "line": 3, }, "start": Object { - "column": 0, + "column": 12, "line": 3, }, }, @@ -93903,271 +120826,76 @@ Object { 28, ], "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/objectLiteralComputedProperties/computed-and-identifier.src 1`] = ` -Object { - "body": Array [ - Object { - "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", - }, - "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, - }, - }, - 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, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 19, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "value": "{", }, - }, - "range": Array [ - 0, - 19, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 1, + "column": 14, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 13, + "line": 3, }, }, "range": Array [ - 0, - 1, + 28, + 29, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 1, + "column": 15, + "line": 3, }, "start": Object { - "column": 1, - "line": 1, + "column": 14, + "line": 3, }, }, "range": Array [ - 1, - 2, + 29, + 30, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 3, - "line": 1, + "line": 5, }, "start": Object { - "column": 2, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 2, - 3, + 32, + 35, ], - "type": "Punctuator", - "value": "[", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 3, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 3, - 4, + 36, + 37, ], "type": "Identifier", "value": "x", @@ -94175,179 +120903,197 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 7, + "line": 5, }, "start": Object { - "column": 4, - "line": 1, + "column": 6, + "line": 5, }, }, "range": Array [ - 4, - 5, + 38, + 39, ], "type": "Punctuator", - "value": "]", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 9, + "line": 5, }, "start": Object { - "column": 5, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 5, - 6, + 40, + 41, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 10, + "line": 6, }, "start": Object { - "column": 7, - "line": 1, + "column": 1, + "line": 6, }, }, "range": Array [ - 7, - 9, + 43, + 52, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "__proto__", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 11, + "line": 6, }, "start": Object { - "column": 9, - "line": 1, + "column": 10, + "line": 6, }, }, "range": Array [ - 9, - 10, + 52, + 53, ], "type": "Punctuator", - "value": ",", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 17, + "line": 6, }, "start": Object { - "column": 11, - "line": 1, + "column": 12, + "line": 6, }, }, "range": Array [ - 11, - 12, + 54, + 59, ], "type": "Identifier", - "value": "y", + "value": "proto", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 18, + "line": 6, }, "start": Object { - "column": 12, - "line": 1, + "column": 17, + "line": 6, }, }, "range": Array [ - 12, - 13, + 59, + 60, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 10, + "line": 7, }, "start": Object { - "column": 14, - "line": 1, + "column": 1, + "line": 7, }, }, "range": Array [ - 14, - 16, + 62, + 71, ], - "type": "Numeric", - "value": "20", + "type": "Identifier", + "value": "__proto__", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 11, + "line": 7, }, "start": Object { - "column": 16, - "line": 1, + "column": 10, + "line": 7, }, }, "range": Array [ - 16, - 17, + 71, + 72, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 17, + "line": 7, }, "start": Object { - "column": 17, - "line": 1, + "column": 12, + "line": 7, }, }, "range": Array [ - 17, - 18, + 73, + 78, + ], + "type": "Identifier", + "value": "proto", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 8, + }, + }, + "range": Array [ + 79, + 80, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 2, + "line": 8, }, "start": Object { - "column": 18, - "line": 1, + "column": 1, + "line": 8, }, }, "range": Array [ - 18, - 19, + 80, + 81, ], "type": "Punctuator", "value": ";", @@ -94357,227 +121103,314 @@ Object { } `; -exports[`javascript fixtures/objectLiteralComputedProperties/computed-getter-and-setter.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": 30, + "column": 12, "line": 1, }, "start": Object { - "column": 1, + "column": 0, "line": 1, }, }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "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": "x", - "range": Array [ - 7, - 8, - ], - "type": "Identifier", }, - "kind": "get", + "name": "proto", + "range": Array [ + 19, + 24, + ], + "type": "Identifier", + }, + "init": Object { "loc": Object { "end": Object { "column": 14, - "line": 1, + "line": 3, }, "start": Object { - "column": 2, - "line": 1, + "column": 12, + "line": 3, }, }, - "method": false, + "properties": Array [], "range": Array [ - 2, - 14, + 27, + 29, ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "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": 14, - "line": 1, + "column": 19, + "line": 6, }, "start": Object { - "column": 12, - "line": 1, + "column": 1, + "line": 6, }, }, + "method": false, "range": Array [ - 12, - 14, + 43, + 61, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "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", }, }, - "params": Array [], - "range": Array [ - 9, - 14, - ], - "type": "FunctionExpression", - }, - }, - Object { - "computed": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, + 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__", }, - }, - "name": "x", - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "method": false, - "range": Array [ - 16, - 29, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "kind": "init", "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 19, + "line": 7, }, "start": Object { - "column": 27, - "line": 1, + "column": 1, + "line": 7, }, }, + "method": false, "range": Array [ - 27, - 29, + 64, + 82, ], - "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 { + "shorthand": false, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 19, + "line": 7, }, "start": Object { - "column": 24, - "line": 1, + "column": 14, + "line": 7, }, }, - "name": "v", + "name": "proto", "range": Array [ - 24, - 25, + 77, + 82, ], "type": "Identifier", }, - ], - "range": Array [ - 23, - 29, - ], - "type": "FunctionExpression", + }, + ], + "range": Array [ + 40, + 84, + ], + "type": "ObjectExpression", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 5, }, }, - ], - "range": Array [ - 1, - 30, - ], - "type": "ObjectExpression", - }, + "range": Array [ + 36, + 84, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 2, + "line": 8, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, 32, + 85, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 2, + "line": 8, }, "start": Object { "column": 0, @@ -94586,14 +121419,14 @@ Object { }, "range": Array [ 0, - 32, + 85, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 12, "line": 1, }, "start": Object { @@ -94603,367 +121436,349 @@ Object { }, "range": Array [ 0, - 1, + 12, ], - "type": "Punctuator", - "value": "(", + "type": "String", + "value": "\\"use strict\\"", }, 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": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, - }, - "range": Array [ - 2, - 5, - ], - "type": "Identifier", - "value": "get", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 3, + "line": 3, }, "start": Object { - "column": 6, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 6, - 7, + 15, + 18, ], - "type": "Punctuator", - "value": "[", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 9, + "line": 3, }, "start": Object { - "column": 7, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 7, - 8, + 19, + 24, ], "type": "Identifier", - "value": "x", + "value": "proto", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { - "column": 8, - "line": 1, + "column": 10, + "line": 3, }, }, "range": Array [ - 8, - 9, + 25, + 26, ], "type": "Punctuator", - "value": "]", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 13, + "line": 3, }, "start": Object { - "column": 9, - "line": 1, + "column": 12, + "line": 3, }, }, "range": Array [ - 9, - 10, + 27, + 28, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 14, + "line": 3, }, "start": Object { - "column": 10, - "line": 1, + "column": 13, + "line": 3, }, }, "range": Array [ - 10, - 11, + 28, + 29, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 15, + "line": 3, }, "start": Object { - "column": 12, - "line": 1, + "column": 14, + "line": 3, }, }, "range": Array [ - 12, - 13, + 29, + 30, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { - "column": 13, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 13, - 14, + 32, + 35, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 14, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 14, - 15, + 36, + 37, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 7, + "line": 5, }, "start": Object { - "column": 16, - "line": 1, + "column": 6, + "line": 5, }, }, "range": Array [ - 16, - 19, + 38, + 39, ], - "type": "Identifier", - "value": "set", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 9, + "line": 5, }, "start": Object { - "column": 20, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 20, - 21, + 40, + 41, ], "type": "Punctuator", - "value": "[", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 12, + "line": 6, }, "start": Object { - "column": 21, - "line": 1, + "column": 1, + "line": 6, }, }, "range": Array [ - 21, - 22, + 43, + 54, ], - "type": "Identifier", - "value": "x", + "type": "String", + "value": "\\"__proto__\\"", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 13, + "line": 6, }, "start": Object { - "column": 22, - "line": 1, + "column": 12, + "line": 6, }, }, "range": Array [ - 22, - 23, + 54, + 55, ], "type": "Punctuator", - "value": "]", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 19, + "line": 6, }, "start": Object { - "column": 23, - "line": 1, + "column": 14, + "line": 6, }, }, "range": Array [ - 23, - 24, + 56, + 61, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "proto", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 20, + "line": 6, }, "start": Object { - "column": 24, - "line": 1, + "column": 19, + "line": 6, }, }, "range": Array [ - 24, - 25, + 61, + 62, ], - "type": "Identifier", - "value": "v", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 12, + "line": 7, }, "start": Object { - "column": 25, - "line": 1, + "column": 1, + "line": 7, }, }, "range": Array [ - 25, - 26, + 64, + 75, ], - "type": "Punctuator", - "value": ")", + "type": "String", + "value": "\\"__proto__\\"", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 13, + "line": 7, }, "start": Object { - "column": 27, - "line": 1, + "column": 12, + "line": 7, }, }, "range": Array [ - 27, - 28, + 75, + 76, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 19, + "line": 7, }, "start": Object { - "column": 28, - "line": 1, + "column": 14, + "line": 7, }, }, "range": Array [ - 28, - 29, + 77, + 82, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "proto", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 1, + "line": 8, }, "start": Object { - "column": 29, - "line": 1, + "column": 0, + "line": 8, }, }, "range": Array [ - 29, - 30, + 83, + 84, ], "type": "Punctuator", "value": "}", @@ -94971,47 +121786,66 @@ Object { Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 2, + "line": 8, }, "start": Object { - "column": 30, - "line": 1, + "column": 1, + "line": 8, }, }, "range": Array [ - 30, - 31, + 84, + 85, ], "type": "Punctuator", - "value": ")", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/objectLiteralDuplicateProperties/strict-duplicate-properties.src 1`] = ` +Object { + "body": Array [ Object { + "directive": "use strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 12, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, "loc": Object { "end": Object { - "column": 32, + "column": 13, "line": 1, }, "start": Object { - "column": 31, + "column": 0, "line": 1, }, }, "range": Array [ - 31, - 32, + 0, + 13, ], - "type": "Punctuator", - "value": ";", + "type": "ExpressionStatement", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/objectLiteralComputedProperties/computed-string-property.src 1`] = ` -Object { - "body": Array [ Object { "declarations": Array [ Object { @@ -95019,17 +121853,17 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 3, }, "start": Object { "column": 4, - "line": 1, + "line": 3, }, }, "name": "x", "range": Array [ - 4, - 5, + 19, + 20, ], "type": "Identifier", }, @@ -95037,92 +121871,150 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 6, }, "start": Object { "column": 8, - "line": 1, + "line": 3, + }, + }, + "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", + "loc": Object { + "end": Object { + "column": 11, + "line": 4, + }, + "start": Object { + "column": 1, + "line": 4, + }, + }, + "method": false, + "range": Array [ + 26, + 36, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 29, + 36, + ], + "raw": "'first'", + "type": "Literal", + "value": "first", + }, }, - }, - "properties": Array [ Object { - "computed": true, + "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 2, + "line": 5, }, "start": Object { - "column": 5, - "line": 2, + "column": 1, + "line": 5, }, }, + "name": "y", "range": Array [ - 15, - 20, + 39, + 40, ], - "raw": "\\"hey\\"", - "type": "Literal", - "value": "hey", + "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 12, + "line": 5, }, "start": Object { - "column": 4, - "line": 2, + "column": 1, + "line": 5, }, }, "method": false, "range": Array [ - 14, - 26, + 39, + 50, ], "shorthand": false, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 12, + "line": 5, }, "start": Object { - "column": 13, - "line": 2, + "column": 4, + "line": 5, }, }, - "name": "foo", "range": Array [ - 23, - 26, + 42, + 50, ], - "type": "Identifier", + "raw": "'second'", + "type": "Literal", + "value": "second", }, }, ], "range": Array [ - 8, - 28, + 23, + 52, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 6, }, "start": Object { "column": 4, - "line": 1, + "line": 3, }, }, "range": Array [ - 4, - 28, + 19, + 52, ], "type": "VariableDeclarator", }, @@ -95131,24 +122023,24 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 3, + "line": 6, }, "start": Object { "column": 0, - "line": 1, + "line": 3, }, }, "range": Array [ - 0, - 29, + 15, + 53, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 4, + "column": 2, + "line": 6, }, "start": Object { "column": 0, @@ -95157,14 +122049,14 @@ Object { }, "range": Array [ 0, - 30, + 53, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 12, "line": 1, }, "start": Object { @@ -95174,7 +122066,43 @@ Object { }, "range": Array [ 0, - 3, + 12, + ], + "type": "String", + "value": "\\"use strict\\"", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 15, + 18, ], "type": "Keyword", "value": "var", @@ -95183,16 +122111,16 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 3, }, "start": Object { "column": 4, - "line": 1, + "line": 3, }, }, "range": Array [ - 4, - 5, + 19, + 20, ], "type": "Identifier", "value": "x", @@ -95201,16 +122129,16 @@ Object { "loc": Object { "end": Object { "column": 7, - "line": 1, + "line": 3, }, "start": Object { "column": 6, - "line": 1, + "line": 3, }, }, "range": Array [ - 6, - 7, + 21, + 22, ], "type": "Punctuator", "value": "=", @@ -95219,16 +122147,16 @@ Object { "loc": Object { "end": Object { "column": 9, - "line": 1, + "line": 3, }, "start": Object { "column": 8, - "line": 1, + "line": 3, }, }, "range": Array [ - 8, - 9, + 23, + 24, ], "type": "Punctuator", "value": "{", @@ -95236,107 +122164,143 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 2, + "line": 4, }, "start": Object { - "column": 4, - "line": 2, + "column": 1, + "line": 4, }, }, "range": Array [ - 14, - 15, + 26, + 27, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 3, + "line": 4, }, "start": Object { - "column": 5, - "line": 2, + "column": 2, + "line": 4, }, }, "range": Array [ - 15, - 20, + 27, + 28, ], - "type": "String", - "value": "\\"hey\\"", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 2, + "line": 4, }, "start": Object { - "column": 10, - "line": 2, + "column": 4, + "line": 4, }, }, "range": Array [ - 20, - 21, + 29, + 36, ], - "type": "Punctuator", - "value": "]", + "type": "String", + "value": "'first'", }, Object { "loc": Object { "end": Object { "column": 12, - "line": 2, + "line": 4, }, "start": Object { "column": 11, - "line": 2, + "line": 4, }, }, "range": Array [ - 21, - 22, + 36, + 37, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 2, + "line": 5, }, "start": Object { - "column": 13, - "line": 2, + "column": 1, + "line": 5, }, }, "range": Array [ - 23, - 26, + 39, + 40, ], "type": "Identifier", - "value": "foo", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 42, + 50, + ], + "type": "String", + "value": "'second'", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 6, }, "start": Object { "column": 0, - "line": 3, + "line": 6, }, }, "range": Array [ - 27, - 28, + 51, + 52, ], "type": "Punctuator", "value": "}", @@ -95345,16 +122309,16 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 3, + "line": 6, }, "start": Object { "column": 1, - "line": 3, + "line": 6, }, }, "range": Array [ - 28, - 29, + 52, + 53, ], "type": "Punctuator", "value": ";", @@ -95364,9 +122328,46 @@ Object { } `; -exports[`javascript fixtures/objectLiteralComputedProperties/computed-variable-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 { + "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 { @@ -95374,17 +122375,17 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 3, }, "start": Object { "column": 4, - "line": 1, + "line": 3, }, }, "name": "x", "range": Array [ - 4, - 5, + 19, + 20, ], "type": "Identifier", }, @@ -95392,49 +122393,109 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 6, }, "start": Object { "column": 8, - "line": 1, + "line": 3, }, }, "properties": Array [ Object { - "computed": true, + "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 4, + "line": 4, }, "start": Object { - "column": 5, - "line": 2, + "column": 1, + "line": 4, }, }, - "name": "bar", "range": Array [ - 15, - 18, + 26, + 29, ], - "type": "Identifier", + "raw": "\\"y\\"", + "type": "Literal", + "value": "y", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 1, + "line": 4, + }, + }, + "method": false, + "range": Array [ + 26, + 38, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "range": Array [ + 31, + 38, + ], + "raw": "\\"first\\"", + "type": "Literal", + "value": "first", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 5, + }, + "start": Object { + "column": 1, + "line": 5, + }, + }, + "range": Array [ + 41, + 44, + ], + "raw": "\\"y\\"", + "type": "Literal", + "value": "y", }, "kind": "init", "loc": Object { "end": Object { "column": 14, - "line": 2, + "line": 5, }, "start": Object { - "column": 4, - "line": 2, + "column": 1, + "line": 5, }, }, "method": false, "range": Array [ - 14, - 24, + 41, + 54, ], "shorthand": false, "type": "Property", @@ -95442,504 +122503,292 @@ Object { "loc": Object { "end": Object { "column": 14, - "line": 2, + "line": 5, }, "start": Object { - "column": 11, - "line": 2, + "column": 6, + "line": 5, }, }, - "name": "foo", "range": Array [ - 21, - 24, + 46, + 54, ], - "type": "Identifier", + "raw": "\\"second\\"", + "type": "Literal", + "value": "second", }, }, ], "range": Array [ - 8, - 26, + 23, + 56, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 6, }, "start": Object { "column": 4, - "line": 1, + "line": 3, }, - }, - "range": Array [ - 4, - 26, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 27, - ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "var", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, + }, + "range": Array [ + 19, + 56, + ], + "type": "VariableDeclarator", }, - }, - "range": Array [ - 4, - 5, ], - "type": "Identifier", - "value": "x", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 2, + "line": 6, }, "start": Object { - "column": 6, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 6, - 7, + 15, + 57, ], - "type": "Punctuator", - "value": "=", + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 2, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 57, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 12, "line": 1, }, "start": Object { - "column": 8, + "column": 0, "line": 1, }, }, "range": Array [ - 8, - 9, + 0, + 12, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 14, - 15, + 12, + 13, ], "type": "Punctuator", - "value": "[", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 3, + "line": 3, }, "start": Object { - "column": 5, - "line": 2, + "column": 0, + "line": 3, }, }, "range": Array [ 15, 18, ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": "]", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 5, + "line": 3, }, "start": Object { - "column": 9, - "line": 2, + "column": 4, + "line": 3, }, }, "range": Array [ 19, 20, ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 21, - 24, - ], "type": "Identifier", - "value": "foo", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 7, "line": 3, }, "start": Object { - "column": 0, + "column": 6, "line": 3, }, }, "range": Array [ - 25, - 26, + 21, + 22, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 9, "line": 3, }, "start": Object { - "column": 1, + "column": 8, "line": 3, }, }, "range": Array [ - 26, - 27, + 23, + 24, ], "type": "Punctuator", - "value": ";", + "value": "{", }, - ], - "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": 4, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 1, + "line": 4, }, }, "range": Array [ - 0, - 12, + 26, + 29, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "String", + "value": "\\"y\\"", }, - }, - "range": Array [ - 0, - 13, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 0, - 1, + 29, + 30, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 1, + "column": 13, + "line": 4, }, "start": Object { - "column": 1, - "line": 1, + "column": 6, + "line": 4, }, }, "range": Array [ - 1, - 2, + 31, + 38, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "\\"first\\"", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 14, + "line": 4, }, "start": Object { - "column": 2, - "line": 1, + "column": 13, + "line": 4, }, }, "range": Array [ - 2, - 3, + 38, + 39, ], "type": "Punctuator", - "value": "[", + "value": ",", }, Object { "loc": Object { "end": Object { "column": 4, - "line": 1, + "line": 5, }, "start": Object { - "column": 3, - "line": 1, + "column": 1, + "line": 5, }, }, "range": Array [ - 3, - 4, + 41, + 44, ], - "type": "Identifier", - "value": "x", + "type": "String", + "value": "\\"y\\"", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 5, }, "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, + "line": 5, }, }, "range": Array [ - 5, - 6, + 44, + 45, ], "type": "Punctuator", "value": ":", @@ -95947,35 +122796,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 14, + "line": 5, }, "start": Object { - "column": 7, - "line": 1, + "column": 6, + "line": 5, }, }, "range": Array [ - 7, - 9, + 46, + 54, ], - "type": "Numeric", - "value": "10", + "type": "String", + "value": "\\"second\\"", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 1, + "line": 6, }, "start": Object { - "column": 9, - "line": 1, + "column": 0, + "line": 6, }, }, "range": Array [ - 9, - 10, + 55, + 56, ], "type": "Punctuator", "value": "}", @@ -95983,35 +122832,17 @@ Object { 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, + "column": 2, + "line": 6, }, "start": Object { - "column": 11, - "line": 1, + "column": 1, + "line": 6, }, }, "range": Array [ - 11, - 12, + 56, + 57, ], "type": "Punctuator", "value": ";", @@ -96021,129 +122852,188 @@ Object { } `; -exports[`javascript fixtures/objectLiteralComputedProperties/standalone-expression-with-addition.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/invalid-method-no-braces.src 1`] = `"'{' expected."`; + +exports[`javascript fixtures/objectLiteralShorthandMethods/method-property.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 1, - "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", }, - }, - "properties": Array [ - Object { - "computed": true, - "key": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 6, - ], - "raw": "\\"x\\"", - "type": "Literal", - "value": "x", + "init": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, }, - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, + "start": Object { + "column": 8, + "line": 1, }, - "operator": "+", - "range": Array [ - 3, - 12, - ], - "right": Object { + }, + "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": 12, - "line": 1, + "column": 5, + "line": 4, }, "start": Object { - "column": 9, - "line": 1, + "column": 4, + "line": 2, }, }, + "method": true, "range": Array [ - 9, - 12, + 14, + 47, ], - "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 { + "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", + }, }, - }, - "method": false, + ], "range": Array [ - 2, - 17, + 8, + 49, ], - "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": 5, + }, + "start": Object { + "column": 4, + "line": 1, }, }, - ], - "range": Array [ - 1, - 18, - ], - "type": "ObjectExpression", - }, + "range": Array [ + 4, + 49, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 2, + "line": 5, }, "start": Object { "column": 0, @@ -96152,15 +123042,15 @@ Object { }, "range": Array [ 0, - 20, + 50, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 6, }, "start": Object { "column": 0, @@ -96169,14 +123059,14 @@ Object { }, "range": Array [ 0, - 21, + 51, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -96186,169 +123076,205 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 5, "line": 1, }, "start": Object { - "column": 1, + "column": 4, "line": 1, }, }, "range": Array [ - 1, - 2, + 4, + 5, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "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": 6, + "column": 9, "line": 1, }, "start": Object { - "column": 3, + "column": 8, "line": 1, }, }, "range": Array [ - 3, - 6, + 8, + 9, ], - "type": "String", - "value": "\\"x\\"", + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { "column": 8, - "line": 1, + "line": 2, }, "start": Object { "column": 7, - "line": 1, + "line": 2, }, }, "range": Array [ - 7, - 8, + 17, + 18, ], "type": "Punctuator", - "value": "+", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 9, - 12, + 18, + 19, ], - "type": "String", - "value": "\\"y\\"", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 12, - 13, + 20, + 21, ], "type": "Punctuator", - "value": "]", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 14, - "line": 1, + "line": 3, }, "start": Object { - "column": 13, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 13, - 14, + 30, + 36, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 18, + "line": 3, }, "start": Object { "column": 15, - "line": 1, + "line": 3, }, }, "range": Array [ - 15, - 17, + 37, + 40, ], - "type": "Numeric", - "value": "10", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { "column": 18, - "line": 1, + "line": 3, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, }, "start": Object { - "column": 17, - "line": 1, + "column": 4, + "line": 4, }, }, "range": Array [ - 17, - 18, + 46, + 47, ], "type": "Punctuator", "value": "}", @@ -96356,35 +123282,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 18, - "line": 1, + "column": 0, + "line": 5, }, }, "range": Array [ - 18, - 19, + 48, + 49, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 2, + "line": 5, }, "start": Object { - "column": 19, - "line": 1, + "column": 1, + "line": 5, }, }, "range": Array [ - 19, - 20, + 49, + 50, ], "type": "Punctuator", "value": ";", @@ -96394,112 +123320,148 @@ Object { } `; -exports[`javascript fixtures/objectLiteralComputedProperties/standalone-expression-with-method.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": 21, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 1, + "column": 0, "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", + "operator": "=", + "range": Array [ + 0, + 28, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 2, - "line": 1, - }, + "start": Object { + "column": 4, + "line": 1, }, - "method": false, - "range": Array [ - 2, - 20, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 4, + "line": 2, }, }, + "name": "method", "range": Array [ - 18, - 20, + 10, + 16, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, + "kind": "init", "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 7, - "line": 1, + "column": 4, + "line": 2, + }, + }, + "method": true, + "range": Array [ + 10, + 26, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 19, + 26, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 2, + }, }, + "params": Array [], + "range": Array [ + 16, + 26, + ], + "type": "FunctionExpression", }, - "params": Array [], - "range": Array [ - 7, - 20, - ], - "type": "FunctionExpression", }, - }, - ], - "range": Array [ - 1, - 21, - ], - "type": "ObjectExpression", + ], + "range": Array [ + 4, + 28, + ], + "type": "ObjectExpression", + }, + "type": "AssignmentExpression", }, "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 2, + "line": 4, }, "start": Object { "column": 0, @@ -96508,15 +123470,32 @@ Object { }, "range": Array [ 0, - 23, + 29, ], "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": 0, - "line": 2, + "column": 3, + "line": 4, }, "start": Object { "column": 0, @@ -96525,7 +123504,7 @@ Object { }, "range": Array [ 0, - 24, + 30, ], "sourceType": "script", "tokens": Array [ @@ -96544,26 +123523,8 @@ Object { 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": "{", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { @@ -96581,25 +123542,7 @@ Object { 3, ], "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 3, - "line": 1, - }, - }, - "range": Array [ - 3, - 4, - ], - "type": "Identifier", - "value": "x", + "value": "=", }, Object { "loc": Object { @@ -96617,58 +123560,40 @@ Object { 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": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 7, - 15, + 10, + 16, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "method", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 15, 16, + 17, ], "type": "Punctuator", "value": "(", @@ -96676,17 +123601,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 16, 17, + 18, ], "type": "Punctuator", "value": ")", @@ -96694,17 +123619,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 18, 19, + 20, ], "type": "Punctuator", "value": "{", @@ -96712,17 +123637,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 5, + "line": 3, }, "start": Object { - "column": 19, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 19, - 20, + 25, + 26, ], "type": "Punctuator", "value": "}", @@ -96730,17 +123655,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 20, - "line": 1, + "column": 0, + "line": 4, }, }, "range": Array [ - 20, - 21, + 27, + 28, ], "type": "Punctuator", "value": "}", @@ -96748,35 +123673,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 2, + "line": 4, }, "start": Object { - "column": 21, - "line": 1, + "column": 1, + "line": 4, }, }, "range": Array [ - 21, - 22, + 28, + 29, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 3, + "line": 4, }, "start": Object { - "column": 22, - "line": 1, + "column": 2, + "line": 4, }, }, "range": Array [ - 22, - 23, + 29, + 30, ], "type": "Punctuator", "value": ";", @@ -96786,311 +123711,182 @@ Object { } `; -exports[`javascript fixtures/objectLiteralDuplicateProperties/error-proto-property.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": 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", - }, + "right": Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 1, + "line": 4, }, "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, - }, + "line": 1, }, - "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": 10, - "line": 6, - }, - "start": Object { - "column": 1, - "line": 6, - }, - }, - "name": "__proto__", - "range": Array [ - 43, - 52, - ], - "type": "Identifier", - }, - "kind": "init", + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 17, - "line": 6, + "column": 7, + "line": 2, }, "start": Object { - "column": 1, - "line": 6, + "column": 4, + "line": 2, }, }, - "method": false, + "name": "get", "range": Array [ - 43, - 59, + 10, + 13, ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 6, - }, - "start": Object { - "column": 12, - "line": 6, - }, - }, - "name": "proto", - "range": Array [ - 54, - 59, - ], - "type": "Identifier", + "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": 10, - "line": 7, + "column": 5, + "line": 3, }, "start": Object { - "column": 1, - "line": 7, + "column": 10, + "line": 2, }, }, - "name": "__proto__", "range": Array [ - 62, - 71, + 16, + 23, ], - "type": "Identifier", + "type": "BlockStatement", }, - "kind": "init", + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 17, - "line": 7, + "column": 5, + "line": 3, }, "start": Object { - "column": 1, - "line": 7, + "column": 7, + "line": 2, }, }, - "method": false, + "params": Array [], "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 [ - 40, - 80, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 5, + 13, + 23, + ], + "type": "FunctionExpression", + }, }, - }, + ], "range": Array [ - 36, - 80, + 4, + 25, ], - "type": "VariableDeclarator", + "type": "ObjectExpression", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { "column": 2, - "line": 8, + "line": 4, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 32, - 81, + 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": 8, + "column": 3, + "line": 4, }, "start": Object { "column": 0, @@ -97099,14 +123895,14 @@ Object { }, "range": Array [ 0, - 81, + 27, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, + "column": 1, "line": 1, }, "start": Object { @@ -97116,115 +123912,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": 9, - "line": 3, + "column": 7, + "line": 2, }, "start": Object { "column": 4, - "line": 3, + "line": 2, }, }, "range": Array [ - 19, - 24, + 10, + 13, ], "type": "Identifier", - "value": "proto", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 3, + "line": 2, }, "start": Object { "column": 10, - "line": 3, + "line": 2, }, }, "range": Array [ - 25, - 26, + 16, + 17, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 5, "line": 3, }, "start": Object { - "column": 12, + "column": 4, "line": 3, }, }, "range": Array [ - 27, - 28, + 22, + 23, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 1, + "line": 4, }, "start": Object { - "column": 13, - "line": 3, + "column": 0, + "line": 4, }, }, "range": Array [ - 28, - 29, + 24, + 25, ], "type": "Punctuator", "value": "}", @@ -97232,17 +124064,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 2, + "line": 4, }, "start": Object { - "column": 14, - "line": 3, + "column": 1, + "line": 4, }, }, "range": Array [ - 29, - 30, + 25, + 26, ], "type": "Punctuator", "value": ";", @@ -97251,232 +124083,407 @@ Object { "loc": Object { "end": Object { "column": 3, - "line": 5, + "line": 4, }, "start": Object { - "column": 0, - "line": 5, + "column": 2, + "line": 4, }, }, "range": Array [ - 32, - 35, + 26, + 27, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-named-set.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": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 25, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "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 [], + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 16, + 23, + ], + "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 [ + 4, + 25, + ], + "type": "ObjectExpression", + }, + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 2, + "line": 4, }, "start": Object { - "column": 4, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 36, - 37, + 0, + 26, ], - "type": "Identifier", - "value": "x", + "type": "ExpressionStatement", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 3, + "line": 4, }, "start": Object { - "column": 6, - "line": 5, + "column": 2, + "line": 4, }, }, "range": Array [ - 38, - 39, + 26, + 27, ], - "type": "Punctuator", - "value": "=", + "type": "EmptyStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 27, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 1, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 40, - 41, + 0, + 1, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 6, + "column": 3, + "line": 1, }, "start": Object { - "column": 1, - "line": 6, + "column": 2, + "line": 1, }, }, "range": Array [ - 43, - 52, + 2, + 3, ], - "type": "Identifier", - "value": "__proto__", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 6, + "column": 5, + "line": 1, }, "start": Object { - "column": 10, - "line": 6, + "column": 4, + "line": 1, }, }, "range": Array [ - 52, - 53, + 4, + 5, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 6, + "column": 7, + "line": 2, }, "start": Object { - "column": 12, - "line": 6, + "column": 4, + "line": 2, }, }, "range": Array [ - 54, - 59, + 10, + 13, ], "type": "Identifier", - "value": "proto", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 6, + "column": 8, + "line": 2, }, "start": Object { - "column": 17, - "line": 6, + "column": 7, + "line": 2, }, }, "range": Array [ - 59, - 60, + 13, + 14, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 7, + "column": 9, + "line": 2, }, "start": Object { - "column": 1, - "line": 7, + "column": 8, + "line": 2, }, }, "range": Array [ - 62, - 71, + 14, + 15, ], - "type": "Identifier", - "value": "__proto__", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 7, + "line": 2, }, "start": Object { "column": 10, - "line": 7, + "line": 2, }, }, "range": Array [ - 71, - 72, + 16, + 17, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 7, + "column": 5, + "line": 3, }, "start": Object { - "column": 12, - "line": 7, + "column": 4, + "line": 3, }, }, "range": Array [ - 73, - 78, + 22, + 23, ], - "type": "Identifier", - "value": "proto", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 8, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 4, }, "start": Object { - "column": 0, - "line": 8, + "column": 1, + "line": 4, }, }, "range": Array [ - 79, - 80, + 25, + 26, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 8, + "column": 3, + "line": 4, }, "start": Object { - "column": 1, - "line": 8, + "column": 2, + "line": 4, }, }, "range": Array [ - 80, - 81, + 26, + 27, ], "type": "Punctuator", "value": ";", @@ -97486,313 +124493,201 @@ Object { } `; -exports[`javascript fixtures/objectLiteralDuplicateProperties/error-proto-string-property.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-with-argument.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": 5, }, "start": Object { "column": 0, "line": 1, }, }, + "operator": "=", "range": Array [ 0, - 12, + 33, ], - "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", - }, + "right": Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 1, + "line": 5, }, "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, - }, + "line": 1, }, - "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", + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 19, - "line": 6, + "column": 10, + "line": 2, }, "start": Object { - "column": 1, - "line": 6, + "column": 4, + "line": 2, }, }, - "method": false, + "name": "method", "range": Array [ - 43, - 61, + 10, + 16, ], - "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", + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, }, }, - Object { - "computed": false, - "key": Object { + "method": true, + "range": Array [ + 10, + 31, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 12, - "line": 7, + "column": 5, + "line": 4, }, "start": Object { - "column": 1, - "line": 7, + "column": 17, + "line": 2, }, }, "range": Array [ - 64, - 75, + 23, + 31, ], - "raw": "\\"__proto__\\"", - "type": "Literal", - "value": "__proto__", + "type": "BlockStatement", }, - "kind": "init", + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 19, - "line": 7, + "column": 5, + "line": 4, }, "start": Object { - "column": 1, - "line": 7, + "column": 10, + "line": 2, }, }, - "method": false, - "range": Array [ - 64, - 82, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 7, - }, - "start": Object { - "column": 14, - "line": 7, + "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", }, - "name": "proto", - "range": Array [ - 77, - 82, - ], - "type": "Identifier", - }, + ], + "range": Array [ + 16, + 31, + ], + "type": "FunctionExpression", }, - ], - "range": Array [ - 40, - 84, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 5, }, - }, + ], "range": Array [ - 36, - 84, + 4, + 33, ], - "type": "VariableDeclarator", + "type": "ObjectExpression", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { "column": 2, - "line": 8, + "line": 5, }, "start": Object { "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 34, + ], + "type": "ExpressionStatement", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 2, "line": 5, }, }, "range": Array [ - 32, - 85, + 34, + 35, ], - "type": "VariableDeclaration", + "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 2, - "line": 8, + "column": 3, + "line": 5, }, "start": Object { "column": 0, @@ -97801,14 +124696,14 @@ Object { }, "range": Array [ 0, - 85, + 35, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, + "column": 1, "line": 1, }, "start": Object { @@ -97818,115 +124713,169 @@ 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": 9, - "line": 3, + "column": 10, + "line": 2, }, "start": Object { "column": 4, - "line": 3, + "line": 2, }, }, "range": Array [ - 19, - 24, + 10, + 16, ], "type": "Identifier", - "value": "proto", + "value": "method", }, Object { "loc": Object { "end": Object { "column": 11, - "line": 3, + "line": 2, }, "start": Object { "column": 10, - "line": 3, + "line": 2, }, }, "range": Array [ - 25, - 26, + 16, + 17, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 15, + "line": 2, }, "start": Object { - "column": 12, - "line": 3, + "column": 11, + "line": 2, }, }, "range": Array [ - 27, - 28, + 17, + 21, + ], + "type": "Identifier", + "value": "test", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 30, + 31, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 1, + "line": 5, }, "start": Object { - "column": 13, - "line": 3, + "column": 0, + "line": 5, }, }, "range": Array [ - 28, - 29, + 32, + 33, ], "type": "Punctuator", "value": "}", @@ -97934,17 +124883,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 2, + "line": 5, }, "start": Object { - "column": 14, - "line": 3, + "column": 1, + "line": 5, }, }, "range": Array [ - 29, - 30, + 33, + 34, ], "type": "Punctuator", "value": ";", @@ -97956,211 +124905,369 @@ Object { "line": 5, }, "start": Object { - "column": 0, + "column": 2, "line": 5, }, }, "range": Array [ - 32, + 34, 35, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "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": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 0, + 30, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 10, + 18, + ], + "raw": "\\"method\\"", + "type": "Literal", + "value": "method", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "method": true, + "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", + }, + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 2, + "line": 4, }, "start": Object { - "column": 4, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 36, - 37, + 0, + 31, ], - "type": "Identifier", - "value": "x", + "type": "ExpressionStatement", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 3, + "line": 4, }, "start": Object { - "column": 6, - "line": 5, + "column": 2, + "line": 4, }, }, "range": Array [ - 38, - 39, + 31, + 32, ], - "type": "Punctuator", - "value": "=", + "type": "EmptyStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 32, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 1, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 40, - 41, + 0, + 1, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 6, + "column": 3, + "line": 1, }, "start": Object { - "column": 1, - "line": 6, + "column": 2, + "line": 1, }, }, "range": Array [ - 43, - 54, + 2, + 3, ], - "type": "String", - "value": "\\"__proto__\\"", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 6, + "column": 5, + "line": 1, }, "start": Object { - "column": 12, - "line": 6, + "column": 4, + "line": 1, }, }, "range": Array [ - 54, - 55, + 4, + 5, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 6, + "column": 12, + "line": 2, }, "start": Object { - "column": 14, - "line": 6, + "column": 4, + "line": 2, }, }, "range": Array [ - 56, - 61, + 10, + 18, ], - "type": "Identifier", - "value": "proto", + "type": "String", + "value": "\\"method\\"", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 6, + "column": 13, + "line": 2, }, "start": Object { - "column": 19, - "line": 6, + "column": 12, + "line": 2, }, }, "range": Array [ - 61, - 62, + 18, + 19, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 7, + "column": 14, + "line": 2, }, "start": Object { - "column": 1, - "line": 7, + "column": 13, + "line": 2, }, }, "range": Array [ - 64, - 75, + 19, + 20, ], - "type": "String", - "value": "\\"__proto__\\"", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 7, + "column": 16, + "line": 2, }, "start": Object { - "column": 12, - "line": 7, + "column": 15, + "line": 2, }, }, "range": Array [ - 75, - 76, + 21, + 22, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 7, + "column": 5, + "line": 3, }, "start": Object { - "column": 14, - "line": 7, + "column": 4, + "line": 3, }, }, "range": Array [ - 77, - 82, + 27, + 28, ], - "type": "Identifier", - "value": "proto", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 8, + "line": 4, }, "start": Object { "column": 0, - "line": 8, + "line": 4, }, }, "range": Array [ - 83, - 84, + 29, + 30, ], "type": "Punctuator", "value": "}", @@ -98169,64 +125276,46 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 8, + "line": 4, }, "start": Object { "column": 1, - "line": 8, + "line": 4, }, }, "range": Array [ - 84, - 85, + 30, + 31, ], "type": "Punctuator", "value": ";", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/objectLiteralDuplicateProperties/strict-duplicate-properties.src 1`] = ` -Object { - "body": Array [ Object { - "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, + "column": 3, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 2, + "line": 4, }, }, "range": Array [ - 0, - 13, + 31, + 32, ], - "type": "ExpressionStatement", + "type": "Punctuator", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/objectLiteralShorthandMethods/string-name-method-property.src 1`] = ` +Object { + "body": Array [ Object { "declarations": Array [ Object { @@ -98234,17 +125323,17 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 3, + "line": 1, }, "start": Object { "column": 4, - "line": 3, + "line": 1, }, }, "name": "x", "range": Array [ - 19, - 20, + 4, + 5, ], "type": "Identifier", }, @@ -98252,11 +125341,11 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 5, }, "start": Object { "column": 8, - "line": 3, + "line": 1, }, }, "properties": Array [ @@ -98265,137 +125354,137 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 9, + "line": 2, }, "start": Object { - "column": 1, - "line": 4, + "column": 4, + "line": 2, }, }, - "name": "y", "range": Array [ - 26, - 27, + 14, + 19, ], - "type": "Identifier", + "raw": "\\"foo\\"", + "type": "Literal", + "value": "foo", }, "kind": "init", "loc": Object { "end": Object { - "column": 11, + "column": 5, "line": 4, }, "start": Object { - "column": 1, - "line": 4, + "column": 4, + "line": 2, }, }, - "method": false, + "method": true, "range": Array [ - 26, - 36, + 14, + 49, ], "shorthand": false, "type": "Property", "value": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 29, - 36, - ], - "raw": "'first'", - "type": "Literal", - "value": "first", - }, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, + "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", }, - "name": "y", - "range": Array [ - 39, - 40, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 12, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "method": false, - "range": Array [ - 39, - 50, - ], - "shorthand": false, - "type": "Property", - "value": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 12, - "line": 5, + "column": 5, + "line": 4, }, "start": Object { - "column": 4, - "line": 5, + "column": 9, + "line": 2, }, }, + "params": Array [], "range": Array [ - 42, - 50, + 19, + 49, ], - "raw": "'second'", - "type": "Literal", - "value": "second", + "type": "FunctionExpression", }, }, ], "range": Array [ - 23, - 52, + 8, + 51, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 5, }, "start": Object { "column": 4, - "line": 3, + "line": 1, }, }, "range": Array [ - 19, - 52, + 4, + 51, ], "type": "VariableDeclarator", }, @@ -98404,23 +125493,23 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 6, + "line": 5, }, "start": Object { "column": 0, - "line": 3, + "line": 1, }, }, "range": Array [ - 15, - 53, + 0, + 52, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 2, + "column": 0, "line": 6, }, "start": Object { @@ -98437,7 +125526,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 3, "line": 1, }, "start": Object { @@ -98447,43 +125536,7 @@ Object { }, "range": Array [ 0, - 12, - ], - "type": "String", - "value": "\\"use strict\\"", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 15, - 18, + 3, ], "type": "Keyword", "value": "var", @@ -98492,16 +125545,16 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 3, + "line": 1, }, "start": Object { "column": 4, - "line": 3, + "line": 1, }, }, "range": Array [ - 19, - 20, + 4, + 5, ], "type": "Identifier", "value": "x", @@ -98510,16 +125563,16 @@ Object { "loc": Object { "end": Object { "column": 7, - "line": 3, + "line": 1, }, "start": Object { "column": 6, - "line": 3, + "line": 1, }, }, "range": Array [ - 21, - 22, + 6, + 7, ], "type": "Punctuator", "value": "=", @@ -98528,16 +125581,16 @@ Object { "loc": Object { "end": Object { "column": 9, - "line": 3, + "line": 1, }, "start": Object { "column": 8, - "line": 3, + "line": 1, }, }, "range": Array [ - 23, - 24, + 8, + 9, ], "type": "Punctuator", "value": "{", @@ -98545,143 +125598,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 9, + "line": 2, }, "start": Object { - "column": 1, - "line": 4, + "column": 4, + "line": 2, }, }, "range": Array [ - 26, - 27, + 14, + 19, ], - "type": "Identifier", - "value": "y", + "type": "String", + "value": "\\"foo\\"", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 10, + "line": 2, }, "start": Object { - "column": 2, - "line": 4, + "column": 9, + "line": 2, }, }, "range": Array [ - 27, - 28, + 19, + 20, ], "type": "Punctuator", - "value": ":", + "value": "(", }, 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, + 20, + 21, ], - "type": "String", - "value": "'first'", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 4, + "column": 13, + "line": 2, }, "start": Object { - "column": 11, - "line": 4, + "column": 12, + "line": 2, }, }, "range": Array [ - 36, - 37, + 22, + 23, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 14, + "line": 3, }, "start": Object { - "column": 1, - "line": 5, + "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, - 40, + 42, ], "type": "Identifier", - "value": "y", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 19, + "line": 3, }, "start": Object { - "column": 2, - "line": 5, + "column": 18, + "line": 3, }, }, "range": Array [ - 40, - 41, + 42, + 43, ], "type": "Punctuator", - "value": ":", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 5, + "column": 5, + "line": 4, }, "start": Object { "column": 4, - "line": 5, + "line": 4, }, }, "range": Array [ - 42, - 50, + 48, + 49, ], - "type": "String", - "value": "'second'", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 5, }, "start": Object { "column": 0, - "line": 6, + "line": 5, }, }, "range": Array [ + 50, 51, - 52, ], "type": "Punctuator", "value": "}", @@ -98690,16 +125761,16 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 6, + "line": 5, }, "start": Object { "column": 1, - "line": 6, + "line": 5, }, }, "range": Array [ + 51, 52, - 53, ], "type": "Punctuator", "value": ";", @@ -98709,33 +125780,125 @@ Object { } `; -exports[`javascript fixtures/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src 1`] = ` +exports[`javascript fixtures/objectLiteralShorthandProperties/shorthand-properties.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, + "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", }, - "start": Object { - "column": 0, - "line": 1, + "init": null, + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "range": Array [ + 4, + 7, + ], + "type": "VariableDeclarator", }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, + 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": 13, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { "column": 0, @@ -98744,9 +125907,9 @@ Object { }, "range": Array [ 0, - 13, + 26, ], - "type": "ExpressionStatement", + "type": "VariableDeclaration", }, Object { "declarations": Array [ @@ -98755,17 +125918,17 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 3, + "line": 5, }, "start": Object { "column": 4, - "line": 3, + "line": 5, }, }, "name": "x", "range": Array [ - 19, - 20, + 32, + 33, ], "type": "Identifier", }, @@ -98773,11 +125936,11 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 9, }, "start": Object { "column": 8, - "line": 3, + "line": 5, }, }, "properties": Array [ @@ -98786,58 +125949,113 @@ Object { "key": Object { "loc": Object { "end": Object { + "column": 7, + "line": 6, + }, + "start": Object { "column": 4, - "line": 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": 1, - "line": 4, + "column": 4, + "line": 6, }, }, + "name": "foo", "range": Array [ - 26, - 29, + 42, + 45, ], - "raw": "\\"y\\"", - "type": "Literal", - "value": "y", + "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": 13, - "line": 4, + "column": 7, + "line": 7, }, "start": Object { - "column": 1, - "line": 4, + "column": 4, + "line": 7, }, }, "method": false, "range": Array [ - 26, - 38, + 51, + 54, ], - "shorthand": false, + "shorthand": true, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 7, + "line": 7, }, "start": Object { - "column": 6, - "line": 4, + "column": 4, + "line": 7, }, }, + "name": "get", "range": Array [ - 31, - 38, + 51, + 54, ], - "raw": "\\"first\\"", - "type": "Literal", - "value": "first", + "type": "Identifier", }, }, Object { @@ -98845,80 +126063,78 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 4, - "line": 5, + "column": 7, + "line": 8, }, "start": Object { - "column": 1, - "line": 5, + "column": 4, + "line": 8, }, }, + "name": "set", "range": Array [ - 41, - 44, + 60, + 63, ], - "raw": "\\"y\\"", - "type": "Literal", - "value": "y", + "type": "Identifier", }, "kind": "init", "loc": Object { "end": Object { - "column": 14, - "line": 5, + "column": 7, + "line": 8, }, "start": Object { - "column": 1, - "line": 5, + "column": 4, + "line": 8, }, }, "method": false, "range": Array [ - 41, - 54, + 60, + 63, ], - "shorthand": false, + "shorthand": true, "type": "Property", "value": Object { "loc": Object { "end": Object { - "column": 14, - "line": 5, + "column": 7, + "line": 8, }, "start": Object { - "column": 6, - "line": 5, + "column": 4, + "line": 8, }, }, + "name": "set", "range": Array [ - 46, - 54, + 60, + 63, ], - "raw": "\\"second\\"", - "type": "Literal", - "value": "second", + "type": "Identifier", }, }, ], "range": Array [ - 23, - 56, + 36, + 65, ], "type": "ObjectExpression", }, "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 9, }, "start": Object { "column": 4, - "line": 3, + "line": 5, }, }, "range": Array [ - 19, - 56, + 32, + 65, ], "type": "VariableDeclarator", }, @@ -98927,24 +126143,24 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 6, + "line": 9, }, "start": Object { "column": 0, - "line": 3, + "line": 5, }, }, "range": Array [ - 15, - 57, + 28, + 66, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 2, - "line": 6, + "column": 0, + "line": 10, }, "start": Object { "column": 0, @@ -98953,14 +126169,14 @@ Object { }, "range": Array [ 0, - 57, + 67, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 12, + "column": 3, "line": 1, }, "start": Object { @@ -98970,64 +126186,82 @@ Object { }, "range": Array [ 0, - 12, + 3, ], - "type": "String", - "value": "\\"use strict\\"", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 7, "line": 1, }, "start": Object { - "column": 12, + "column": 4, "line": 1, }, }, "range": Array [ - 12, - 13, + 4, + 7, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 3, + "column": 8, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 7, + "line": 1, }, }, "range": Array [ - 15, - 18, + 7, + 8, ], - "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, + 13, + 16, ], "type": "Identifier", - "value": "x", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { @@ -99036,175 +126270,211 @@ Object { "line": 3, }, "start": Object { - "column": 6, + "column": 4, "line": 3, }, }, "range": Array [ - 21, 22, + 25, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 8, "line": 3, }, "start": Object { - "column": 8, + "column": 7, "line": 3, }, }, "range": Array [ - 23, - 24, + 25, + 26, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 4, + "column": 3, + "line": 5, }, "start": Object { - "column": 1, - "line": 4, + "column": 0, + "line": 5, }, }, "range": Array [ - 26, - 29, + 28, + 31, ], - "type": "String", - "value": "\\"y\\"", + "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 [ - 29, - 30, + 32, + 33, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 7, + "line": 5, }, "start": Object { "column": 6, - "line": 4, + "line": 5, }, }, "range": Array [ - 31, - 38, + 34, + 35, ], - "type": "String", - "value": "\\"first\\"", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 4, + "column": 9, + "line": 5, }, "start": Object { - "column": 13, - "line": 4, + "column": 8, + "line": 5, }, }, "range": Array [ - 38, - 39, + 36, + 37, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 5, + "column": 7, + "line": 6, }, "start": Object { - "column": 1, - "line": 5, + "column": 4, + "line": 6, }, }, "range": Array [ - 41, - 44, + 42, + 45, ], - "type": "String", - "value": "\\"y\\"", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 8, + "line": 6, }, "start": Object { - "column": 4, - "line": 5, + "column": 7, + "line": 6, }, }, "range": Array [ - 44, 45, + 46, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 5, + "column": 7, + "line": 7, }, "start": Object { - "column": 6, - "line": 5, + "column": 4, + "line": 7, }, }, "range": Array [ - 46, + 51, 54, ], - "type": "String", - "value": "\\"second\\"", + "type": "Identifier", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 7, + }, + "start": Object { + "column": 7, + "line": 7, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 60, + 63, + ], + "type": "Identifier", + "value": "set", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 9, }, "start": Object { "column": 0, - "line": 6, + "line": 9, }, }, "range": Array [ - 55, - 56, + 64, + 65, ], "type": "Punctuator", "value": "}", @@ -99213,16 +126483,16 @@ Object { "loc": Object { "end": Object { "column": 2, - "line": 6, + "line": 9, }, "start": Object { "column": 1, - "line": 6, + "line": 9, }, }, "range": Array [ - 56, - 57, + 65, + 66, ], "type": "Punctuator", "value": ";", @@ -99232,188 +126502,35 @@ Object { } `; -exports[`javascript fixtures/objectLiteralShorthandMethods/invalid-method-no-braces.src 1`] = `"'{' expected."`; +exports[`javascript fixtures/octalLiterals/invalid.src 1`] = `"';' expected."`; -exports[`javascript fixtures/objectLiteralShorthandMethods/method-property.src 1`] = ` +exports[`javascript fixtures/octalLiterals/lowercase.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", + "expression": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 1, - }, + "start": Object { + "column": 0, + "line": 1, }, - "range": Array [ - 4, - 49, - ], - "type": "VariableDeclarator", }, - ], - "kind": "var", + "range": Array [ + 0, + 5, + ], + "raw": "0o717", + "type": "Literal", + "value": 463, + }, "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 6, + "line": 1, }, "start": Object { "column": 0, @@ -99422,15 +126539,15 @@ Object { }, "range": Array [ 0, - 50, + 6, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 2, }, "start": Object { "column": 0, @@ -99439,14 +126556,14 @@ Object { }, "range": Array [ 0, - 51, + 7, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -99456,187 +126573,159 @@ 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": "Numeric", + "value": "0o717", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { "column": 6, "line": 1, }, - }, - "range": Array [ - 6, - 7, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, "start": Object { - "column": 8, + "column": 5, "line": 1, }, }, "range": Array [ - 8, - 9, + 5, + 6, ], "type": "Punctuator", - "value": "{", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`javascript fixtures/octalLiterals/strict-uppercase.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, + "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", }, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - "value": "foo", - }, - Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 17, - 18, + 0, + 13, ], - "type": "Punctuator", - "value": "(", + "type": "ExpressionStatement", }, Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, + "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, }, - "range": Array [ - 18, - 19, - ], - "type": "Punctuator", - "value": ")", - }, - Object { "loc": Object { "end": Object { - "column": 11, + "column": 6, "line": 2, }, "start": Object { - "column": 10, + "column": 0, "line": 2, }, }, "range": Array [ + 14, 20, - 21, ], - "type": "Punctuator", - "value": "{", + "type": "ExpressionStatement", }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "Keyword", - "value": "return", + ], + "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": 18, - "line": 3, + "column": 12, + "line": 1, }, "start": Object { - "column": 15, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 37, - 40, + 0, + 12, ], - "type": "Identifier", - "value": "bar", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 3, + "column": 13, + "line": 1, }, "start": Object { - "column": 18, - "line": 3, + "column": 12, + "line": 1, }, }, "range": Array [ - 40, - 41, + 12, + 13, ], "type": "Punctuator", "value": ";", @@ -99645,52 +126734,34 @@ Object { "loc": Object { "end": Object { "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, + "line": 2, }, "start": Object { "column": 0, - "line": 5, + "line": 2, }, }, "range": Array [ - 48, - 49, + 14, + 19, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "0O717", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 6, + "line": 2, }, "start": Object { - "column": 1, - "line": 5, + "column": 5, + "line": 2, }, }, "range": Array [ - 49, - 50, + 19, + 20, ], "type": "Punctuator", "value": ";", @@ -99700,148 +126771,33 @@ Object { } `; -exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method.src 1`] = ` +exports[`javascript fixtures/octalLiterals/uppercase.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": 1, - "line": 4, + "column": 5, + "line": 1, }, "start": Object { "column": 0, "line": 1, }, }, - "operator": "=", "range": Array [ 0, - 28, + 5, ], - "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": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "method", - "range": Array [ - 10, - 16, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "method": true, - "range": Array [ - 10, - 26, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 19, - 26, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 16, - 26, - ], - "type": "FunctionExpression", - }, - }, - ], - "range": Array [ - 4, - 28, - ], - "type": "ObjectExpression", - }, - "type": "AssignmentExpression", + "raw": "0O717", + "type": "Literal", + "value": 463, }, "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 6, + "line": 1, }, "start": Object { "column": 0, @@ -99850,32 +126806,15 @@ Object { }, "range": Array [ 0, - 29, + 6, ], "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": 3, - "line": 4, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -99884,14 +126823,14 @@ Object { }, "range": Array [ 0, - 30, + 7, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 5, "line": 1, }, "start": Object { @@ -99901,187 +126840,222 @@ 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": ";", + }, + ], + "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", + }, ], - "type": "Punctuator", - "value": "=", - }, - Object { + "kind": "var", "loc": Object { "end": Object { - "column": 5, + "column": 17, "line": 1, }, "start": Object { - "column": 4, + "column": 0, "line": 1, }, }, "range": Array [ - 4, - 5, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 10, - 16, - ], - "type": "Identifier", - "value": "method", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 16, + 0, 17, ], - "type": "Punctuator", - "value": "(", + "type": "VariableDeclaration", }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": ")", + ], + "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": 14, - "line": 2, + "column": 3, + "line": 1, }, "start": Object { - "column": 13, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 19, - 20, + 0, + 3, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 7, + "line": 1, }, "start": Object { "column": 4, - "line": 3, + "line": 1, }, }, "range": Array [ - 25, - 26, + 4, + 7, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 9, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 8, + "line": 1, }, }, "range": Array [ - 27, - 28, + 8, + 9, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 16, + "line": 1, }, "start": Object { - "column": 1, - "line": 4, + "column": 10, + "line": 1, }, }, "range": Array [ - 28, - 29, + 10, + 16, ], - "type": "Punctuator", - "value": ";", + "regex": Object { + "flags": "", + "pattern": "foo.", + }, + "type": "RegularExpression", + "value": "/foo./", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 17, + "line": 1, }, "start": Object { - "column": 2, - "line": 4, + "column": 16, + "line": 1, }, }, "range": Array [ - 29, - 30, + 16, + 17, ], "type": "Punctuator", "value": ";", @@ -100091,148 +127065,75 @@ Object { } `; -exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-named-get.src 1`] = ` +exports[`javascript fixtures/regexUFlag/regex-u-extended-escape.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, + "init": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 40, + ], + "raw": "/[\\\\u{0000000000000061}-\\\\u{7A}]/u", + "regex": Object { + "flags": "u", + "pattern": "[\\\\u{0000000000000061}-\\\\u{7A}]", + }, + "type": "Literal", + "value": Object {}, }, - }, - "operator": "=", - "range": Array [ - 0, - 25, - ], - "right": Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 40, + "line": 1, }, "start": Object { "column": 4, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "get", - "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 [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 16, - 23, - ], - "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 [ 4, - 25, + 40, ], - "type": "ObjectExpression", + "type": "VariableDeclarator", }, - "type": "AssignmentExpression", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 41, + "line": 1, }, "start": Object { "column": 0, @@ -100241,32 +127142,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, + 41, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -100275,14 +127159,14 @@ Object { }, "range": Array [ 0, - 27, + 42, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -100292,187 +127176,280 @@ Object { }, "range": Array [ 0, - 1, + 3, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "var", }, 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": "x", }, 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": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 40, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 10, - 13, + 8, + 40, ], - "type": "Identifier", - "value": "get", + "regex": Object { + "flags": "u", + "pattern": "[\\\\u{0000000000000061}-\\\\u{7A}]", + }, + "type": "RegularExpression", + "value": "/[\\\\u{0000000000000061}-\\\\u{7A}]/u", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 41, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 40, + "line": 1, }, }, "range": Array [ - 13, - 14, + 40, + 41, ], "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": 9, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 14, - 15, + 0, + 22, ], - "type": "Punctuator", - "value": ")", + "type": "VariableDeclaration", + }, + ], + "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": 11, - "line": 2, + "column": 3, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 16, - 17, + 0, + 3, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 3, + "line": 1, }, "start": Object { "column": 4, - "line": 3, + "line": 1, }, }, "range": Array [ - 22, - 23, + 4, + 5, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 7, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 6, + "line": 1, }, }, "range": Array [ - 24, - 25, + 6, + 7, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 21, + "line": 1, }, "start": Object { - "column": 1, - "line": 4, + "column": 8, + "line": 1, }, }, "range": Array [ - 25, - 26, + 8, + 21, ], - "type": "Punctuator", - "value": ";", + "regex": Object { + "flags": "u", + "pattern": "\\\\u{110000}", + }, + "type": "RegularExpression", + "value": "/\\\\u{110000}/u", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 22, + "line": 1, }, "start": Object { - "column": 2, - "line": 4, + "column": 21, + "line": 1, }, }, "range": Array [ - 26, - 27, + 21, + 22, ], "type": "Punctuator", "value": ";", @@ -100482,148 +127459,75 @@ Object { } `; -exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-named-set.src 1`] = ` +exports[`javascript fixtures/regexUFlag/regex-u-simple.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": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, }, + "name": "foo", + "range": Array [ + 4, + 7, + ], + "type": "Identifier", }, - "name": "x", - "range": Array [ - 0, - 1, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "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 {}, }, - }, - "operator": "=", - "range": Array [ - 0, - 25, - ], - "right": Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 16, + "line": 1, }, "start": Object { "column": 4, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "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 [], - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 16, - 23, - ], - "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 [ 4, - 25, + 16, ], - "type": "ObjectExpression", + "type": "VariableDeclarator", }, - "type": "AssignmentExpression", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 17, + "line": 1, }, "start": Object { "column": 0, @@ -100632,32 +127536,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, + 17, ], - "type": "EmptyStatement", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -100666,14 +127553,14 @@ Object { }, "range": Array [ 0, - 27, + 18, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 3, "line": 1, }, "start": Object { @@ -100683,187 +127570,280 @@ 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": 9, "line": 1, }, "start": Object { - "column": 4, + "column": 8, "line": 1, }, }, "range": Array [ - 4, - 5, + 8, + 9, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ 10, - 13, + 16, ], - "type": "Identifier", - "value": "set", + "regex": Object { + "flags": "u", + "pattern": "foo", + }, + "type": "RegularExpression", + "value": "/foo/u", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 13, - 14, + 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": 9, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 14, - 15, + 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": 11, - "line": 2, + "column": 3, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 16, - 17, + 0, + 3, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 7, + "line": 1, }, "start": Object { "column": 4, - "line": 3, + "line": 1, }, }, "range": Array [ - 22, - 23, + 4, + 7, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 9, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 8, + "line": 1, }, }, "range": Array [ - 24, - 25, + 8, + 9, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 16, + "line": 1, }, "start": Object { - "column": 1, - "line": 4, + "column": 10, + "line": 1, }, }, "range": Array [ - 25, - 26, + 10, + 16, ], - "type": "Punctuator", - "value": ";", + "regex": Object { + "flags": "y", + "pattern": "foo", + }, + "type": "RegularExpression", + "value": "/foo/y", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 17, + "line": 1, }, "start": Object { - "column": 2, - "line": 4, + "column": 16, + "line": 1, }, }, "range": Array [ - 26, - 27, + 16, + 17, ], "type": "Punctuator", "value": ";", @@ -100873,201 +127853,142 @@ Object { } `; -exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-with-argument.src 1`] = ` +exports[`javascript fixtures/restParams/basic-rest.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, }, - "name": "x", - "range": Array [ - 0, - 1, - ], - "type": "Identifier", }, + "range": Array [ + 20, + 22, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 10, + "line": 1, }, "start": Object { - "column": 0, + "column": 9, "line": 1, }, }, - "operator": "=", + "name": "f", "range": Array [ - 0, - 33, + 9, + 10, ], - "right": Object { + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, + "column": 11, "line": 1, }, }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "name": "method", - "range": Array [ - 10, - 16, - ], - "type": "Identifier", - }, - "kind": "init", - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "name": "a", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, }, - "method": true, - "range": Array [ - 10, - 31, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 23, - 31, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "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, - 31, - ], - "type": "FunctionExpression", + "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 [ - 4, - 33, + 14, + 18, ], - "type": "ObjectExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "RestElement", }, - }, + ], "range": Array [ 0, - 34, + 22, ], - "type": "ExpressionStatement", + "type": "FunctionDeclaration", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 23, + "line": 1, }, "start": Object { - "column": 2, - "line": 5, + "column": 22, + "line": 1, }, }, "range": Array [ - 34, - 35, + 22, + 23, ], "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 23, + "line": 1, }, "start": Object { "column": 0, @@ -101076,14 +127997,14 @@ Object { }, "range": Array [ 0, - 35, + 23, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 8, "line": 1, }, "start": Object { @@ -101093,205 +128014,187 @@ Object { }, "range": Array [ 0, - 1, + 8, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 10, "line": 1, }, "start": Object { - "column": 2, + "column": 9, "line": 1, }, }, "range": Array [ - 2, - 3, + 9, + 10, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 11, "line": 1, }, "start": Object { - "column": 4, + "column": 10, "line": 1, }, }, "range": Array [ - 4, - 5, + 10, + 11, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 10, - 16, + 11, + 12, ], "type": "Identifier", - "value": "method", + "value": "a", }, 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 [ - 16, - 17, + 12, + 13, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ + 14, 17, - 21, - ], - "type": "Identifier", - "value": "test", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, ], "type": "Punctuator", - "value": ")", + "value": "...", }, Object { "loc": Object { "end": Object { "column": 18, - "line": 2, + "line": 1, }, "start": Object { "column": 17, - "line": 2, + "line": 1, }, }, "range": Array [ - 23, - 24, + 17, + 18, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 19, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 18, + "line": 1, }, }, "range": Array [ - 30, - 31, + 18, + 19, ], "type": "Punctuator", - "value": "}", + "value": ")", }, 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 [ - 32, - 33, + 20, + 21, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 22, + "line": 1, }, "start": Object { - "column": 1, - "line": 5, + "column": 21, + "line": 1, }, }, "range": Array [ - 33, - 34, + 21, + 22, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 5, + "column": 23, + "line": 1, }, "start": Object { - "column": 2, - "line": 5, + "column": 22, + "line": 1, }, }, "range": Array [ - 34, - 35, + 22, + 23, ], "type": "Punctuator", "value": ";", @@ -101301,148 +128204,164 @@ Object { } `; -exports[`javascript fixtures/objectLiteralShorthandMethods/simple-method-with-string-name.src 1`] = ` +exports[`javascript fixtures/restParams/class-constructor.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": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 30, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 4, + "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", }, - "start": Object { - "column": 4, - "line": 1, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { + "range": Array [ + 14, + 41, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 5, + "line": 3, }, "start": Object { - "column": 4, + "column": 24, "line": 2, }, }, "range": Array [ - 10, - 18, - ], - "raw": "\\"method\\"", - "type": "Literal", - "value": "method", + 34, + 41, + ], + "type": "BlockStatement", }, - "kind": "init", + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { "column": 5, "line": 3, }, "start": Object { - "column": 4, + "column": 15, "line": 2, }, }, - "method": true, - "range": Array [ - 10, - 28, - ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "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": 5, - "line": 3, + "column": 22, + "line": 2, }, "start": Object { - "column": 15, + "column": 16, "line": 2, }, }, "range": Array [ - 21, - 28, + 26, + 32, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 2, - }, + "type": "RestElement", }, - "params": Array [], - "range": Array [ - 18, - 28, - ], - "type": "FunctionExpression", - }, + ], + "range": Array [ + 25, + 41, + ], + "type": "FunctionExpression", }, - ], - "range": Array [ - 4, - 30, - ], - "type": "ObjectExpression", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, - "type": "AssignmentExpression", + "range": Array [ + 8, + 43, + ], + "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": 2, + "column": 1, "line": 4, }, "start": Object { @@ -101452,32 +128371,16 @@ Object { }, "range": Array [ 0, - 31, - ], - "type": "ExpressionStatement", - }, - Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 31, - 32, + 43, ], - "type": "EmptyStatement", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 3, - "line": 4, + "column": 0, + "line": 5, }, "start": Object { "column": 0, @@ -101486,14 +128389,14 @@ Object { }, "range": Array [ 0, - 32, + 44, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 5, "line": 1, }, "start": Object { @@ -101503,43 +128406,43 @@ Object { }, "range": Array [ 0, - 1, + 5, ], - "type": "Identifier", - "value": "x", + "type": "Keyword", + "value": "class", }, 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": "=", + "type": "Identifier", + "value": "A", }, 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": "{", @@ -101547,7 +128450,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 15, "line": 2, }, "start": Object { @@ -101556,26 +128459,26 @@ Object { }, }, "range": Array [ - 10, - 18, + 14, + 25, ], - "type": "String", - "value": "\\"method\\"", + "type": "Identifier", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 16, "line": 2, }, "start": Object { - "column": 12, + "column": 15, "line": 2, }, }, "range": Array [ - 18, - 19, + 25, + 26, ], "type": "Punctuator", "value": "(", @@ -101583,297 +128486,275 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, + "column": 19, "line": 2, }, "start": Object { - "column": 13, + "column": 16, "line": 2, }, }, "range": Array [ - 19, - 20, + 26, + 29, ], "type": "Punctuator", - "value": ")", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 22, "line": 2, }, "start": Object { - "column": 15, + "column": 19, "line": 2, }, }, "range": Array [ - 21, - 22, + 29, + 32, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 23, + "line": 2, }, "start": Object { - "column": 4, - "line": 3, + "column": 22, + "line": 2, }, }, "range": Array [ - 27, - 28, + 32, + 33, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 25, + "line": 2, }, "start": Object { - "column": 0, - "line": 4, + "column": 24, + "line": 2, }, }, "range": Array [ - 29, - 30, + 34, + 35, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 4, + "column": 5, + "line": 3, }, "start": Object { - "column": 1, - "line": 4, + "column": 4, + "line": 3, }, }, "range": Array [ - 30, - 31, + 40, + 41, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 4, }, "start": Object { - "column": 2, + "column": 0, "line": 4, }, }, "range": Array [ - 31, - 32, + 42, + 43, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`javascript fixtures/objectLiteralShorthandMethods/string-name-method-property.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": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 19, - ], - "raw": "\\"foo\\"", - "type": "Literal", - "value": "foo", - }, - "kind": "init", + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { "column": 5, - "line": 4, + "line": 3, }, "start": Object { - "column": 4, + "column": 16, "line": 2, }, }, - "method": true, "range": Array [ - 14, - 49, + 26, + 33, ], - "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", - }, - ], + "type": "BlockStatement", + }, + "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": 5, - "line": 4, + "column": 14, + "line": 2, }, "start": Object { - "column": 12, + "column": 11, "line": 2, }, }, + "name": "bar", "range": Array [ - 22, - 49, + 21, + 24, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 14, + "line": 2, }, "start": Object { - "column": 9, + "column": 8, "line": 2, }, }, - "params": Array [], "range": Array [ - 19, - 49, + 18, + 24, ], - "type": "FunctionExpression", + "type": "RestElement", }, - }, - ], - "range": Array [ - 8, - 51, - ], - "type": "ObjectExpression", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 1, + ], + "range": Array [ + 17, + 33, + ], + "type": "FunctionExpression", }, }, - "range": Array [ - 4, - 51, - ], - "type": "VariableDeclarator", + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, }, - ], - "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": 2, - "line": 5, + "column": 1, + "line": 4, }, "start": Object { "column": 0, @@ -101882,15 +128763,16 @@ Object { }, "range": Array [ 0, - 52, + 35, ], - "type": "VariableDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 5, }, "start": Object { "column": 0, @@ -101899,14 +128781,14 @@ Object { }, "range": Array [ 0, - 53, + 36, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 5, "line": 1, }, "start": Object { @@ -101916,28 +128798,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": "class", }, Object { "loc": Object { @@ -101954,8 +128818,8 @@ Object { 6, 7, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { @@ -101978,7 +128842,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 2, }, "start": Object { @@ -101988,25 +128852,25 @@ Object { }, "range": Array [ 14, - 19, + 17, ], - "type": "String", - "value": "\\"foo\\"", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 2, }, "start": Object { - "column": 9, + "column": 7, "line": 2, }, }, "range": Array [ - 19, - 20, + 17, + 18, ], "type": "Punctuator", "value": "(", @@ -102018,103 +128882,85 @@ Object { "line": 2, }, "start": Object { - "column": 10, + "column": 8, "line": 2, }, }, "range": Array [ - 20, + 18, 21, ], "type": "Punctuator", - "value": ")", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 14, "line": 2, }, "start": Object { - "column": 12, + "column": 11, "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, + 21, + 24, ], - "type": "Keyword", - "value": "return", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 3, + "column": 15, + "line": 2, }, "start": Object { - "column": 15, - "line": 3, + "column": 14, + "line": 2, }, }, "range": Array [ - 39, - 42, + 24, + 25, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 3, + "column": 17, + "line": 2, }, "start": Object { - "column": 18, - "line": 3, + "column": 16, + "line": 2, }, }, "range": Array [ - 42, - 43, + 26, + 27, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 4, + "line": 3, }, "start": Object { "column": 4, - "line": 4, + "line": 3, }, }, "range": Array [ - 48, - 49, + 32, + 33, ], "type": "Punctuator", "value": "}", @@ -102123,424 +128969,126 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 4, }, "start": Object { "column": 0, - "line": 5, + "line": 4, }, }, "range": Array [ - 50, - 51, + 34, + 35, ], "type": "Punctuator", "value": "}", }, - Object { - "loc": Object { - "end": Object { - "column": 2, - "line": 5, - }, - "start": Object { - "column": 1, - "line": 5, - }, - }, - "range": Array [ - 51, - 52, - ], - "type": "Punctuator", - "value": ";", - }, ], "type": "Program", } `; -exports[`javascript fixtures/objectLiteralShorthandProperties/shorthand-properties.src 1`] = ` +exports[`javascript fixtures/restParams/error-no-default.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", + "async": false, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, }, - "init": null, - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + "start": Object { + "column": 9, + "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", + "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": 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, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 11, + "line": 1, }, }, + "name": "a", "range": Array [ - 22, - 25, + 11, + 12, ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", }, - }, - "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 { + "argument": Object { "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 18, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 17, + "line": 1, }, }, - "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", - }, - }, - 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", - }, - }, - ], - "range": Array [ - 36, - 65, + "name": "b", + "range": Array [ + 17, + 18, ], - "type": "ObjectExpression", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 14, + "line": 1, }, }, "range": Array [ - 32, - 65, + 14, + 22, ], - "type": "VariableDeclarator", + "type": "RestElement", }, ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 2, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, "range": Array [ - 28, - 66, + 0, + 24, ], - "type": "VariableDeclaration", + "type": "TSDeclareFunction", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 10, + "column": 24, + "line": 1, }, "start": Object { "column": 0, @@ -102549,14 +129097,14 @@ Object { }, "range": Array [ 0, - 67, + 24, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 8, "line": 1, }, "start": Object { @@ -102566,79 +129114,79 @@ Object { }, "range": Array [ 0, - 3, + 8, ], "type": "Keyword", - "value": "var", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 10, "line": 1, }, "start": Object { - "column": 4, + "column": 9, "line": 1, }, }, "range": Array [ - 4, - 7, + 9, + 10, ], "type": "Identifier", - "value": "foo", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 11, "line": 1, }, "start": Object { - "column": 7, + "column": 10, "line": 1, }, }, "range": Array [ - 7, - 8, + 10, + 11, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 13, - 16, + 11, + 12, ], "type": "Identifier", - "value": "get", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 16, - 17, + 12, + 13, ], "type": "Punctuator", "value": ",", @@ -102646,89 +129194,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "value": "set", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 14, + "line": 1, }, }, "range": Array [ - 25, - 26, + 14, + 17, ], "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": 18, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 17, + "line": 1, }, }, "range": Array [ - 32, - 33, + 17, + 18, ], "type": "Identifier", - "value": "x", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 20, + "line": 1, }, "start": Object { - "column": 6, - "line": 5, + "column": 19, + "line": 1, }, }, "range": Array [ - 34, - 35, + 19, + 20, ], "type": "Punctuator", "value": "=", @@ -102736,143 +129248,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 5, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 42, - 45, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 6, - }, - "start": Object { - "column": 7, - "line": 6, - }, - }, - "range": Array [ - 45, - 46, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 4, - "line": 7, - }, - }, - "range": Array [ - 51, - 54, - ], - "type": "Identifier", - "value": "get", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 7, - }, - "start": Object { - "column": 7, - "line": 7, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 8, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 8, + "column": 21, + "line": 1, }, }, "range": Array [ - 60, - 63, + 21, + 22, ], - "type": "Identifier", - "value": "set", + "type": "Numeric", + "value": "0", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 9, + "column": 23, + "line": 1, }, "start": Object { - "column": 0, - "line": 9, + "column": 22, + "line": 1, }, }, "range": Array [ - 64, - 65, + 22, + 23, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 9, + "column": 24, + "line": 1, }, "start": Object { - "column": 1, - "line": 9, + "column": 23, + "line": 1, }, }, "range": Array [ - 65, - 66, + 23, + 24, ], "type": "Punctuator", "value": ";", @@ -102882,34 +129304,34 @@ Object { } `; -exports[`javascript fixtures/octalLiterals/invalid.src 1`] = `"';' expected."`; - -exports[`javascript fixtures/octalLiterals/lowercase.src 1`] = ` +exports[`javascript fixtures/restParams/error-not-last.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { + "async": false, + "expression": false, + "generator": false, + "id": Object { "loc": Object { "end": Object { - "column": 5, + "column": 10, "line": 1, }, "start": Object { - "column": 0, + "column": 9, "line": 1, }, }, + "name": "f", "range": Array [ - 0, - 5, + 9, + 10, ], - "raw": "0o717", - "type": "Literal", - "value": 463, + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 6, + "column": 23, "line": 1, }, "start": Object { @@ -102917,17 +129339,90 @@ 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", + }, + 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, - 6, + 23, ], - "type": "ExpressionStatement", + "type": "TSDeclareFunction", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { "column": 0, @@ -102936,14 +129431,14 @@ Object { }, "range": Array [ 0, - 7, + 23, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -102953,126 +129448,47 @@ 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": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "f", }, - ], - "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, - }, - }, - "range": Array [ - 0, - 12, - ], - "raw": "\\"use strict\\"", - "type": "Literal", - "value": "use strict", - }, "loc": Object { "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 0, + "column": 11, "line": 1, }, - }, - "range": Array [ - 0, - 13, - ], - "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": 6, - "line": 2, - }, "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 14, - 20, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { @@ -103080,16 +129496,16 @@ Object { "line": 1, }, "start": Object { - "column": 0, + "column": 11, "line": 1, }, }, "range": Array [ - 0, + 11, 12, ], - "type": "String", - "value": "\\"use strict\\"", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { @@ -103107,137 +129523,112 @@ Object { 13, ], "type": "Punctuator", - "value": ";", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ 14, - 19, + 17, ], - "type": "Numeric", - "value": "0O717", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 19, - 20, + 17, + 18, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "b", }, - ], - "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, - }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, }, - "range": Array [ - 0, - 5, - ], - "raw": "0O717", - "type": "Literal", - "value": 463, }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ",", + }, + Object { "loc": Object { "end": Object { - "column": 6, + "column": 21, "line": 1, }, "start": Object { - "column": 0, + "column": 20, "line": 1, }, }, "range": Array [ - 0, - 6, + 20, + 21, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "c", }, - }, - "range": Array [ - 0, - 7, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 22, "line": 1, }, "start": Object { - "column": 0, + "column": 21, "line": 1, }, }, "range": Array [ - 0, - 5, + 21, + 22, ], - "type": "Numeric", - "value": "0O717", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 23, "line": 1, }, "start": Object { - "column": 5, + "column": 22, "line": 1, }, }, "range": Array [ - 5, - 6, + 22, + 23, ], "type": "Punctuator", "value": ";", @@ -103247,7 +129638,7 @@ Object { } `; -exports[`javascript fixtures/regex/regexp-simple.src 1`] = ` +exports[`javascript fixtures/restParams/func-expression.src 1`] = ` Object { "body": Array [ Object { @@ -103256,7 +129647,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -103264,39 +129655,92 @@ Object { "line": 1, }, }, - "name": "foo", + "name": "x", "range": Array [ 4, - 7, + 5, ], "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": 16, + "column": 26, "line": 1, }, "start": Object { - "column": 10, + "column": 8, "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 [ - 10, - 16, + 8, + 26, ], - "raw": "/foo./", - "regex": Object { - "flags": "", - "pattern": "foo.", - }, - "type": "Literal", - "value": Object {}, + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 16, + "column": 26, "line": 1, }, "start": Object { @@ -103306,7 +129750,7 @@ Object { }, "range": Array [ 4, - 16, + 26, ], "type": "VariableDeclarator", }, @@ -103314,7 +129758,7 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 17, + "column": 27, "line": 1, }, "start": Object { @@ -103324,15 +129768,15 @@ Object { }, "range": Array [ 0, - 17, + 27, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { "column": 0, @@ -103341,7 +129785,7 @@ Object { }, "range": Array [ 0, - 18, + 27, ], "sourceType": "script", "tokens": Array [ @@ -103366,7 +129810,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -103376,25 +129820,25 @@ Object { }, "range": Array [ 4, - 7, + 5, ], "type": "Identifier", - "value": "foo", + "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": "=", @@ -103406,232 +129850,139 @@ Object { "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, + 8, 16, ], - "regex": Object { - "flags": "", - "pattern": "foo.", - }, - "type": "RegularExpression", - "value": "/foo./", + "type": "Keyword", + "value": "function", }, 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[`javascript fixtures/regexUFlag/regex-u-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": 40, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 40, - ], - "raw": "/[\\\\u{0000000000000061}-\\\\u{7A}]/u", - "regex": Object { - "flags": "u", - "pattern": "[\\\\u{0000000000000061}-\\\\u{7A}]", - }, - "type": "Literal", - "value": Object {}, - }, - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 40, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", "loc": Object { "end": Object { - "column": 41, + "column": 21, "line": 1, }, "start": Object { - "column": 0, + "column": 18, "line": 1, }, }, "range": Array [ - 0, - 41, + 18, + 21, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "...", }, - }, - "range": Array [ - 0, - 42, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 22, "line": 1, }, "start": Object { - "column": 0, + "column": 21, "line": 1, }, }, "range": Array [ - 0, - 3, + 21, + 22, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 23, "line": 1, }, "start": Object { - "column": 4, + "column": 22, "line": 1, }, }, "range": Array [ - 4, - 5, + 22, + 23, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 25, "line": 1, }, "start": Object { - "column": 6, + "column": 24, "line": 1, }, }, "range": Array [ - 6, - 7, + 24, + 25, ], "type": "Punctuator", - "value": "=", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 40, + "column": 26, "line": 1, }, "start": Object { - "column": 8, + "column": 25, "line": 1, }, }, "range": Array [ - 8, - 40, + 25, + 26, ], - "regex": Object { - "flags": "u", - "pattern": "[\\\\u{0000000000000061}-\\\\u{7A}]", - }, - "type": "RegularExpression", - "value": "/[\\\\u{0000000000000061}-\\\\u{7A}]/u", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 41, + "column": 27, "line": 1, }, "start": Object { - "column": 40, + "column": 26, "line": 1, }, }, "range": Array [ - 40, - 41, + 26, + 27, ], "type": "Punctuator", "value": ";", @@ -103641,7 +129992,7 @@ Object { } `; -exports[`javascript fixtures/regexUFlag/regex-u-invalid-extended-escape.src 1`] = ` +exports[`javascript fixtures/restParams/func-expression-multi.src 1`] = ` Object { "body": Array [ Object { @@ -103666,31 +130017,102 @@ Object { "type": "Identifier", }, "init": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 28, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 21, + "column": 28, "line": 1, }, "start": Object { "column": 8, "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", + }, + ], "range": Array [ 8, - 21, + 28, ], - "raw": "/\\\\u{110000}/u", - "regex": Object { - "flags": "u", - "pattern": "\\\\u{110000}", - }, - "type": "Literal", - "value": null, + "type": "FunctionExpression", }, "loc": Object { "end": Object { - "column": 21, + "column": 28, "line": 1, }, "start": Object { @@ -103700,7 +130122,7 @@ Object { }, "range": Array [ 4, - 21, + 28, ], "type": "VariableDeclarator", }, @@ -103708,7 +130130,7 @@ Object { "kind": "var", "loc": Object { "end": Object { - "column": 22, + "column": 29, "line": 1, }, "start": Object { @@ -103718,15 +130140,15 @@ Object { }, "range": Array [ 0, - 22, + 29, ], "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { "column": 0, @@ -103735,7 +130157,7 @@ Object { }, "range": Array [ 0, - 23, + 29, ], "sourceType": "script", "tokens": Array [ @@ -103796,7 +130218,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 16, "line": 1, }, "start": Object { @@ -103806,29 +130228,169 @@ Object { }, "range": Array [ 8, - 21, + 16, ], - "regex": Object { - "flags": "u", - "pattern": "\\\\u{110000}", + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, }, - "type": "RegularExpression", - "value": "/\\\\u{110000}/u", + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": "(", }, 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": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 23, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, ], "type": "Punctuator", "value": ";", @@ -103838,92 +130400,182 @@ Object { } `; -exports[`javascript fixtures/regexUFlag/regex-u-simple.src 1`] = ` +exports[`javascript fixtures/restParams/invalid-rest-param.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ + "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 [ Object { - "id": Object { + "argument": Object { "loc": Object { "end": Object { - "column": 7, + "column": 19, "line": 1, }, "start": Object { - "column": 4, + "column": 14, "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, + "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 [ - 10, - 16, + 14, + 19, ], - "raw": "/foo/u", - "regex": Object { - "flags": "u", - "pattern": "foo", - }, - "type": "Literal", - "value": Object {}, + "type": "ObjectPattern", }, "loc": Object { "end": Object { - "column": 16, + "column": 19, "line": 1, }, "start": Object { - "column": 4, + "column": 11, "line": 1, }, }, "range": Array [ - 4, - 16, + 11, + 19, ], - "type": "VariableDeclarator", + "type": "RestElement", }, ], - "kind": "var", + "range": Array [ + 0, + 22, + ], + "type": "FunctionDeclaration", + }, + Object { "loc": Object { "end": Object { - "column": 17, + "column": 23, "line": 1, }, "start": Object { - "column": 0, + "column": 22, "line": 1, }, }, "range": Array [ - 0, - 17, + 22, + 23, ], - "type": "VariableDeclaration", + "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { "column": 0, @@ -103932,14 +130584,14 @@ Object { }, "range": Array [ 0, - 18, + 23, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 8, "line": 1, }, "start": Object { @@ -103949,280 +130601,187 @@ Object { }, "range": Array [ 0, - 3, + 8, ], "type": "Keyword", - "value": "var", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 10, "line": 1, }, "start": Object { - "column": 4, + "column": 9, "line": 1, }, }, "range": Array [ - 4, - 7, + 9, + 10, ], "type": "Identifier", - "value": "foo", + "value": "x", }, 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": 16, + "column": 14, "line": 1, }, "start": Object { - "column": 10, + "column": 11, "line": 1, }, }, "range": Array [ - 10, - 16, + 11, + 14, ], - "regex": Object { - "flags": "u", - "pattern": "foo", - }, - "type": "RegularExpression", - "value": "/foo/u", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 15, "line": 1, }, "start": Object { - "column": 16, + "column": 14, "line": 1, }, }, "range": Array [ - 16, - 17, + 14, + 15, ], "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": 17, "line": 1, }, "start": Object { - "column": 0, + "column": 16, "line": 1, }, }, "range": Array [ - 0, + 16, 17, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "sourceType": "script", - "tokens": Array [ + "type": "Identifier", + "value": "a", + }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 19, "line": 1, }, "start": Object { - "column": 0, + "column": 18, "line": 1, }, }, "range": Array [ - 0, - 3, + 18, + 19, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 20, "line": 1, }, "start": Object { - "column": 4, + "column": 19, "line": 1, }, }, "range": Array [ - 4, - 7, + 19, + 20, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ")", }, 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": 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": "RegularExpression", - "value": "/foo/y", + "type": "Punctuator", + "value": "}", }, 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": ";", @@ -104232,7 +130791,7 @@ Object { } `; -exports[`javascript fixtures/restParams/basic-rest.src 1`] = ` +exports[`javascript fixtures/restParams/single-rest.src 1`] = ` Object { "body": Array [ Object { @@ -104241,17 +130800,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 22, + "column": 19, "line": 1, }, "start": Object { - "column": 20, + "column": 17, "line": 1, }, }, "range": Array [ - 20, - 22, + 17, + 19, ], "type": "BlockStatement", }, @@ -104277,7 +130836,7 @@ Object { }, "loc": Object { "end": Object { - "column": 22, + "column": 19, "line": 1, }, "start": Object { @@ -104286,87 +130845,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", }, ], "range": Array [ 0, - 22, + 19, ], "type": "FunctionDeclaration", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 1, }, "start": Object { - "column": 22, + "column": 19, "line": 1, }, }, "range": Array [ - 22, - 23, + 19, + 20, ], "type": "EmptyStatement", }, ], "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 1, }, "start": Object { @@ -104376,7 +130917,7 @@ Object { }, "range": Array [ 0, - 23, + 20, ], "sourceType": "script", "tokens": Array [ @@ -104437,7 +130978,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { @@ -104447,43 +130988,7 @@ Object { }, "range": Array [ 11, - 12, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ 14, - 17, ], "type": "Punctuator", "value": "...", @@ -104491,17 +130996,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 18, + "column": 15, "line": 1, }, "start": Object { - "column": 17, + "column": 14, "line": 1, }, }, "range": Array [ - 17, - 18, + 14, + 15, ], "type": "Identifier", "value": "b", @@ -104509,17 +131014,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 16, "line": 1, }, "start": Object { - "column": 18, + "column": 15, "line": 1, }, }, "range": Array [ - 18, - 19, + 15, + 16, ], "type": "Punctuator", "value": ")", @@ -104527,17 +131032,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, + "column": 18, "line": 1, }, "start": Object { - "column": 20, + "column": 17, "line": 1, }, }, "range": Array [ - 20, - 21, + 17, + 18, ], "type": "Punctuator", "value": "{", @@ -104545,17 +131050,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 19, "line": 1, }, "start": Object { - "column": 21, + "column": 18, "line": 1, }, }, "range": Array [ - 21, - 22, + 18, + 19, ], "type": "Punctuator", "value": "}", @@ -104563,17 +131068,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 1, }, "start": Object { - "column": 22, + "column": 19, "line": 1, }, }, "range": Array [ - 22, - 23, + 19, + 20, ], "type": "Punctuator", "value": ";", @@ -104583,165 +131088,71 @@ Object { } `; -exports[`javascript fixtures/restParams/class-constructor.src 1`] = ` +exports[`javascript fixtures/simple-literals/literal-float.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, + "column": 7, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 6, + "line": 1, }, }, + "name": "a", "range": Array [ - 14, - 41, + 6, + 7, ], - "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", + "type": "Identifier", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 2, - }, + "start": Object { + "column": 10, + "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", - }, - "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", }, + "range": Array [ + 10, + 13, + ], + "raw": "1.5", + "type": "Literal", + "value": 1.5, }, - ], - "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, - }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "range": Array [ + 6, + 13, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "const", "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 14, + "line": 1, }, "start": Object { "column": 0, @@ -104750,16 +131161,15 @@ Object { }, "range": Array [ 0, - 43, + 14, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 2, }, "start": Object { "column": 0, @@ -104768,7 +131178,7 @@ Object { }, "range": Array [ 0, - 44, + 15, ], "sourceType": "script", "tokens": Array [ @@ -104788,7 +131198,7 @@ Object { 5, ], "type": "Keyword", - "value": "class", + "value": "const", }, Object { "loc": Object { @@ -104806,7 +131216,7 @@ Object { 7, ], "type": "Identifier", - "value": "A", + "value": "a", }, Object { "loc": Object { @@ -104824,316 +131234,133 @@ Object { 9, ], "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 19, - "line": 2, - }, - }, - "range": Array [ - 29, - 32, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 34, - 35, - ], - "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 13, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 10, + "line": 1, }, }, "range": Array [ - 40, - 41, + 10, + 13, ], - "type": "Punctuator", - "value": "}", + "type": "Numeric", + "value": "1.5", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 14, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 13, + "line": 1, }, }, "range": Array [ - 42, - 43, + 13, + 14, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/restParams/class-method.src 1`] = ` +exports[`javascript fixtures/simple-literals/literal-float-negative.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": 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": 7, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 11, + "line": 1, }, }, - "name": "foo", "range": Array [ + 11, 14, - 17, ], - "type": "Identifier", + "raw": "1.5", + "type": "Literal", + "value": 1.5, }, - "kind": "method", "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, }, }, + "operator": "-", + "prefix": true, "range": Array [ + 10, 14, - 33, ], - "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", - }, - "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", - }, - }, - ], - "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, + "type": "UnaryExpression", }, - "start": Object { - "column": 6, - "line": 1, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "range": Array [ + 6, + 14, + ], + "type": "VariableDeclarator", }, - "name": "A", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "const", "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 15, + "line": 1, }, "start": Object { "column": 0, @@ -105142,16 +131369,15 @@ Object { }, "range": Array [ 0, - 35, + 15, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 2, }, "start": Object { "column": 0, @@ -105160,7 +131386,7 @@ Object { }, "range": Array [ 0, - 36, + 16, ], "sourceType": "script", "tokens": Array [ @@ -105180,7 +131406,7 @@ Object { 5, ], "type": "Keyword", - "value": "class", + "value": "const", }, Object { "loc": Object { @@ -105198,7 +131424,7 @@ Object { 7, ], "type": "Identifier", - "value": "A", + "value": "a", }, Object { "loc": Object { @@ -105216,259 +131442,338 @@ Object { 9, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "-", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, }, }, "range": Array [ + 11, 14, - 17, ], - "type": "Identifier", - "value": "foo", + "type": "Numeric", + "value": "1.5", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 17, - 18, + 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": 11, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 18, - 21, + 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": 14, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 21, - 24, + 0, + 5, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 7, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ - 24, - 25, + 6, + 7, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 9, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 8, + "line": 1, }, }, "range": Array [ - 26, - 27, + 8, + 9, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 14, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 10, + "line": 1, }, }, "range": Array [ - 32, - 33, + 10, + 14, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 15, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 14, + "line": 1, }, }, "range": Array [ - 34, - 35, + 14, + 15, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`javascript fixtures/restParams/error-no-default.src 1`] = ` +exports[`javascript fixtures/simple-literals/literal-number.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": null, - "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 [ + "declarations": Array [ Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "name": "a", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", }, - "name": "a", - "range": Array [ - 11, - 12, - ], - "type": "Identifier", - }, - Object { - "argument": Object { + "init": Object { "loc": Object { "end": Object { - "column": 18, + "column": 11, "line": 1, }, "start": Object { - "column": 17, + "column": 10, "line": 1, }, }, - "name": "b", "range": Array [ - 17, - 18, + 10, + 11, ], - "type": "Identifier", + "raw": "1", + "type": "Literal", + "value": 1, }, "loc": Object { "end": Object { - "column": 22, + "column": 11, "line": 1, }, "start": Object { - "column": 14, + "column": 6, "line": 1, }, }, "range": Array [ - 14, - 22, + 6, + 11, ], - "type": "RestElement", + "type": "VariableDeclarator", }, ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, "range": Array [ 0, - 24, + 12, ], - "type": "FunctionDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -105477,14 +131782,14 @@ Object { }, "range": Array [ 0, - 24, + 13, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { @@ -105494,28 +131799,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": "f", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { @@ -105532,8 +131855,8 @@ Object { 10, 11, ], - "type": "Punctuator", - "value": "(", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { @@ -105550,77 +131873,177 @@ Object { 11, 12, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "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": 13, "line": 1, }, "start": Object { - "column": 12, + "column": 0, "line": 1, }, }, "range": Array [ - 12, + 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": 14, + "column": 0, "line": 1, }, }, "range": Array [ - 14, - 17, + 0, + 5, ], - "type": "Punctuator", - "value": "...", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 7, "line": 1, }, "start": Object { - "column": 17, + "column": 6, "line": 1, }, }, "range": Array [ - 17, - 18, + 6, + 7, ], "type": "Identifier", - "value": "b", + "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": "=", @@ -105628,53 +132051,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 11, "line": 1, }, "start": Object { - "column": 21, + "column": 10, "line": 1, }, }, "range": Array [ - 21, - 22, + 10, + 11, ], - "type": "Numeric", - "value": "0", + "type": "Punctuator", + "value": "-", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 12, "line": 1, }, "start": Object { - "column": 22, + "column": 11, "line": 1, }, }, "range": Array [ - 22, - 23, + 11, + 12, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 13, "line": 1, }, "start": Object { - "column": 23, + "column": 12, "line": 1, }, }, "range": Array [ - 23, - 24, + 12, + 13, ], "type": "Punctuator", "value": ";", @@ -105684,126 +132107,88 @@ Object { } `; -exports[`javascript fixtures/restParams/error-not-last.src 1`] = ` +exports[`javascript fixtures/simple-literals/literal-string.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": null, - "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": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "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", - }, + "declarations": Array [ Object { - "argument": Object { + "id": Object { "loc": Object { "end": Object { - "column": 18, + "column": 7, "line": 1, }, "start": Object { - "column": 17, + "column": 6, "line": 1, }, }, - "name": "b", + "name": "a", "range": Array [ - 17, - 18, + 6, + 7, ], "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, + "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", }, - "range": Array [ - 14, - 18, - ], - "type": "RestElement", - }, - Object { "loc": Object { "end": Object { - "column": 21, + "column": 13, "line": 1, }, "start": Object { - "column": 20, + "column": 6, "line": 1, }, }, - "name": "c", "range": Array [ - 20, - 21, + 6, + 13, ], - "type": "Identifier", + "type": "VariableDeclarator", }, ], + "kind": "const", + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, "range": Array [ 0, - 23, + 14, ], - "type": "FunctionDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -105812,14 +132197,14 @@ Object { }, "range": Array [ 0, - 23, + 15, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { @@ -105829,187 +132214,267 @@ 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": 9, + "column": 6, "line": 1, }, }, "range": Array [ - 9, - 10, + 6, + 7, ], "type": "Identifier", - "value": "f", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 9, "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, - 11, + 8, + 9, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 10, "line": 1, }, }, "range": Array [ - 11, - 12, + 10, + 13, ], - "type": "Identifier", - "value": "a", + "type": "String", + "value": "'a'", }, 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": ";", }, + ], + "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": 17, + "column": 20, "line": 1, }, "start": Object { - "column": 14, + "column": 0, "line": 1, }, }, "range": Array [ - 14, - 17, + 0, + 20, ], - "type": "Punctuator", - "value": "...", + "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": 18, + "column": 5, "line": 1, }, "start": Object { - "column": 17, + "column": 0, "line": 1, }, }, "range": Array [ - 17, - 18, - ], - "type": "Identifier", - "value": "b", + 0, + 5, + ], + "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": 21, + "column": 9, "line": 1, }, "start": Object { - "column": 20, + "column": 8, "line": 1, }, }, "range": Array [ - 20, - 21, + 8, + 9, ], - "type": "Identifier", - "value": "c", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 19, "line": 1, }, "start": Object { - "column": 21, + "column": 10, "line": 1, }, }, "range": Array [ - 21, - 22, + 10, + 19, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "undefined", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 20, "line": 1, }, "start": Object { - "column": 22, + "column": 19, "line": 1, }, }, "range": Array [ - 22, - 23, + 19, + 20, ], "type": "Punctuator", "value": ";", @@ -106019,37 +132484,197 @@ Object { } `; -exports[`javascript fixtures/restParams/func-expression.src 1`] = ` +exports[`javascript fixtures/spread/complex-spread.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 102, + "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": "x", + "range": Array [ + 2, + 3, + ], + "type": "Identifier", }, - "start": Object { - "column": 4, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 2, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 2, + 22, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "ka", + "range": Array [ + 7, + 9, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 7, + 9, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "ka", + "range": Array [ + 7, + 9, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "nested", + "range": Array [ + 14, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 20, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 5, + 22, + ], + "type": "ObjectPattern", }, }, - "name": "x", - "range": Array [ - 4, - 5, - ], - "type": "Identifier", - }, - "init": Object { - "async": false, - "body": Object { - "body": Array [], + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 24, + 25, + ], + "type": "Identifier", + }, + "kind": "init", "loc": Object { "end": Object { - "column": 26, + "column": 32, "line": 1, }, "start": Object { @@ -106057,89 +132682,502 @@ Object { "line": 1, }, }, + "method": false, "range": Array [ 24, - 26, + 32, ], - "type": "BlockStatement", + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "name": "other", + "range": Array [ + 27, + 32, + ], + "type": "Identifier", + }, }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 26, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 34, + 35, + ], + "type": "Identifier", }, - "start": Object { - "column": 8, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 92, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, }, - }, - "params": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, + "method": false, + "range": Array [ + 34, + 92, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 92, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 39, + 40, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 64, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 39, + 64, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "properties": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 1, + }, + "start": Object { + "column": 48, + "line": 1, + }, + }, + "name": "nested2", + "range": Array [ + 48, + 55, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 55, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 55, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 43, + 57, + ], + "type": "ObjectPattern", + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 63, + "line": 1, + }, + "start": Object { + "column": 62, + "line": 1, + }, + }, + "name": "y", + "range": Array [ + 62, + 63, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 63, + "line": 1, + }, + "start": Object { + "column": 59, + "line": 1, + }, + }, + "range": Array [ + 59, + 63, + ], + "type": "RestElement", + }, + ], + "loc": Object { + "end": Object { + "column": 64, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 64, + ], + "type": "ArrayPattern", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 67, + "line": 1, + }, + "start": Object { + "column": 66, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 66, + 67, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 80, + "line": 1, + }, + "start": Object { + "column": 66, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 66, + 80, + ], + "shorthand": false, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 80, + "line": 1, + }, + "start": Object { + "column": 69, + "line": 1, + }, + }, + "properties": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 72, + "line": 1, + }, + "start": Object { + "column": 71, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 71, + 72, + ], + "type": "Identifier", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 72, + "line": 1, + }, + "start": Object { + "column": 71, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 71, + 72, + ], + "shorthand": true, + "type": "Property", + "value": Object { + "loc": Object { + "end": Object { + "column": 72, + "line": 1, + }, + "start": Object { + "column": 71, + "line": 1, + }, + }, + "name": "z", + "range": Array [ + 71, + 72, + ], + "type": "Identifier", + }, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 78, + "line": 1, + }, + "start": Object { + "column": 77, + "line": 1, + }, + }, + "name": "c", + "range": Array [ + 77, + 78, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 78, + "line": 1, + }, + "start": Object { + "column": 74, + "line": 1, + }, + }, + "range": Array [ + 74, + 78, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 69, + 80, + ], + "type": "ObjectPattern", }, - "start": Object { - "column": 21, - "line": 1, + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 90, + "line": 1, + }, + "start": Object { + "column": 85, + "line": 1, + }, + }, + "name": "rest2", + "range": Array [ + 85, + 90, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 90, + "line": 1, + }, + "start": Object { + "column": 82, + "line": 1, + }, }, + "range": Array [ + 82, + 90, + ], + "type": "RestElement", }, - "name": "a", - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - }, + ], + "range": Array [ + 37, + 92, + ], + "type": "ObjectPattern", + }, + }, + Object { + "argument": Object { "loc": Object { "end": Object { - "column": 22, + "column": 101, "line": 1, }, "start": Object { - "column": 18, + "column": 97, "line": 1, }, }, + "name": "rest", "range": Array [ - 18, - 22, + 97, + 101, ], - "type": "RestElement", + "type": "Identifier", }, - ], - "range": Array [ - 8, - 26, - ], - "type": "FunctionExpression", + "loc": Object { + "end": Object { + "column": 101, + "line": 1, + }, + "start": Object { + "column": 94, + "line": 1, + }, + }, + "range": Array [ + 94, + 101, + ], + "type": "RestElement", + }, + ], + "range": Array [ + 1, + 102, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 112, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, }, + }, + "operator": "=", + "range": Array [ + 1, + 112, + ], + "right": Object { "loc": Object { "end": Object { - "column": 26, + "column": 112, "line": 1, }, "start": Object { - "column": 4, + "column": 105, "line": 1, }, }, + "name": "complex", "range": Array [ - 4, - 26, + 105, + 112, ], - "type": "VariableDeclarator", + "type": "Identifier", }, - ], - "kind": "var", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 27, + "column": 114, "line": 1, }, "start": Object { @@ -106149,15 +133187,15 @@ Object { }, "range": Array [ 0, - 27, + 114, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -106166,14 +133204,14 @@ Object { }, "range": Array [ 0, - 27, + 115, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 1, "line": 1, }, "start": Object { @@ -106183,169 +133221,169 @@ 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": "Identifier", - "value": "x", + "type": "Punctuator", + "value": "{", }, 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": "=", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 4, "line": 1, }, "start": Object { - "column": 8, + "column": 3, "line": 1, }, }, "range": Array [ - 8, - 16, + 3, + 4, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 6, "line": 1, }, "start": Object { - "column": 17, + "column": 5, "line": 1, }, }, "range": Array [ - 17, - 18, + 5, + 6, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 9, "line": 1, }, "start": Object { - "column": 18, + "column": 7, "line": 1, }, }, "range": Array [ - 18, - 21, + 7, + 9, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "ka", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 10, "line": 1, }, "start": Object { - "column": 21, + "column": 9, "line": 1, }, }, "range": Array [ - 21, - 22, + 9, + 10, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 14, "line": 1, }, "start": Object { - "column": 22, + "column": 11, "line": 1, }, }, "range": Array [ - 22, - 23, + 11, + 14, ], "type": "Punctuator", - "value": ")", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 20, "line": 1, }, "start": Object { - "column": 24, + "column": 14, "line": 1, }, }, "range": Array [ - 24, - 25, + 14, + 20, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "nested", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 22, "line": 1, }, "start": Object { - "column": 25, + "column": 21, "line": 1, }, }, "range": Array [ - 25, - 26, + 21, + 22, ], "type": "Punctuator", "value": "}", @@ -106353,299 +133391,161 @@ Object { 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": ",", }, - ], - "type": "Program", -} -`; - -exports[`javascript fixtures/restParams/func-expression-multi.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 { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 28, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 8, - "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", - }, - ], - "range": Array [ - 8, - 28, - ], - "type": "FunctionExpression", - }, - "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, + "column": 25, "line": 1, }, "start": Object { - "column": 0, + "column": 24, "line": 1, }, }, "range": Array [ - 0, - 29, + 24, + 25, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "y", }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 26, "line": 1, }, "start": Object { - "column": 0, + "column": 25, "line": 1, }, }, "range": Array [ - 0, - 3, + 25, + 26, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 32, "line": 1, }, "start": Object { - "column": 4, + "column": 27, "line": 1, }, }, "range": Array [ - 4, - 5, + 27, + 32, ], "type": "Identifier", - "value": "x", + "value": "other", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 33, "line": 1, }, "start": Object { - "column": 6, + "column": 32, "line": 1, }, }, "range": Array [ - 6, - 7, + 32, + 33, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 35, "line": 1, }, "start": Object { - "column": 8, + "column": 34, "line": 1, }, }, "range": Array [ - 8, - 16, + 34, + 35, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 36, "line": 1, }, "start": Object { - "column": 16, + "column": 35, "line": 1, }, }, "range": Array [ - 16, - 17, + 35, + 36, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 38, "line": 1, }, "start": Object { - "column": 17, + "column": 37, "line": 1, }, }, "range": Array [ - 17, - 18, + 37, + 38, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, ], "type": "Identifier", "value": "a", @@ -106653,107 +133553,107 @@ Object { Object { "loc": Object { "end": Object { - "column": 19, + "column": 41, "line": 1, }, "start": Object { - "column": 18, + "column": 40, "line": 1, }, }, "range": Array [ - 18, - 19, + 40, + 41, ], "type": "Punctuator", - "value": ",", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 43, "line": 1, }, "start": Object { - "column": 20, + "column": 42, "line": 1, }, }, "range": Array [ - 20, - 23, + 42, + 43, ], "type": "Punctuator", - "value": "...", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 44, "line": 1, }, "start": Object { - "column": 23, + "column": 43, "line": 1, }, }, "range": Array [ - 23, - 24, + 43, + 44, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 48, "line": 1, }, "start": Object { - "column": 24, + "column": 45, "line": 1, }, }, "range": Array [ - 24, - 25, + 45, + 48, ], "type": "Punctuator", - "value": ")", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 55, "line": 1, }, "start": Object { - "column": 26, + "column": 48, "line": 1, }, }, "range": Array [ - 26, - 27, + 48, + 55, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "nested2", }, 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": "}", @@ -106761,300 +133661,143 @@ Object { Object { "loc": Object { "end": Object { - "column": 29, + "column": 58, "line": 1, }, "start": Object { - "column": 28, + "column": 57, "line": 1, }, }, "range": Array [ - 28, - 29, + 57, + 58, ], "type": "Punctuator", - "value": ";", + "value": ",", }, - ], - "type": "Program", -} -`; - -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 { - "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, + "column": 62, "line": 1, }, "start": Object { - "column": 0, + "column": 59, "line": 1, }, }, - "params": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 14, - "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", - }, - }, - ], - "range": Array [ - 14, - 19, - ], - "type": "ObjectPattern", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 19, - ], - "type": "RestElement", - }, - ], "range": Array [ - 0, - 22, + 59, + 62, ], - "type": "FunctionDeclaration", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 63, "line": 1, }, "start": Object { - "column": 22, + "column": 62, "line": 1, }, }, "range": Array [ - 22, - 23, + 62, + 63, ], - "type": "EmptyStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "y", }, - }, - "range": Array [ - 0, - 23, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 64, "line": 1, }, "start": Object { - "column": 0, + "column": 63, "line": 1, }, }, "range": Array [ - 0, - 8, + 63, + 64, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 65, "line": 1, }, "start": Object { - "column": 9, + "column": 64, "line": 1, }, }, "range": Array [ - 9, - 10, + 64, + 65, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 67, "line": 1, }, "start": Object { - "column": 10, + "column": 66, "line": 1, }, }, "range": Array [ - 10, - 11, + 66, + 67, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 68, "line": 1, }, "start": Object { - "column": 11, + "column": 67, "line": 1, }, }, "range": Array [ - 11, - 14, + 67, + 68, ], "type": "Punctuator", - "value": "...", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 70, "line": 1, }, "start": Object { - "column": 14, + "column": 69, "line": 1, }, }, "range": Array [ - 14, - 15, + 69, + 70, ], "type": "Punctuator", "value": "{", @@ -107062,89 +133805,89 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, + "column": 72, "line": 1, }, "start": Object { - "column": 16, + "column": 71, "line": 1, }, }, "range": Array [ - 16, - 17, + 71, + 72, ], "type": "Identifier", - "value": "a", + "value": "z", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 73, "line": 1, }, "start": Object { - "column": 18, + "column": 72, "line": 1, }, }, "range": Array [ - 18, - 19, + 72, + 73, ], "type": "Punctuator", - "value": "}", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 77, "line": 1, }, "start": Object { - "column": 19, + "column": 74, "line": 1, }, }, "range": Array [ - 19, - 20, + 74, + 77, ], "type": "Punctuator", - "value": ")", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 78, "line": 1, }, "start": Object { - "column": 20, + "column": 77, "line": 1, }, }, "range": Array [ - 20, - 21, + 77, + 78, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 80, "line": 1, }, "start": Object { - "column": 21, + "column": 79, "line": 1, }, }, "range": Array [ - 21, - 22, + 79, + 80, ], "type": "Punctuator", "value": "}", @@ -107152,314 +133895,215 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, + "column": 81, "line": 1, }, "start": Object { - "column": 22, + "column": 80, "line": 1, }, }, "range": Array [ - 22, - 23, + 80, + 81, ], "type": "Punctuator", - "value": ";", + "value": ",", }, - ], - "type": "Program", -} -`; - -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 { - "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, + "column": 85, "line": 1, }, "start": Object { - "column": 0, + "column": 82, "line": 1, }, }, - "params": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "b", - "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", - }, - ], "range": Array [ - 0, - 19, + 82, + 85, ], - "type": "FunctionDeclaration", + "type": "Punctuator", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 90, "line": 1, }, "start": Object { - "column": 19, + "column": 85, "line": 1, }, }, "range": Array [ - 19, - 20, + 85, + 90, ], - "type": "EmptyStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "rest2", }, - }, - "range": Array [ - 0, - 20, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 92, "line": 1, }, "start": Object { - "column": 0, + "column": 91, "line": 1, }, }, "range": Array [ - 0, - 8, + 91, + 92, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 93, "line": 1, }, "start": Object { - "column": 9, + "column": 92, "line": 1, }, }, "range": Array [ - 9, - 10, + 92, + 93, ], - "type": "Identifier", - "value": "f", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 97, "line": 1, }, "start": Object { - "column": 10, + "column": 94, "line": 1, }, }, "range": Array [ - 10, - 11, + 94, + 97, ], "type": "Punctuator", - "value": "(", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 101, "line": 1, }, "start": Object { - "column": 11, + "column": 97, "line": 1, }, }, "range": Array [ - 11, - 14, + 97, + 101, ], - "type": "Punctuator", - "value": "...", + "type": "Identifier", + "value": "rest", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 102, "line": 1, }, "start": Object { - "column": 14, + "column": 101, "line": 1, }, }, "range": Array [ - 14, - 15, + 101, + 102, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 104, "line": 1, }, "start": Object { - "column": 15, + "column": 103, "line": 1, }, }, "range": Array [ - 15, - 16, + 103, + 104, ], "type": "Punctuator", - "value": ")", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 112, "line": 1, }, "start": Object { - "column": 17, + "column": 105, "line": 1, }, }, "range": Array [ - 17, - 18, + 105, + 112, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "complex", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 113, "line": 1, }, "start": Object { - "column": 18, + "column": 112, "line": 1, }, }, "range": Array [ - 18, - 19, + 112, + 113, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 114, "line": 1, }, "start": Object { - "column": 19, + "column": 113, "line": 1, }, }, "range": Array [ - 19, - 20, + 113, + 114, ], "type": "Punctuator", "value": ";", @@ -111090,6 +137734,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 { @@ -111187,6 +137832,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__/semantic-diagnostics-enabled.ts.snap b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap new file mode 100644 index 0000000..312d444 --- /dev/null +++ b/tests/lib/__snapshots__/semantic-diagnostics-enabled.ts.snap @@ -0,0 +1,2525 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/block-trailing-comment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/comment-within-condition.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/export-default-anonymous-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsdoc-comment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/no-comment-regex.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/no-comment-template.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-call-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-debugger-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-return-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-throw-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-while-loop-comments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-fallthrough-comment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-no-default-comment.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/template-string-block.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/type-assertion-regression-test.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/as-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/basic.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/block-body.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-dup-params.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-eval.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-octal.src.js.src 1`] = ` +Object { + "column": 21, + "index": 21, + "lineNumber": 1, + "message": "Octal literals are not allowed in strict mode.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-two-lines.src.js.src 1`] = ` +Object { + "column": 1, + "index": 12, + "lineNumber": 2, + "message": "Line terminator not permitted before arrow.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/iife.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/multiple-params.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/no-auto-return.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-arguments.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-eval.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-octal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/return-arrow-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/return-sequence.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/single-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/single-param-parens.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/and-operator-array-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/delete-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/do-while-statements.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/identifiers-double-underscore.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/instanceof.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/new-without-parens.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/or-operator-array-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/typeof-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/update-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/void-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/binary.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/decimal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/hex.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/octal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/invalid.src.js.src 1`] = ` +Object { + "column": 4, + "index": 4, + "lineNumber": 1, + "message": "';' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/lowercase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/uppercase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/blockBindings/const.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/blockBindings/let.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/blockBindings/let-in-switchcase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/call-expression-with-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/call-expression-with-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/mixed-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/new-expression-with-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/new-expression-with-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-accessor-properties.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-one-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-with-constructor.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/derived-class-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/empty-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/empty-class-semi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-declaration.src.js.src 1`] = ` +Object { + "column": 0, + "index": 0, + "lineNumber": 1, + "message": "A class declaration without the 'default' modifier must have a name.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-setter-declaration.src.js.src 1`] = ` +Object { + "column": 14, + "index": 14, + "lineNumber": 1, + "message": "A 'set' accessor must have exactly one parameter.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/named-class-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/class-constructor.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/class-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/declaration.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/not-all-params.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/array-member.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/array-to-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/array-var-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/call-expression-destruction-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/call-expression-destruction-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-all.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-all.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-assign.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-longform.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/destructured-array-catch.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/destructured-object-catch.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/invalid-defaults-object-assign.src.js.src 1`] = ` +Object { + "column": 0, + "index": 0, + "lineNumber": 1, + "message": "The left-hand side of an assignment expression must be a variable or a property access.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/named-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/nested-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/nested-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/object-var-named.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/object-var-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/param-defaults-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/param-defaults-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-array-wrapped.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-multi-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-nested-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-nested-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-object-wrapped.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/sparse-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-forOf/loop.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src.js.src 1`] = ` +Object { + "column": 1, + "index": 1, + "lineNumber": 1, + "message": "A rest element must be last in a destructuring pattern.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/not-final-array.src.js.src 1`] = ` +Object { + "column": 1, + "index": 1, + "lineNumber": 1, + "message": "A rest element must be last in a destructuring pattern.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/block.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/directive-in-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/function-non-strict.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/non-directive-string.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/program.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/program-order.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/raw.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalAsyncIteration/async-generators.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalAsyncIteration/async-iterator.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalDynamicImport/dynamic-import.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/arg-spread.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/destructuring-assign-mirror.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/invalid-rest.src.js.src 1`] = ` +Object { + "column": 18, + "index": 18, + "lineNumber": 1, + "message": "',' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/object-rest.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/property-spread.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/shorthand-method-args.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/shorthand-methods.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/shorthand-properties.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/single-spread.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/spread-trailing-comma.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/two-spread.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/exponentiationOperators/exponential-operators.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-empty.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-loop.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-with-coma.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-with-const.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-with-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-with-let.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-destruction.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-destruction-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-object-with-body.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-rest.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-destruction.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-destruction-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-function-initializer.src.js.src 1`] = ` +Object { + "column": 9, + "index": 9, + "lineNumber": 1, + "message": "The variable declaration of a 'for...of' statement cannot have an initializer.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-rest.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/anonymous-generator.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/async-generator-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/async-generator-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/double-yield.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/empty-generator-declaration.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/generator-declaration.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/yield-delegation.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/yield-without-value.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/globalReturn/return-identifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/globalReturn/return-no-arg.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/globalReturn/return-true.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/importMeta/simple-import-meta.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/labels/label-break.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/labels/label-continue.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/error-delete.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/error-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/error-strict.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-array.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-number.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-object.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-value.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-batch.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-default.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-function.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-empty.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-var.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-var-number.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-default.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-default-as.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-jquery.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-module.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-empty.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-specifiers.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-namespace-specifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-await.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-class.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-module-specifier.src.js.src 1`] = ` +Object { + "column": 16, + "index": 16, + "lineNumber": 1, + "message": "String literal expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-module-specifier.src.js.src 1`] = ` +Object { + "column": 18, + "index": 18, + "lineNumber": 1, + "message": "String literal expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/invalid-new-target.src.js.src 1`] = ` +Object { + "column": 8, + "index": 8, + "lineNumber": 1, + "message": "Meta-property 'new.target' is only allowed in the body of a function declaration, function expression, or constructor.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/invalid-unknown-property.src.js.src 1`] = ` +Object { + "column": 25, + "index": 25, + "lineNumber": 1, + "message": "'unknown_property' is not a valid meta-property for keyword 'new'. Did you mean 'target'?", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/simple-new-target.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-addition-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-and-identifier.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-string-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-variable-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/standalone-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/error-proto-property.src.js.src 1`] = ` +Object { + "column": 1, + "index": 62, + "lineNumber": 7, + "message": "An object literal cannot have multiple properties with the same name in strict mode.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src.js.src 1`] = ` +Object { + "column": 1, + "index": 39, + "lineNumber": 5, + "message": "An object literal cannot have multiple properties with the same name in strict mode.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/method-property.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandProperties/shorthand-properties.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/invalid.src.js.src 1`] = ` +Object { + "column": 4, + "index": 4, + "lineNumber": 1, + "message": "';' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/lowercase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/strict-uppercase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/uppercase.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regex/regexp-simple.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regexUFlag/regex-u-simple.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regexYFlag/regexp-y-simple.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/basic-rest.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/class-constructor.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/class-method.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/error-no-default.src.js.src 1`] = ` +Object { + "column": 17, + "index": 17, + "lineNumber": 1, + "message": "A rest parameter cannot have an initializer.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/error-not-last.src.js.src 1`] = ` +Object { + "column": 14, + "index": 14, + "lineNumber": 1, + "message": "A rest parameter must be last in a parameter list.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/func-expression.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/func-expression-multi.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/invalid-rest-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/single-rest.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-float.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-null.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-number.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-string.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-undefined.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/complex-spread.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/multi-function-call.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/not-final-param.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/simple-function-call.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/deeply-nested.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/error-octal-literal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/escape-characters.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/expressions.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/simple-template-string.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/single-dollar-sign.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/tagged-no-placeholders.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/tagged-template-string.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/basic-string-literal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/complex-string-literal.src.js.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/attributes.src.js.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/element-keyword-name.src.js.src 1`] = ` +Object { + "column": 12, + "index": 18, + "lineNumber": 2, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/embedded-conditional.src.js.src 1`] = ` +Object { + "column": 3, + "index": 3, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/embedded-tags.src.js.src 1`] = ` +Object { + "column": 11, + "index": 11, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/escape-patterns.src.js.src 1`] = ` +Object { + "column": 3, + "index": 3, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-attribute.src.js.src 1`] = ` +Object { + "column": 3, + "index": 3, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-broken-tag.src.js.src 1`] = ` +Object { + "column": 3, + "index": 3, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-embedded-expression.src.js.src 1`] = ` +Object { + "column": 9, + "index": 9, + "lineNumber": 1, + "message": "':' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-unexpected-comma.src.js.src 1`] = ` +Object { + "column": 6, + "index": 6, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/japanese-characters.src.js.src 1`] = ` +Object { + "column": 6, + "index": 6, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/less-than-operator.src.js.src 1`] = ` +Object { + "column": 6, + "index": 6, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/member-expression.src.js.src 1`] = ` +Object { + "column": 6, + "index": 6, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/member-expression-this.src.js.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/newslines-and-entities.src.js.src 1`] = ` +Object { + "column": 4, + "index": 4, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/self-closing-tag.src.js.src 1`] = ` +Object { + "column": 3, + "index": 3, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/shorthand-fragment.src.js.src 1`] = ` +Object { + "column": 1, + "index": 1, + "lineNumber": 1, + "message": "Type expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/spread-operator-attributes.src.js.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/test-content.src.js.src 1`] = ` +Object { + "column": 5, + "index": 5, + "lineNumber": 1, + "message": "Expression expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/unknown-escape-pattern.src.js.src 1`] = ` +Object { + "column": 3, + "index": 3, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/semanticInfo/export-file.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/semanticInfo/import-file.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/semanticInfo/isolated-file.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/generic-jsx-element.src.tsx.src 1`] = ` +Object { + "column": 21, + "index": 21, + "lineNumber": 1, + "message": "'>' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/react-typed-props.src.tsx.src 1`] = ` +Object { + "column": 12, + "index": 141, + "lineNumber": 9, + "message": "',' expected.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/babylon-convergence/type-parameters.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-constructor.src.ts.src 1`] = ` +Object { + "column": 4, + "index": 43, + "lineNumber": 2, + "message": "'abstract' modifier can only appear on a class, method, or property declaration.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-interface.src.ts.src 1`] = ` +Object { + "column": 7, + "index": 7, + "lineNumber": 1, + "message": "'abstract' modifier can only appear on a class, method, or property declaration.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/async-function-expression.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/call-signatures.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-expression.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-multi.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-operator.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-simple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-export-parameter-properties.src.ts.src 1`] = ` +Object { + "column": 16, + "index": 28, + "lineNumber": 2, + "message": "'export' modifier cannot appear on a parameter.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements-and-extends.src.ts.src 1`] = ` +Object { + "column": 57, + "index": 57, + "lineNumber": 1, + "message": "'extends' clause must precede 'implements' clause.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-mixin.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-property-values.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-static-parameter-properties.src.ts.src 1`] = ` +Object { + "column": 16, + "index": 28, + "lineNumber": 2, + "message": "'static' modifier cannot appear on a parameter.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/const-enum.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/declare-function.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment-nested.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment-object.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment-property.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/directive-in-module.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/directive-in-namespace.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-as-namespace.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-assignment.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-declare-const-named-enum.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-declare-named-enum.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-enum.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-overloads.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-await.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-types.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-equal-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-extends.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-extends-multiple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-type-parameters.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src.ts.src 1`] = ` +Object { + "column": 9, + "index": 26, + "lineNumber": 2, + "message": "A parameter property is only allowed in a constructor implementation.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-jsdoc.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-method.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/keyof-operator.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/nested-type-arguments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/never-type-param.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/parenthesized-use-strict.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/symbol-type-param.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-declaration.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-assertion.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard-in-arrow-function.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard-in-function.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard-in-interface.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard-in-method.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-parameters-comments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-reference-comments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-bigint.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-boolean.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-false.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-never.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-null.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-number.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-object.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-string.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-symbol.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-true.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-undefined.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-unknown.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-void.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-method-signature.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-this.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/unique-symbol.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/unknown-type-annotation.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/var-with-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/abstract-class.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/class.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/enum.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/function.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/interface.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/module.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/namespace.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/type-alias.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/variable.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-empty-extends.src.ts.src 1`] = ` +Object { + "column": 17, + "index": 17, + "lineNumber": 1, + "message": "'extends' list cannot be empty.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-empty-extends-implements.src.ts.src 1`] = ` +Object { + "column": 17, + "index": 17, + "lineNumber": 1, + "message": "'extends' list cannot be empty.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-extends-empty-implements.src.ts.src 1`] = ` +Object { + "column": 32, + "index": 32, + "lineNumber": 1, + "message": "'implements' list cannot be empty.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-multiple-implements.src.ts.src 1`] = ` +Object { + "column": 21, + "index": 21, + "lineNumber": 1, + "message": "'implements' clause already seen.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-enum-declaration.src.ts.src 1`] = ` +Object { + "column": 0, + "index": 0, + "lineNumber": 1, + "message": "Decorators are not valid here.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-interface-declaration.src.ts.src 1`] = ` +Object { + "column": 0, + "index": 0, + "lineNumber": 1, + "message": "Decorators are not valid here.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-arguments.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/enum-with-keywords.src.ts.src 1`] = ` +Object { + "column": 7, + "index": 7, + "lineNumber": 1, + "message": "'private' modifier cannot appear on a module or namespace element.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/index-signature-parameters.src.ts.src 1`] = ` +Object { + "column": 3, + "index": 16, + "lineNumber": 2, + "message": "An index signature must have exactly one parameter.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-empty-extends.src.ts.src 1`] = ` +Object { + "column": 21, + "index": 21, + "lineNumber": 1, + "message": "'extends' list cannot be empty.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-implements.src.ts.src 1`] = ` +Object { + "column": 12, + "index": 12, + "lineNumber": 1, + "message": "Interface declaration cannot have 'implements' clause.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-export.src.ts.src 1`] = ` +Object { + "column": 2, + "index": 18, + "lineNumber": 2, + "message": "'export' modifier cannot appear on an index signature.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-private.src.ts.src 1`] = ` +Object { + "column": 2, + "index": 18, + "lineNumber": 2, + "message": "'private' modifier cannot appear on an index signature.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-protected.src.ts.src 1`] = ` +Object { + "column": 2, + "index": 18, + "lineNumber": 2, + "message": "'protected' modifier cannot appear on an index signature.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-public.src.ts.src 1`] = ` +Object { + "column": 2, + "index": 18, + "lineNumber": 2, + "message": "'public' modifier cannot appear on an index signature.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-static.src.ts.src 1`] = ` +Object { + "column": 2, + "index": 18, + "lineNumber": 2, + "message": "'static' modifier cannot appear on an index signature.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-export.src.ts.src 1`] = ` +Object { + "column": 4, + "index": 20, + "lineNumber": 2, + "message": "'export' modifier cannot appear on a type member.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-private.src.ts.src 1`] = ` +Object { + "column": 4, + "index": 20, + "lineNumber": 2, + "message": "'private' modifier cannot appear on a type member.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-protected.src.ts.src 1`] = ` +Object { + "column": 2, + "index": 18, + "lineNumber": 2, + "message": "'protected' modifier cannot appear on a type member.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-public.src.ts.src 1`] = ` +Object { + "column": 4, + "index": 20, + "lineNumber": 2, + "message": "'public' modifier cannot appear on a type member.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-static.src.ts.src 1`] = ` +Object { + "column": 2, + "index": 18, + "lineNumber": 2, + "message": "'static' modifier cannot appear on a type member.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-multiple-extends.src.ts.src 1`] = ` +Object { + "column": 26, + "index": 26, + "lineNumber": 1, + "message": "'extends' clause already seen.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-export.src.ts.src 1`] = ` +Object { + "column": 2, + "index": 18, + "lineNumber": 2, + "message": "'export' modifier cannot appear on a type member.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-private.src.ts.src 1`] = ` +Object { + "column": 2, + "index": 18, + "lineNumber": 2, + "message": "'private' modifier cannot appear on a type member.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-protected.src.ts.src 1`] = ` +Object { + "column": 2, + "index": 18, + "lineNumber": 2, + "message": "'protected' modifier cannot appear on a type member.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-public.src.ts.src 1`] = ` +Object { + "column": 4, + "index": 20, + "lineNumber": 2, + "message": "'public' modifier cannot appear on a type member.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-static.src.ts.src 1`] = ` +Object { + "column": 2, + "index": 18, + "lineNumber": 2, + "message": "'static' modifier cannot appear on a type member.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-with-default-value.src.ts.src 1`] = ` +Object { + "column": 16, + "index": 32, + "lineNumber": 2, + "message": "An interface property cannot have an initializer.", +} +`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" 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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/array-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-infer.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-infer-nested.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-infer-simple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-with-null.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor-in-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor-with-rest.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-in-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-with-rest.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-with-this.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/index-signature.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/index-signature-readonly.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/index-signature-without-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/indexed.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/intersection-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/literal-number.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/literal-number-negative.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/literal-string.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped-readonly.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped-readonly-minus.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped-readonly-plus.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/nested-types.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/parenthesized-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/reference.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/reference-generic.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/reference-generic-nested.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/this-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/this-type-expanded.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-empty.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-optional.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-rest.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/type-literal.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/type-operator.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/typeof.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/union-intersection.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; + +exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/union-type.src.ts.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; 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..183fd7e 100644 --- a/tests/lib/__snapshots__/typescript.ts.snap +++ b/tests/lib/__snapshots__/typescript.ts.snap @@ -82,7 +82,24 @@ Object { "line": 1, }, }, - "name": "T", + "name": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, "range": Array [ 13, 14, @@ -397,7 +414,24 @@ Object { "line": 1, }, }, - "name": "T", + "name": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, "range": Array [ 11, 36, @@ -2885,7 +2919,6 @@ Object { ], "type": "TSInterfaceBody", }, - "heritage": Array [], "id": Object { "loc": Object { "end": Object { @@ -3293,7 +3326,24 @@ Object { "line": 1, }, }, - "name": "X", + "name": Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 1, + 2, + ], + "type": "Identifier", + }, "range": Array [ 1, 2, @@ -4668,36 +4718,59 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-accessibility-modifiers.src 1`] = ` +exports[`typescript fixtures/basics/call-signatures.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": 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 { - "accessibility": "private", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "name": "bar", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 23, + "column": 21, "line": 2, }, "start": Object { @@ -4705,20 +4778,72 @@ Object { "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 [ - 14, - 35, + 15, + 34, ], - "static": false, - "type": "ClassProperty", - "typeAnnotation": Object { + "returnType": Object { "loc": Object { "end": Object { - "column": 22, + "column": 21, "line": 2, }, "start": Object { - "column": 14, + "column": 13, "line": 2, }, }, @@ -4730,11 +4855,11 @@ Object { "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 22, + "column": 21, "line": 2, }, "start": Object { - "column": 16, + "column": 15, "line": 2, }, }, @@ -4745,32 +4870,12 @@ Object { "type": "TSStringKeyword", }, }, - "value": null, + "type": "TSCallSignatureDeclaration", }, Object { - "accessibility": "public", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "name": "baz", - "range": Array [ - 52, - 55, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 29, + "column": 24, "line": 3, }, "start": Object { @@ -4778,494 +4883,113 @@ Object { "line": 3, }, }, - "range": Array [ - 38, - 65, - ], - "static": true, - "type": "ClassProperty", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 56, - 64, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 28, + "column": 15, "line": 3, }, "start": Object { - "column": 22, + "column": 6, "line": 3, }, }, + "name": "a", "range": Array [ - 58, - 64, + 41, + 50, ], - "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": "getBar", - "range": Array [ - 75, - 81, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 68, - 111, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 5, - }, - "start": Object { - "column": 11, - "line": 5, - }, - }, - "range": Array [ - 98, - 102, - ], - "type": "ThisExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "name": "bar", - "range": Array [ - 103, - 106, - ], - "type": "Identifier", - }, - "range": Array [ - 98, - 106, - ], - "type": "MemberExpression", + "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": 20, - "line": 5, + "column": 15, + "line": 3, }, "start": Object { - "column": 4, - "line": 5, + "column": 9, + "line": 3, }, }, "range": Array [ - 91, - 107, + 44, + 50, ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 4, + "type": "TSStringKeyword", }, }, - "range": Array [ - 85, - 111, - ], - "type": "BlockStatement", }, - "expression": false, - "generator": false, - "id": null, + ], + "range": Array [ + 37, + 59, + ], + "returnType": Object { "loc": Object { "end": Object { - "column": 3, - "line": 6, + "column": 24, + "line": 3, }, "start": Object { "column": 16, - "line": 4, + "line": 3, }, }, - "params": Array [], "range": Array [ - 82, - 111, + 51, + 59, ], - "type": "FunctionExpression", - }, - }, - Object { - "accessibility": "protected", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 12, - "line": 7, + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, }, - }, - "name": "setBar", - "range": Array [ - 124, - 130, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 2, - "line": 7, + "range": Array [ + 53, + 59, + ], + "type": "TSStringKeyword", }, }, - "range": Array [ - 114, - 171, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "expression": Object { - "left": Object { - "computed": false, - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "object": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 152, - 156, - ], - "type": "ThisExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 8, - }, - "start": Object { - "column": 9, - "line": 8, - }, - }, - "name": "bar", - "range": Array [ - 157, - 160, - ], - "type": "Identifier", - }, - "range": Array [ - 152, - 160, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 18, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "operator": "=", - "range": Array [ - 152, - 166, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 8, - }, - "start": Object { - "column": 15, - "line": 8, - }, - }, - "name": "bar", - "range": Array [ - 163, - 166, - ], - "type": "Identifier", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 8, - }, - "start": Object { - "column": 4, - "line": 8, - }, - }, - "range": Array [ - 152, - 167, - ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 34, - "line": 7, - }, - }, - "range": Array [ - 146, - 171, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 3, - "line": 9, - }, - "start": Object { - "column": 19, - "line": 7, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 7, - }, - "start": Object { - "column": 20, - "line": 7, - }, - }, - "name": "bar", - "range": Array [ - 132, - 144, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 7, - }, - "start": Object { - "column": 24, - "line": 7, - }, - }, - "range": Array [ - 136, - 144, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 7, - }, - "start": Object { - "column": 26, - "line": 7, - }, - }, - "range": Array [ - 138, - 144, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], - "range": Array [ - 131, - 171, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 10, - }, - "start": Object { - "column": 10, - "line": 1, + "type": "TSConstructSignatureDeclaration", }, - }, - "range": Array [ - 10, - 173, ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", "range": Array [ - 6, - 9, + 11, + 61, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 10, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "TSTypeLiteral", }, - "range": Array [ - 0, - 173, - ], - "superClass": null, - "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 11, + "line": 5, }, "start": Object { "column": 0, @@ -5274,14 +4998,14 @@ Object { }, "range": Array [ 0, - 174, + 62, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 4, "line": 1, }, "start": Object { @@ -5291,43 +5015,61 @@ Object { }, "range": Array [ 0, - 5, + 4, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 8, "line": 1, }, "start": Object { - "column": 6, + "column": 5, "line": 1, }, }, "range": Array [ - 6, - 9, + 5, + 8, ], "type": "Identifier", - "value": "Foo", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 10, + "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": "{", @@ -5335,7 +5077,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 3, "line": 2, }, "start": Object { @@ -5344,44 +5086,44 @@ Object { }, }, "range": Array [ - 14, - 21, + 15, + 16, ], - "type": "Keyword", - "value": "private", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 4, "line": 2, }, "start": Object { - "column": 10, + "column": 3, "line": 2, }, }, "range": Array [ - 22, - 25, + 16, + 17, ], "type": "Identifier", - "value": "bar", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 5, "line": 2, }, "start": Object { - "column": 14, + "column": 4, "line": 2, }, }, "range": Array [ - 26, - 27, + 17, + 18, ], "type": "Punctuator", "value": ":", @@ -5389,17 +5131,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 12, "line": 2, }, "start": Object { - "column": 16, + "column": 6, "line": 2, }, }, "range": Array [ - 28, - 34, + 19, + 25, ], "type": "Identifier", "value": "string", @@ -5407,197 +5149,161 @@ Object { Object { "loc": Object { "end": Object { - "column": 23, + "column": 13, "line": 2, }, "start": Object { - "column": 22, + "column": 12, "line": 2, }, }, "range": Array [ - 34, - 35, + 25, + 26, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 14, + "line": 2, }, "start": Object { - "column": 2, - "line": 3, + "column": 13, + "line": 2, }, }, "range": Array [ - 38, - 44, + 26, + 27, ], - "type": "Keyword", - "value": "public", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 21, + "line": 2, }, "start": Object { - "column": 9, - "line": 3, + "column": 15, + "line": 2, }, }, "range": Array [ - 45, - 51, + 28, + 34, ], - "type": "Keyword", - "value": "static", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 5, "line": 3, }, "start": Object { - "column": 16, + "column": 2, "line": 3, }, }, "range": Array [ - 52, - 55, + 37, + 40, ], - "type": "Identifier", - "value": "baz", + "type": "Keyword", + "value": "new", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 6, "line": 3, }, "start": Object { - "column": 20, + "column": 5, "line": 3, }, }, "range": Array [ - 56, - 57, + 40, + 41, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 7, "line": 3, }, "start": Object { - "column": 22, + "column": 6, "line": 3, }, }, "range": Array [ - 58, - 64, + 41, + 42, ], "type": "Identifier", - "value": "number", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 8, "line": 3, }, "start": Object { - "column": 28, + "column": 7, "line": 3, }, }, "range": Array [ - 64, - 65, + 42, + 43, ], "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 68, - 74, - ], - "type": "Keyword", - "value": "public", + "value": ":", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 4, + "line": 3, }, "start": Object { "column": 9, - "line": 4, + "line": 3, }, }, "range": Array [ - 75, - 81, + 44, + 50, ], "type": "Identifier", - "value": "getBar", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { "column": 16, - "line": 4, - }, - }, - "range": Array [ - 82, - 83, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, + "line": 3, }, "start": Object { - "column": 17, - "line": 4, + "column": 15, + "line": 3, }, }, "range": Array [ - 83, - 84, + 50, + 51, ], "type": "Punctuator", "value": ")", @@ -5605,413 +5311,918 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, - "line": 4, + "column": 17, + "line": 3, }, "start": Object { - "column": 19, - "line": 4, + "column": 16, + "line": 3, }, }, "range": Array [ - 85, - 86, + 51, + 52, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 5, + "column": 24, + "line": 3, }, "start": Object { - "column": 4, - "line": 5, + "column": 18, + "line": 3, }, }, "range": Array [ - 91, - 97, + 53, + 59, ], - "type": "Keyword", - "value": "return", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 5, + "column": 1, + "line": 4, }, "start": Object { - "column": 11, - "line": 5, + "column": 0, + "line": 4, }, }, "range": Array [ - 98, - 102, + 60, + 61, ], - "type": "Keyword", - "value": "this", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/call-signatures-with-generics.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 5, - }, - "start": Object { - "column": 15, - "line": 5, + "id": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, }, + "name": "foo", + "range": Array [ + 5, + 8, + ], + "type": "Identifier", }, - "range": Array [ - 102, - 103, - ], - "type": "Punctuator", - "value": ".", - }, - Object { "loc": Object { "end": Object { - "column": 19, - "line": 5, + "column": 1, + "line": 4, }, "start": Object { - "column": 16, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 103, - 106, + 0, + 67, ], - "type": "Identifier", - "value": "bar", + "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": Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "name": "T", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "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": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "name": "T", + "range": Array [ + 44, + 45, + ], + "type": "Identifier", + }, + "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": 20, - "line": 5, + "column": 4, + "line": 1, }, "start": Object { - "column": 19, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 106, - 107, + 0, + 4, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 6, + "column": 8, + "line": 1, }, "start": Object { - "column": 2, - "line": 6, + "column": 5, + "line": 1, }, }, "range": Array [ - 110, - 111, + 5, + 8, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 7, + "column": 10, + "line": 1, }, "start": Object { - "column": 2, - "line": 7, + "column": 9, + "line": 1, }, }, "range": Array [ - 114, - 123, + 9, + 10, ], - "type": "Keyword", - "value": "protected", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 7, + "column": 12, + "line": 1, }, "start": Object { - "column": 12, - "line": 7, + "column": 11, + "line": 1, }, }, "range": Array [ - 124, - 130, + 11, + 12, ], - "type": "Identifier", - "value": "setBar", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 7, + "column": 3, + "line": 2, }, "start": Object { - "column": 19, - "line": 7, + "column": 2, + "line": 2, }, }, "range": Array [ - 131, - 132, + 15, + 16, ], "type": "Punctuator", - "value": "(", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 7, + "column": 4, + "line": 2, }, "start": Object { - "column": 20, - "line": 7, + "column": 3, + "line": 2, }, }, "range": Array [ - 132, - 135, + 16, + 17, ], "type": "Identifier", - "value": "bar", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 7, + "column": 5, + "line": 2, }, "start": Object { - "column": 24, - "line": 7, + "column": 4, + "line": 2, }, }, "range": Array [ - 136, - 137, + 17, + 18, ], "type": "Punctuator", - "value": ":", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 7, + "column": 6, + "line": 2, }, "start": Object { - "column": 26, - "line": 7, + "column": 5, + "line": 2, }, }, "range": Array [ - 138, - 144, + 18, + 19, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 7, + "column": 7, + "line": 2, }, "start": Object { - "column": 32, - "line": 7, + "column": 6, + "line": 2, }, }, "range": Array [ - 144, - 145, + 19, + 20, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 7, + "column": 8, + "line": 2, }, "start": Object { - "column": 34, - "line": 7, + "column": 7, + "line": 2, }, }, "range": Array [ - 146, - 147, + 20, + 21, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 8, + "column": 15, + "line": 2, }, "start": Object { - "column": 4, - "line": 8, + "column": 9, + "line": 2, }, }, "range": Array [ - 152, - 156, + 22, + 28, ], - "type": "Keyword", - "value": "this", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 8, + "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": 8, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 3, }, }, "range": Array [ - 156, - 157, + 45, + 46, ], "type": "Punctuator", - "value": ".", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 8, + "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": 8, + "line": 3, }, }, "range": Array [ - 157, - 160, + 47, + 48, ], "type": "Identifier", - "value": "bar", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 8, + "column": 11, + "line": 3, }, "start": Object { - "column": 13, - "line": 8, + "column": 10, + "line": 3, }, }, "range": Array [ - 161, - 162, + 48, + 49, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { "column": 18, - "line": 8, + "line": 3, }, "start": Object { - "column": 15, - "line": 8, + "column": 12, + "line": 3, }, }, "range": Array [ - 163, - 166, + 50, + 56, ], "type": "Identifier", - "value": "bar", + "value": "string", }, Object { "loc": Object { "end": Object { "column": 19, - "line": 8, + "line": 3, }, "start": Object { "column": 18, - "line": 8, + "line": 3, }, }, "range": Array [ - 166, - 167, + 56, + 57, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 9, + "column": 20, + "line": 3, }, "start": Object { - "column": 2, - "line": 9, + "column": 19, + "line": 3, }, }, "range": Array [ - 170, - 171, + 57, + 58, ], "type": "Punctuator", - "value": "}", + "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": 10, + "line": 4, }, "start": Object { "column": 0, - "line": 10, + "line": 4, }, }, "range": Array [ - 172, - 173, + 66, + 67, ], "type": "Punctuator", "value": "}", @@ -6021,124 +6232,102 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-definite-assignment.src 1`] = ` +exports[`typescript fixtures/basics/cast-as-expression.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "definite": true, - "key": Object { - "loc": Object { - "end": Object { - "column": 3, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "a", - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - }, + "expression": Object { + "expression": Object { + "left": Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 1, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 0, + "line": 1, }, }, + "name": "x", "range": Array [ - 12, - 23, + 0, + 1, ], - "static": false, - "type": "ClassProperty", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "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, }, - "range": Array [ - 14, - 22, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "TSStringKeyword", + "start": Object { + "column": 4, + "line": 1, }, }, - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 1, + "name": "y", + "range": Array [ + 4, + 5, + ], + "type": "Identifier", }, + "type": "BinaryExpression", }, - "range": Array [ - 8, - 25, - ], - "type": "ClassBody", - }, - "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 16, "line": 1, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, - "name": "X", "range": Array [ - 6, - 7, + 0, + 16, ], - "type": "Identifier", + "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": 1, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { "column": 0, @@ -6147,16 +6336,15 @@ Object { }, "range": Array [ 0, - 25, + 17, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -6165,14 +6353,14 @@ Object { }, "range": Array [ 0, - 26, + 18, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -6182,354 +6370,218 @@ 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, + 1, ], "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": "x", }, Object { "loc": Object { "end": Object { "column": 3, - "line": 2, + "line": 1, }, "start": Object { "column": 2, - "line": 2, - }, - }, - "range": Array [ - 12, - 13, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 4, - "line": 2, - }, - "start": Object { - "column": 3, - "line": 2, + "line": 1, }, }, "range": Array [ - 13, - 14, + 2, + 3, ], "type": "Punctuator", - "value": "!", + "value": "<", }, Object { "loc": Object { "end": Object { "column": 5, - "line": 2, + "line": 1, }, "start": Object { "column": 4, - "line": 2, + "line": 1, }, }, "range": Array [ - 14, - 15, + 4, + 5, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { "column": 6, - "line": 2, + "line": 1, }, }, "range": Array [ - 16, - 22, + 6, + 8, ], "type": "Identifier", - "value": "string", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 22, - 23, + 9, + 16, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "boolean", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 17, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 16, + "line": 1, }, }, "range": Array [ - 24, - 25, + 16, + 17, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/class-with-export-parameter-properties.src 1`] = ` +exports[`typescript fixtures/basics/cast-as-multi.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 [ - 16, - 27, - ], - "type": "Identifier", - }, - "kind": "constructor", + "expression": Object { + "expression": Object { + "expression": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 1, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 0, + "line": 1, }, }, + "name": "x", "range": Array [ - 16, - 54, + 0, + 1, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 54, - ], - "type": "BlockStatement", + "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, }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 2, - }, + "start": Object { + "column": 5, + "line": 1, }, - "params": Array [ - Object { - "export": true, - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "a", - "range": Array [ - 35, - 44, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 36, - 44, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 28, - 44, - ], - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 27, - 54, - ], - "type": "FunctionExpression", }, + "range": Array [ + 5, + 8, + ], + "type": "TSAnyKeyword", }, - ], + }, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 13, + "line": 1, }, "start": Object { - "column": 10, + "column": 0, "line": 1, }, }, "range": Array [ - 10, - 56, + 0, + 13, ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, + "type": "TSAsExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, }, - "start": Object { - "column": 6, - "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", }, }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 14, + "line": 1, }, "start": Object { "column": 0, @@ -6538,16 +6590,15 @@ Object { }, "range": Array [ 0, - 56, + 14, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { "column": 0, - "line": 7, + "line": 2, }, "start": Object { "column": 0, @@ -6556,14 +6607,14 @@ Object { }, "range": Array [ 0, - 58, + 15, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -6573,312 +6624,547 @@ Object { }, "range": Array [ 0, - 5, + 1, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 4, "line": 1, }, "start": Object { - "column": 6, + "column": 2, "line": 1, }, }, "range": Array [ - 6, - 9, + 2, + 4, ], "type": "Identifier", - "value": "Foo", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 8, "line": 1, }, "start": Object { - "column": 10, + "column": 5, "line": 1, }, }, "range": Array [ - 10, - 11, + 5, + 8, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "any", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 16, - 27, + 9, + 11, ], "type": "Identifier", - "value": "constructor", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 27, - 28, + 12, + 13, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 28, - 34, + 13, + 14, ], - "type": "Keyword", - "value": "export", + "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": 24, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 35, - 36, + 0, + 26, ], - "type": "Identifier", - "value": "a", + "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": 25, - "line": 2, + "column": 1, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 36, - 37, + 0, + 1, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 2, + "column": 2, + "line": 1, }, "start": Object { - "column": 26, - "line": 2, + "column": 1, + "line": 1, }, }, "range": Array [ - 38, - 44, + 1, + 2, ], "type": "Identifier", - "value": "string", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 32, - "line": 2, + "column": 3, + "line": 1, }, }, "range": Array [ - 44, - 45, + 3, + 5, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 34, - "line": 2, + "column": 6, + "line": 1, }, }, "range": Array [ - 46, - 47, + 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": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 21, + "line": 1, }, }, "range": Array [ - 53, - 54, + 21, + 22, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 25, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 23, + "line": 1, }, }, "range": Array [ - 55, - 56, + 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": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/class-with-extends-and-implements.src 1`] = ` +exports[`typescript fixtures/basics/cast-as-operator.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 80, - "line": 1, - }, - "start": Object { - "column": 78, - "line": 1, + "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", }, - "range": Array [ - 78, - 80, - ], - "type": "ClassBody", - }, - "id": Object { "loc": Object { "end": Object { - "column": 33, + "column": 17, "line": 1, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, - "name": "ClassWithParentAndInterface", + "operator": "===", "range": Array [ - 6, - 33, + 0, + 17, ], - "type": "Identifier", - }, - "implements": Array [ - Object { - "id": Object { + "right": Object { + "expression": Object { "loc": Object { "end": Object { - "column": 77, + "column": 7, "line": 1, }, "start": Object { - "column": 66, + "column": 6, "line": 1, }, }, - "name": "MyInterface", "range": Array [ - 66, - 77, + 6, + 7, ], - "type": "Identifier", + "raw": "1", + "type": "Literal", + "value": 1, }, "loc": Object { "end": Object { - "column": 77, + "column": 17, "line": 1, }, "start": Object { - "column": 66, + "column": 6, "line": 1, }, }, "range": Array [ - 66, - 77, + 6, + 17, ], - "type": "ClassImplements", + "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": 80, + "column": 18, "line": 1, }, "start": Object { @@ -6888,27 +7174,9 @@ Object { }, "range": Array [ 0, - 80, + 18, ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "name": "MyOtherClass", - "range": Array [ - 42, - 54, - ], - "type": "Identifier", - }, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { @@ -6923,14 +7191,14 @@ Object { }, "range": Array [ 0, - 81, + 19, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -6940,968 +7208,1109 @@ Object { }, "range": Array [ 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 33, + 1, ], "type": "Identifier", - "value": "ClassWithParentAndInterface", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 41, - ], - "type": "Keyword", - "value": "extends", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 54, + "column": 5, "line": 1, }, "start": Object { - "column": 42, + "column": 2, "line": 1, }, }, "range": Array [ - 42, - 54, + 2, + 5, ], - "type": "Identifier", - "value": "MyOtherClass", + "type": "Punctuator", + "value": "===", }, Object { "loc": Object { "end": Object { - "column": 65, + "column": 7, "line": 1, }, "start": Object { - "column": 55, + "column": 6, "line": 1, }, }, "range": Array [ - 55, - 65, + 6, + 7, ], - "type": "Keyword", - "value": "implements", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 77, + "column": 10, "line": 1, }, "start": Object { - "column": 66, + "column": 8, "line": 1, }, }, "range": Array [ - 66, - 77, + 8, + 10, ], "type": "Identifier", - "value": "MyInterface", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 79, + "column": 17, "line": 1, }, "start": Object { - "column": 78, + "column": 11, "line": 1, }, }, "range": Array [ - 78, - 79, + 11, + 17, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 80, + "column": 18, "line": 1, }, "start": Object { - "column": 79, + "column": 17, "line": 1, }, }, "range": Array [ - 79, - 80, + 17, + 18, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/class-with-extends-generic.src 1`] = ` +exports[`typescript fixtures/basics/cast-as-simple.src 1`] = ` Object { "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 32, - ], - "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, - 32, - ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "Bar", - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - }, - "superTypeParameters": Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "params": Array [ - Object { + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 26, + "column": 9, "line": 1, }, "start": Object { - "column": 25, + "column": 6, "line": 1, }, }, + "name": "foo", "range": Array [ - 25, - 26, + 6, + 9, ], - "type": "TSTypeReference", - "typeName": Object { + "type": "Identifier", + }, + "init": Object { + "expression": Object { "loc": Object { "end": Object { - "column": 26, + "column": 13, "line": 1, }, "start": Object { - "column": 25, + "column": 12, "line": 1, }, }, - "name": "B", + "name": "x", "range": Array [ - 25, - 26, + 12, + 13, ], "type": "Identifier", }, - }, - ], - "range": Array [ - 24, - 27, - ], - "type": "TSTypeParameterInstantiation", - }, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "params": Array [ - Object { "loc": Object { "end": Object { - "column": 11, + "column": 20, "line": 1, }, "start": Object { - "column": 10, + "column": 12, "line": 1, }, }, - "name": "A", "range": Array [ - 10, - 11, + 12, + 20, ], - "type": "TSTypeParameter", + "type": "TSAsExpression", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 20, + ], + "type": "TSAnyKeyword", + }, }, - ], - "range": Array [ - 9, - 12, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 33, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 20, + ], + "type": "VariableDeclarator", }, - }, - "range": Array [ - 0, - 5, ], - "type": "Keyword", - "value": "class", - }, - Object { + "kind": "const", "loc": Object { "end": Object { - "column": 9, + "column": 21, "line": 1, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, "range": Array [ - 6, - 9, + 0, + 21, ], - "type": "Identifier", - "value": "Foo", + "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": 10, + "column": 5, "line": 1, }, "start": Object { - "column": 9, + "column": 0, "line": 1, }, }, "range": Array [ - 9, - 10, + 0, + 5, ], - "type": "Punctuator", - "value": "<", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 9, "line": 1, }, "start": Object { - "column": 10, + "column": 6, "line": 1, }, }, "range": Array [ - 10, - 11, + 6, + 9, ], "type": "Identifier", - "value": "A", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "column": 10, "line": 1, }, }, "range": Array [ + 10, 11, - 12, ], "type": "Punctuator", - "value": ">", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { "column": 13, "line": 1, }, - }, - "range": Array [ - 13, - 20, - ], - "type": "Keyword", - "value": "extends", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, "start": Object { - "column": 21, + "column": 12, "line": 1, }, }, "range": Array [ - 21, - 24, + 12, + 13, ], "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "<", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 16, "line": 1, }, "start": Object { - "column": 25, + "column": 14, "line": 1, }, }, "range": Array [ - 25, - 26, + 14, + 16, ], "type": "Identifier", - "value": "B", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 20, "line": 1, }, "start": Object { - "column": 26, + "column": 17, "line": 1, }, }, "range": Array [ - 26, - 27, + 17, + 20, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "any", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 21, "line": 1, }, "start": Object { - "column": 28, + "column": 20, "line": 1, }, }, "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 31, - 32, + 20, + 21, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/class-with-extends-generic-multiple.src 1`] = ` +exports[`typescript fixtures/basics/class-with-accessibility-modifiers.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 41, - "line": 1, - }, - }, - "range": Array [ - 41, - 45, - ], - "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, - 45, - ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, - }, - }, - "name": "Bar", - "range": Array [ - 31, - 34, - ], - "type": "Identifier", - }, - "superTypeParameters": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "params": Array [ + "body": Array [ Object { + "accessibility": "private", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 35, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ + 14, 35, - 36, ], - "type": "TSTypeReference", - "typeName": Object { + "static": false, + "type": "ClassProperty", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 35, - "line": 1, + "column": 14, + "line": 2, }, }, - "name": "C", "range": Array [ - 35, - 36, + 26, + 34, ], - "type": "Identifier", + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 28, + 34, + ], + "type": "TSStringKeyword", + }, }, + "value": null, }, Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "TSTypeReference", - "typeName": Object { + "accessibility": "public", + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 19, + "line": 3, }, "start": Object { - "column": 38, - "line": 1, + "column": 16, + "line": 3, }, }, - "name": "D", + "name": "baz", "range": Array [ - 38, - 39, + 52, + 55, ], "type": "Identifier", }, - }, - ], - "range": Array [ - 34, - 40, - ], - "type": "TSTypeParameterInstantiation", - }, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 38, + 65, + ], + "static": true, + "type": "ClassProperty", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 28, + "line": 3, }, "start": Object { "column": 20, - "line": 1, + "line": 3, }, }, "range": Array [ - 20, - 21, + 56, + 64, ], - "type": "TSTypeReference", - "typeName": Object { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 28, + "line": 3, }, "start": Object { - "column": 20, - "line": 1, + "column": 22, + "line": 3, }, }, - "name": "B", "range": Array [ - 20, - 21, + 58, + 64, ], - "type": "Identifier", + "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": "getBar", + "range": Array [ + 75, + 81, + ], + "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 3, + "line": 6, }, "start": Object { - "column": 10, - "line": 1, + "column": 2, + "line": 4, }, }, - "name": "A", "range": Array [ - 10, - 21, + 68, + 111, ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 9, - 22, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "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 { + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 19, + "line": 5, + }, + "start": Object { + "column": 11, + "line": 5, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 5, + }, + "start": Object { + "column": 11, + "line": 5, + }, + }, + "range": Array [ + 98, + 102, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 5, + }, + "start": Object { + "column": 16, + "line": 5, + }, + }, + "name": "bar", + "range": Array [ + 103, + 106, + ], + "type": "Identifier", + }, + "range": Array [ + 98, + 106, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 91, + 107, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 19, + "line": 4, + }, + }, + "range": Array [ + 85, + 111, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "params": Array [], + "range": Array [ + 82, + 111, + ], + "type": "FunctionExpression", + }, + }, + Object { + "accessibility": "protected", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 7, + }, + "start": Object { + "column": 12, + "line": 7, + }, + }, + "name": "setBar", + "range": Array [ + 124, + 130, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 3, + "line": 9, + }, + "start": Object { + "column": 2, + "line": 7, + }, + }, + "range": Array [ + 114, + 171, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "expression": Object { + "left": Object { + "computed": false, + "loc": Object { + "end": Object { + "column": 12, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 152, + 156, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 8, + }, + "start": Object { + "column": 9, + "line": 8, + }, + }, + "name": "bar", + "range": Array [ + 157, + 160, + ], + "type": "Identifier", + }, + "range": Array [ + 152, + 160, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "operator": "=", + "range": Array [ + 152, + 166, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 8, + }, + "start": Object { + "column": 15, + "line": 8, + }, + }, + "name": "bar", + "range": Array [ + 163, + 166, + ], + "type": "Identifier", + }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 152, + 167, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 3, + "line": 9, + }, + "start": Object { + "column": 34, + "line": 7, + }, + }, + "range": Array [ + 146, + 171, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 3, + "line": 9, + }, + "start": Object { + "column": 19, + "line": 7, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 7, + }, + "start": Object { + "column": 20, + "line": 7, + }, + }, + "name": "bar", + "range": Array [ + 132, + 144, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 7, + }, + "start": Object { + "column": 24, + "line": 7, + }, + }, + "range": Array [ + 136, + 144, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 7, + }, + "start": Object { + "column": 26, + "line": 7, + }, + }, + "range": Array [ + 138, + 144, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 131, + 171, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 10, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 173, + ], + "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": 9, - "line": 1, + "column": 1, + "line": 10, }, "start": Object { - "column": 6, + "column": 0, "line": 1, }, }, "range": Array [ - 6, - 9, + 0, + 173, ], - "type": "Identifier", - "value": "Foo", + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 11, }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 174, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 10, + "column": 5, "line": 1, }, "start": Object { - "column": 9, + "column": 0, "line": 1, }, }, "range": Array [ - 9, - 10, + 0, + 5, ], - "type": "Punctuator", - "value": "<", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 9, "line": 1, }, "start": Object { - "column": 10, + "column": 6, "line": 1, }, }, "range": Array [ - 10, - 11, + 6, + 9, ], "type": "Identifier", - "value": "A", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 11, "line": 1, }, "start": Object { - "column": 12, + "column": 10, "line": 1, }, }, "range": Array [ - 12, - 19, + 10, + 11, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 20, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 20, + 14, 21, ], - "type": "Identifier", - "value": "B", + "type": "Keyword", + "value": "private", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 21, 22, + 25, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 23, - 30, + 26, + 27, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 31, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 31, + 28, 34, ], "type": "Identifier", - "value": "Bar", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, - }, + "column": 23, + "line": 2, + }, "start": Object { - "column": 34, - "line": 1, + "column": 22, + "line": 2, }, }, "range": Array [ @@ -7909,361 +8318,202 @@ Object { 35, ], "type": "Punctuator", - "value": "<", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 8, + "line": 3, }, "start": Object { - "column": 35, - "line": 1, + "column": 2, + "line": 3, }, }, "range": Array [ - 35, - 36, + 38, + 44, ], - "type": "Identifier", - "value": "C", + "type": "Keyword", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 15, + "line": 3, }, "start": Object { - "column": 36, - "line": 1, + "column": 9, + "line": 3, }, }, "range": Array [ - 36, - 37, + 45, + 51, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "static", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 19, + "line": 3, }, "start": Object { - "column": 38, - "line": 1, + "column": 16, + "line": 3, }, }, "range": Array [ - 38, - 39, + 52, + 55, ], "type": "Identifier", - "value": "D", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 1, + "column": 21, + "line": 3, }, "start": Object { - "column": 39, - "line": 1, + "column": 20, + "line": 3, }, }, "range": Array [ - 39, - 40, + 56, + 57, ], "type": "Punctuator", - "value": ">", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 28, + "line": 3, }, "start": Object { - "column": 41, - "line": 1, + "column": 22, + "line": 3, }, }, "range": Array [ - 41, - 42, + 58, + 64, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 29, "line": 3, }, "start": Object { - "column": 0, + "column": 28, "line": 3, }, }, "range": Array [ - 44, - 45, + 64, + 65, ], "type": "Punctuator", - "value": "}", + "value": ";", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-generic-method.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "getBar", - "range": Array [ - 14, - 20, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 28, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 26, - 28, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 23, - 28, - ], - "type": "FunctionExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 8, - "line": 2, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "T", - "range": Array [ - 21, - 22, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 20, - 23, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 8, + "line": 4, }, - "range": Array [ - 10, - 30, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, + "start": Object { + "column": 2, + "line": 4, }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", }, + "range": Array [ + 68, + 74, + ], + "type": "Keyword", + "value": "public", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 15, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 9, + "line": 4, }, }, "range": Array [ - 0, - 30, + 75, + 81, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "getBar", }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 17, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 16, + "line": 4, }, }, "range": Array [ - 0, - 5, + 82, + 83, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 18, + "line": 4, }, "start": Object { - "column": 6, - "line": 1, + "column": 17, + "line": 4, }, }, "range": Array [ - 6, - 9, + 83, + 84, ], - "type": "Identifier", - "value": "Foo", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 20, + "line": 4, }, "start": Object { - "column": 10, - "line": 1, + "column": 19, + "line": 4, }, }, "range": Array [ - 10, - 11, + 85, + 86, ], "type": "Punctuator", "value": "{", @@ -8271,171 +8521,405 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 10, + "line": 5, }, "start": Object { - "column": 2, - "line": 2, + "column": 4, + "line": 5, }, }, "range": Array [ - 14, - 20, + 91, + 97, ], - "type": "Identifier", - "value": "getBar", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 15, + "line": 5, }, "start": Object { - "column": 8, - "line": 2, + "column": 11, + "line": 5, }, }, "range": Array [ - 20, - 21, + 98, + 102, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 5, + }, + "start": Object { + "column": 15, + "line": 5, + }, + }, + "range": Array [ + 102, + 103, ], "type": "Punctuator", - "value": "<", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 19, + "line": 5, }, "start": Object { - "column": 9, - "line": 2, + "column": 16, + "line": 5, }, }, "range": Array [ - 21, - 22, + 103, + 106, ], "type": "Identifier", - "value": "T", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 20, + "line": 5, }, "start": Object { - "column": 10, - "line": 2, + "column": 19, + "line": 5, }, }, "range": Array [ - 22, - 23, + 106, + 107, ], "type": "Punctuator", - "value": ">", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 3, + "line": 6, }, "start": Object { - "column": 11, - "line": 2, + "column": 2, + "line": 6, }, }, "range": Array [ - 23, - 24, + 110, + 111, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 11, + "line": 7, + }, + "start": Object { + "column": 2, + "line": 7, + }, + }, + "range": Array [ + 114, + 123, + ], + "type": "Keyword", + "value": "protected", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 7, }, "start": Object { "column": 12, - "line": 2, + "line": 7, }, }, "range": Array [ - 24, - 25, + 124, + 130, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "setBar", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 20, + "line": 7, }, "start": Object { - "column": 14, - "line": 2, + "column": 19, + "line": 7, }, }, "range": Array [ - 26, - 27, + 131, + 132, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 23, + "line": 7, }, "start": Object { - "column": 15, - "line": 2, + "column": 20, + "line": 7, }, }, "range": Array [ - 27, - 28, + 132, + 135, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 25, + "line": 7, }, "start": Object { - "column": 0, - "line": 3, + "column": 24, + "line": 7, }, }, "range": Array [ - 29, - 30, + 136, + 137, ], "type": "Punctuator", - "value": "}", + "value": ":", }, - ], - "type": "Program", + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 7, + }, + "start": Object { + "column": 26, + "line": 7, + }, + }, + "range": Array [ + 138, + 144, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 7, + }, + "start": Object { + "column": 32, + "line": 7, + }, + }, + "range": Array [ + 144, + 145, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 7, + }, + "start": Object { + "column": 34, + "line": 7, + }, + }, + "range": Array [ + 146, + 147, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 8, + }, + "start": Object { + "column": 4, + "line": 8, + }, + }, + "range": Array [ + 152, + 156, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 8, + }, + "start": Object { + "column": 8, + "line": 8, + }, + }, + "range": Array [ + 156, + 157, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 8, + }, + "start": Object { + "column": 9, + "line": 8, + }, + }, + "range": Array [ + 157, + 160, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 8, + }, + "start": Object { + "column": 13, + "line": 8, + }, + }, + "range": Array [ + 161, + 162, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 8, + }, + "start": Object { + "column": 15, + "line": 8, + }, + }, + "range": Array [ + 163, + 166, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 8, + }, + "start": Object { + "column": 18, + "line": 8, + }, + }, + "range": Array [ + 166, + 167, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 9, + }, + "start": Object { + "column": 2, + "line": 9, + }, + }, + "range": Array [ + 170, + 171, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 10, + }, + "start": Object { + "column": 0, + "line": 10, + }, + }, + "range": Array [ + 172, + 173, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", } `; -exports[`typescript fixtures/basics/class-with-generic-method-default.src 1`] = ` +exports[`typescript fixtures/basics/class-with-definite-assignment.src 1`] = ` Object { "body": Array [ Object { @@ -8443,10 +8927,11 @@ Object { "body": Array [ Object { "computed": false, + "definite": true, "key": Object { "loc": Object { "end": Object { - "column": 8, + "column": 3, "line": 2, }, "start": Object { @@ -8454,17 +8939,16 @@ Object { "line": 2, }, }, - "name": "getBar", + "name": "a", "range": Array [ - 14, - 20, + 12, + 13, ], "type": "Identifier", }, - "kind": "method", "loc": Object { "end": Object { - "column": 22, + "column": 13, "line": 2, }, "start": Object { @@ -8473,123 +8957,46 @@ Object { }, }, "range": Array [ - 14, - 34, + 12, + 23, ], "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 32, - 34, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, + "type": "ClassProperty", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 22, + "column": 12, "line": 2, }, "start": Object { - "column": 17, + "column": 4, "line": 2, }, }, - "params": Array [], "range": Array [ - 29, - 34, + 14, + 22, ], - "type": "FunctionExpression", - "typeParameters": Object { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 17, + "column": 12, "line": 2, }, "start": Object { - "column": 8, + "column": 6, "line": 2, }, }, - "params": Array [ - Object { - "default": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "Bar", - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - }, - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "name": "T", - "range": Array [ - 21, - 28, - ], - "type": "TSTypeParameter", - }, - ], "range": Array [ - 20, - 29, + 16, + 22, ], - "type": "TSTypeParameterDeclaration", + "type": "TSStringKeyword", }, }, + "value": null, }, ], "loc": Object { @@ -8598,20 +9005,20 @@ Object { "line": 3, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, - 36, + 8, + 25, ], "type": "ClassBody", }, "id": Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { @@ -8619,10 +9026,10 @@ Object { "line": 1, }, }, - "name": "Foo", + "name": "X", "range": Array [ 6, - 9, + 7, ], "type": "Identifier", }, @@ -8638,7 +9045,7 @@ Object { }, "range": Array [ 0, - 36, + 25, ], "superClass": null, "type": "ClassDeclaration", @@ -8656,7 +9063,7 @@ Object { }, "range": Array [ 0, - 37, + 26, ], "sourceType": "script", "tokens": Array [ @@ -8681,7 +9088,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { @@ -8691,25 +9098,25 @@ Object { }, "range": Array [ 6, - 9, + 7, ], "type": "Identifier", - "value": "Foo", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 9, "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, - 11, + 8, + 9, ], "type": "Punctuator", "value": "{", @@ -8717,7 +9124,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 3, "line": 2, }, "start": Object { @@ -8726,173 +9133,83 @@ Object { }, }, "range": Array [ - 14, - 20, + 12, + 13, ], "type": "Identifier", - "value": "getBar", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 4, "line": 2, }, "start": Object { - "column": 8, + "column": 3, "line": 2, }, }, "range": Array [ - 20, - 21, + 13, + 14, ], "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "T", + "value": "!", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 5, "line": 2, }, "start": Object { - "column": 11, + "column": 4, "line": 2, }, }, "range": Array [ - 23, - 24, + 14, + 15, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 12, "line": 2, }, "start": Object { - "column": 13, + "column": 6, "line": 2, }, }, "range": Array [ - 25, - 28, + 16, + 22, ], "type": "Identifier", - "value": "Bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "{", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 13, "line": 2, }, "start": Object { - "column": 21, + "column": 12, "line": 2, }, }, "range": Array [ - 33, - 34, + 22, + 23, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { @@ -8906,8 +9223,8 @@ Object { }, }, "range": Array [ - 35, - 36, + 24, + 25, ], "type": "Punctuator", "value": "}", @@ -8917,26 +9234,176 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-implements.src 1`] = ` +exports[`typescript fixtures/basics/class-with-export-parameter-properties.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 29, - ], + "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 [ + 16, + 27, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 16, + 54, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 46, + 54, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "params": Array [ + Object { + "export": true, + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 35, + 44, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 36, + 44, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 38, + 44, + ], + "type": "TSStringKeyword", + }, + }, + }, + "range": Array [ + 28, + 44, + ], + "type": "TSParameterProperty", + }, + ], + "range": Array [ + 27, + 54, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 56, + ], "type": "ClassBody", }, "id": Object { @@ -8957,47 +9424,10 @@ Object { ], "type": "Identifier", }, - "implements": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "Bar", - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 24, - ], - "type": "ClassImplements", - }, - ], "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { "column": 0, @@ -9006,7 +9436,7 @@ Object { }, "range": Array [ 0, - 29, + 56, ], "superClass": null, "type": "ClassDeclaration", @@ -9015,7 +9445,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 7, }, "start": Object { "column": 0, @@ -9024,7 +9454,7 @@ Object { }, "range": Array [ 0, - 30, + 58, ], "sourceType": "script", "tokens": Array [ @@ -9067,7 +9497,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 11, "line": 1, }, "start": Object { @@ -9077,61 +9507,187 @@ Object { }, "range": Array [ 10, - 20, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 16, + 27, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 28, + 34, ], "type": "Keyword", - "value": "implements", + "value": "export", }, Object { "loc": Object { "end": Object { "column": 24, - "line": 1, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ - 21, - 24, + 35, + 36, ], "type": "Identifier", - "value": "Bar", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { "column": 26, - "line": 1, + "line": 2, + }, + }, + "range": Array [ + 38, + 44, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 32, + "line": 2, }, }, "range": Array [ - 25, - 26, + 44, + 45, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, ], "type": "Punctuator", "value": "{", }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "}", + }, Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { "column": 0, - "line": 3, + "line": 5, }, }, "range": Array [ - 28, - 29, + 55, + 56, ], "type": "Punctuator", "value": "}", @@ -9141,7 +9697,7 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-implements-and-extends.src 1`] = ` +exports[`typescript fixtures/basics/class-with-extends-and-implements.src 1`] = ` Object { "body": Array [ Object { @@ -9183,39 +9739,39 @@ Object { }, "implements": Array [ Object { - "id": Object { + "expression": Object { "loc": Object { "end": Object { - "column": 56, + "column": 77, "line": 1, }, "start": Object { - "column": 45, + "column": 66, "line": 1, }, }, "name": "MyInterface", "range": Array [ - 45, - 56, + 66, + 77, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 56, + "column": 77, "line": 1, }, "start": Object { - "column": 45, + "column": 66, "line": 1, }, }, "range": Array [ - 45, - 56, + 66, + 77, ], - "type": "ClassImplements", + "type": "TSClassImplements", }, ], "loc": Object { @@ -9235,18 +9791,18 @@ Object { "superClass": Object { "loc": Object { "end": Object { - "column": 77, + "column": 54, "line": 1, }, "start": Object { - "column": 65, + "column": 42, "line": 1, }, }, "name": "MyOtherClass", "range": Array [ - 65, - 77, + 42, + 54, ], "type": "Identifier", }, @@ -9308,7 +9864,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 44, + "column": 41, "line": 1, }, "start": Object { @@ -9318,46 +9874,46 @@ Object { }, "range": Array [ 34, - 44, + 41, ], "type": "Keyword", - "value": "implements", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 56, + "column": 54, "line": 1, }, "start": Object { - "column": 45, + "column": 42, "line": 1, }, }, "range": Array [ - 45, - 56, + 42, + 54, ], "type": "Identifier", - "value": "MyInterface", + "value": "MyOtherClass", }, Object { "loc": Object { "end": Object { - "column": 64, + "column": 65, "line": 1, }, "start": Object { - "column": 57, + "column": 55, "line": 1, }, }, "range": Array [ - 57, - 64, + 55, + 65, ], "type": "Keyword", - "value": "extends", + "value": "implements", }, Object { "loc": Object { @@ -9366,16 +9922,16 @@ Object { "line": 1, }, "start": Object { - "column": 65, + "column": 66, "line": 1, }, }, "range": Array [ - 65, + 66, 77, ], "type": "Identifier", - "value": "MyOtherClass", + "value": "MyInterface", }, Object { "loc": Object { @@ -9418,7 +9974,7 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-implements-generic.src 1`] = ` +exports[`typescript fixtures/basics/class-with-extends-generic.src 1`] = ` Object { "body": Array [ Object { @@ -9458,113 +10014,147 @@ Object { ], "type": "Identifier", }, - "implements": Array [ - Object { - "id": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 32, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "Bar", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + }, + "superTypeParameters": 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": 21, + "column": 25, "line": 1, }, }, - "name": "Bar", "range": Array [ - 21, - 24, + 25, + 26, ], - "type": "Identifier", + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "B", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, + ], + "range": Array [ + 24, + 27, + ], + "type": "TSTypeParameterInstantiation", + }, + "type": "ClassDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, }, - "range": Array [ - 21, - 24, - ], - "type": "ClassImplements", - "typeParameters": Object { + "start": Object { + "column": 9, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 27, + "column": 11, "line": 1, }, "start": Object { - "column": 24, + "column": 10, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, + "name": Object { + "loc": Object { + "end": Object { + "column": 11, + "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": "S", - "range": Array [ - 25, - 26, - ], - "type": "Identifier", + "start": Object { + "column": 10, + "line": 1, }, }, - ], + "name": "A", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, "range": Array [ - 24, - 27, + 10, + 11, ], - "type": "TSTypeParameterInstantiation", + "type": "TSTypeParameter", }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, + ], + "range": Array [ + 9, + 12, + ], + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 32, - ], - "superClass": null, - "type": "ClassDeclaration", }, ], "loc": Object { @@ -9622,7 +10212,25 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, "line": 1, }, "start": Object { @@ -9632,10 +10240,46 @@ Object { }, "range": Array [ 10, + 11, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, 20, ], "type": "Keyword", - "value": "implements", + "value": "extends", }, Object { "loc": Object { @@ -9689,7 +10333,7 @@ Object { 26, ], "type": "Identifier", - "value": "S", + "value": "B", }, Object { "loc": Object { @@ -9750,7 +10394,7 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-implements-generic-multiple.src 1`] = ` +exports[`typescript fixtures/basics/class-with-extends-generic-multiple.src 1`] = ` Object { "body": Array [ Object { @@ -9762,13 +10406,13 @@ Object { "line": 3, }, "start": Object { - "column": 31, + "column": 41, "line": 1, }, }, "range": Array [ - 31, - 35, + 41, + 45, ], "type": "ClassBody", }, @@ -9790,148 +10434,217 @@ Object { ], "type": "Identifier", }, - "implements": Array [ - Object { - "id": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 45, + ], + "superClass": Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "name": "Bar", + "range": Array [ + 31, + 34, + ], + "type": "Identifier", + }, + "superTypeParameters": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 24, + "column": 36, "line": 1, }, "start": Object { - "column": 21, + "column": 35, "line": 1, }, }, - "name": "Bar", "range": Array [ - 21, - 24, + 35, + 36, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "C", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", }, }, - "range": Array [ - 21, - 24, - ], - "type": "ClassImplements", - "typeParameters": Object { + Object { "loc": Object { "end": Object { - "column": 30, + "column": 39, "line": 1, }, "start": Object { - "column": 24, + "column": 38, "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, + "range": Array [ + 38, + 39, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 39, + "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": "S", - "range": Array [ - 25, - 26, - ], - "type": "Identifier", + "start": Object { + "column": 38, + "line": 1, }, }, - Object { + "name": "D", + "range": Array [ + 38, + 39, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 34, + 40, + ], + "type": "TSTypeParameterInstantiation", + }, + "type": "ClassDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "params": Array [ + Object { + "constraint": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 29, + "column": 21, "line": 1, }, "start": Object { - "column": 28, + "column": 20, "line": 1, }, }, + "name": "B", "range": Array [ - 28, - 29, + 20, + 21, ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 28, - 29, - ], - "type": "Identifier", + "type": "Identifier", + }, + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, }, }, - ], + "name": "A", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, "range": Array [ - 24, - 30, + 10, + 21, ], - "type": "TSTypeParameterInstantiation", + "type": "TSTypeParameter", }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, + ], + "range": Array [ + 9, + 22, + ], + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 35, - ], - "superClass": null, - "type": "ClassDeclaration", }, ], "loc": Object { @@ -9946,7 +10659,7 @@ Object { }, "range": Array [ 0, - 36, + 46, ], "sourceType": "script", "tokens": Array [ @@ -9989,125 +10702,215 @@ Object { Object { "loc": Object { "end": Object { - "column": 20, + "column": 10, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, "range": Array [ + 9, 10, - 20, ], - "type": "Keyword", - "value": "implements", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 11, "line": 1, }, "start": Object { - "column": 21, + "column": 10, "line": 1, }, }, "range": Array [ - 21, - 24, + 10, + 11, ], "type": "Identifier", - "value": "Bar", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 19, "line": 1, }, "start": Object { - "column": 24, + "column": 12, "line": 1, }, }, "range": Array [ - 24, - 25, + 12, + 19, ], - "type": "Punctuator", - "value": "<", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 21, "line": 1, }, "start": Object { - "column": 25, + "column": 20, "line": 1, }, }, "range": Array [ - 25, - 26, + 20, + 21, ], "type": "Identifier", - "value": "S", + "value": "B", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 22, "line": 1, }, "start": Object { - "column": 26, + "column": 21, "line": 1, }, }, "range": Array [ - 26, - 27, + 21, + 22, ], "type": "Punctuator", - "value": ",", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 30, "line": 1, }, "start": Object { - "column": 28, + "column": 23, "line": 1, }, }, "range": Array [ - 28, - 29, + 23, + 30, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 34, ], "type": "Identifier", - "value": "T", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 35, "line": 1, }, "start": Object { - "column": 29, + "column": 34, "line": 1, }, }, "range": Array [ - 29, - 30, + 34, + 35, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + "value": "C", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Identifier", + "value": "D", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, ], "type": "Punctuator", "value": ">", @@ -10115,17 +10918,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 32, + "column": 42, "line": 1, }, "start": Object { - "column": 31, + "column": 41, "line": 1, }, }, "range": Array [ - 31, - 32, + 41, + 42, ], "type": "Punctuator", "value": "{", @@ -10142,8 +10945,8 @@ Object { }, }, "range": Array [ - 34, - 35, + 44, + 45, ], "type": "Punctuator", "value": "}", @@ -10153,880 +10956,201 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-mixin.src 1`] = ` +exports[`typescript fixtures/basics/class-with-generic-method.src 1`] = ` Object { "body": Array [ Object { - "async": false, "body": Object { "body": Array [ Object { - "argument": Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 79, - 82, - ], - "type": "ClassBody", - }, - "id": null, + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 33, + "column": 8, "line": 2, }, "start": Object { - "column": 11, + "column": 2, "line": 2, }, }, + "name": "getBar", "range": Array [ - 60, - 82, + 14, + 20, ], - "superClass": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "name": "Base", - "range": Array [ - 74, - 78, - ], - "type": "Identifier", - }, - "type": "ClassExpression", + "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { - "column": 33, + "column": 16, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "range": Array [ - 53, - 82, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 47, - "line": 1, - }, - }, - "range": Array [ - 47, - 84, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "name": "M", - "range": Array [ - 9, - 10, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 38, - "line": 1, - }, - }, - "name": "Base", - "range": Array [ - 38, - 45, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 45, + 14, + 28, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 44, - "line": 1, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "TSTypeReference", - "typeName": Object { + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 45, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 44, - "line": 1, + "column": 14, + "line": 2, }, }, - "name": "T", "range": Array [ - 44, - 45, + 26, + 28, ], - "type": "Identifier", + "type": "BlockStatement", }, - }, - }, - }, - ], - "range": Array [ - 0, - 84, - ], - "type": "FunctionDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "constraint": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 11, + "line": 2, }, }, + "params": Array [], "range": Array [ - 21, - 36, + 23, + 28, ], - "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", - }, + "type": "FunctionExpression", "typeParameters": Object { "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 32, - "line": 1, + "column": 8, + "line": 2, }, }, "params": Array [ Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 33, - "line": 1, + "column": 9, + "line": 2, }, }, - "range": Array [ - 33, - 35, - ], - "type": "TSTypeReference", - "typeName": Object { + "name": Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 33, - "line": 1, + "column": 9, + "line": 2, }, }, - "members": Array [], + "name": "T", "range": Array [ - 33, - 35, + 21, + 22, ], - "type": "TSTypeLiteral", + "type": "Identifier", }, + "range": Array [ + 21, + 22, + ], + "type": "TSTypeParameter", }, ], "range": Array [ - 32, - 36, + 20, + 23, ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 36, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, + "type": "TSTypeParameterDeclaration", }, }, - "name": "T", - "range": Array [ - 11, - 36, - ], - "type": "TSTypeParameter", }, ], - "range": Array [ - 10, - 37, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "body": Object { - "body": Array [], "loc": Object { "end": Object { - "column": 42, - "line": 5, + "column": 1, + "line": 3, }, "start": Object { - "column": 39, - "line": 5, + "column": 10, + "line": 1, }, }, "range": Array [ - 125, - 128, + 10, + 30, ], "type": "ClassBody", }, "id": Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 9, + "line": 1, }, "start": Object { "column": 6, - "line": 5, + "line": 1, }, }, - "name": "X", + "name": "Foo", "range": Array [ - 92, - 93, + 6, + 9, ], "type": "Identifier", }, - "implements": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 5, - }, - "start": Object { - "column": 37, - "line": 5, - }, - }, - "name": "I", - "range": Array [ - 123, - 124, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 5, - }, - "start": Object { - "column": 37, - "line": 5, - }, - }, - "range": Array [ - 123, - 124, - ], - "type": "ClassImplements", - }, - ], "loc": Object { "end": Object { - "column": 42, - "line": 5, + "column": 1, + "line": 3, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 86, - 128, - ], - "superClass": Object { - "arguments": Array [ - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 5, - }, - "start": Object { - "column": 23, - "line": 5, - }, - }, - "name": "C", - "range": Array [ - 109, - 110, - ], - "type": "Identifier", - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "name": "M", - "range": Array [ - 102, - 103, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 5, - }, - }, - "range": Array [ - 102, - 111, - ], - "type": "CallExpression", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 17, - "line": 5, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 18, - "line": 5, - }, - }, - "range": Array [ - 104, - 107, - ], - "type": "TSAnyKeyword", - }, - ], - "range": Array [ - 103, - 108, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "type": "ClassDeclaration", - }, - Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 138, - 141, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, - }, - }, - "name": "C", - "range": Array [ - 136, - 137, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, - }, - }, - "range": Array [ - 130, - 141, + 0, + 30, ], "superClass": null, "type": "ClassDeclaration", }, - Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 12, - "line": 8, - }, - }, - "range": Array [ - 154, - 157, - ], - "type": "TSInterfaceBody", - }, - "heritage": Array [], - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 8, - }, - "start": Object { - "column": 10, - "line": 8, - }, - }, - "name": "I", - "range": Array [ - 152, - 153, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 15, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 8, - }, - }, - "range": Array [ - 142, - 157, - ], - "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", - }, - "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 { - "loc": Object { - "end": Object { - "column": 47, - "line": 9, - }, - "start": Object { - "column": 44, - "line": 9, - }, - }, - "range": Array [ - 202, - 205, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 9, - }, - "start": Object { - "column": 46, - "line": 9, - }, - }, - "range": Array [ - 204, - 205, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 9, - }, - "start": Object { - "column": 46, - "line": 9, - }, - }, - "name": "T", - "range": Array [ - 204, - 205, - ], - "type": "Identifier", - }, - }, - }, - "typeParameters": null, - }, - "loc": Object { - "end": Object { - "column": 48, - "line": 9, - }, - "start": Object { - "column": 5, - "line": 9, - }, - }, - "range": Array [ - 163, - 206, - ], - "type": "VariableDeclarator", - "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", - }, - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 48, - "line": 9, - }, - "start": Object { - "column": 0, - "line": 9, - }, - }, - "range": Array [ - 158, - 206, - ], - "type": "VariableDeclaration", - }, ], "loc": Object { "end": Object { "column": 0, - "line": 10, + "line": 4, }, "start": Object { "column": 0, @@ -11035,14 +11159,14 @@ Object { }, "range": Array [ 0, - 207, + 31, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { @@ -11052,28 +11176,28 @@ Object { }, "range": Array [ 0, - 8, + 5, ], "type": "Keyword", - "value": "function", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, "range": Array [ + 6, 9, - 10, ], "type": "Identifier", - "value": "M", + "value": "Foo", }, Object { "loc": Object { @@ -11091,256 +11215,467 @@ Object { 11, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 11, - 12, + 14, + 20, ], "type": "Identifier", - "value": "T", + "value": "getBar", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 13, 20, + 21, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ 21, - 32, + 22, ], "type": "Identifier", - "value": "Constructor", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 32, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 32, - 33, + 22, + 23, ], "type": "Punctuator", - "value": "<", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 33, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 33, - 34, + 23, + 24, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 34, - "line": 1, + "column": 12, + "line": 2, }, }, "range": Array [ - 34, - 35, + 24, + 25, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 36, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 35, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 35, - 36, + 26, + 27, ], "type": "Punctuator", - "value": ">", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 36, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 36, - 37, + 27, + 28, ], "type": "Punctuator", - "value": ">", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 37, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 37, - 38, + 29, + 30, ], "type": "Punctuator", - "value": "(", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-generic-method-default.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 1, + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "getBar", + "range": Array [ + 14, + 20, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 34, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 32, + 34, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 29, + 34, + ], + "type": "FunctionExpression", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "params": Array [ + Object { + "default": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 25, + 28, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "name": "Bar", + "range": Array [ + 25, + 28, + ], + "type": "Identifier", + }, + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "T", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + "range": Array [ + 21, + 28, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 20, + 29, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, - "start": Object { - "column": 38, - "line": 1, + "range": Array [ + 10, + 36, + ], + "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", }, - "range": Array [ - 38, - 42, - ], - "type": "Identifier", - "value": "Base", - }, - Object { "loc": Object { "end": Object { - "column": 43, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 42, + "column": 0, "line": 1, }, }, "range": Array [ - 42, - 43, + 0, + 36, ], - "type": "Punctuator", - "value": ":", + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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": 45, + "column": 5, "line": 1, }, "start": Object { - "column": 44, + "column": 0, "line": 1, }, }, "range": Array [ - 44, - 45, + 0, + 5, ], - "type": "Identifier", - "value": "T", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 46, + "column": 9, "line": 1, }, "start": Object { - "column": 45, + "column": 6, "line": 1, }, }, "range": Array [ - 45, - 46, + 6, + 9, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 48, + "column": 11, "line": 1, }, "start": Object { - "column": 47, + "column": 10, "line": 1, }, }, "range": Array [ - 47, - 48, + 10, + 11, ], "type": "Punctuator", "value": "{", @@ -11348,323 +11683,367 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "range": Array [ - 53, - 59, + 14, + 20, ], - "type": "Keyword", - "value": "return", + "type": "Identifier", + "value": "getBar", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 9, "line": 2, }, "start": Object { - "column": 11, + "column": 8, "line": 2, }, }, "range": Array [ - 60, - 65, + 20, + 21, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 10, "line": 2, }, "start": Object { - "column": 17, + "column": 9, "line": 2, }, }, "range": Array [ - 66, - 73, + 21, + 22, ], - "type": "Keyword", - "value": "extends", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 12, "line": 2, }, "start": Object { - "column": 25, + "column": 11, "line": 2, }, }, "range": Array [ - 74, - 78, + 23, + 24, ], - "type": "Identifier", - "value": "Base", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 16, "line": 2, }, "start": Object { - "column": 30, + "column": 13, "line": 2, }, }, "range": Array [ - 79, - 80, + 25, + 28, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 33, + "column": 17, "line": 2, }, "start": Object { - "column": 32, + "column": 16, "line": 2, }, }, "range": Array [ - 81, - 82, + 28, + 29, ], "type": "Punctuator", - "value": "}", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 18, + "line": 2, }, "start": Object { - "column": 0, - "line": 3, + "column": 17, + "line": 2, }, }, "range": Array [ - 83, - 84, + 29, + 30, ], "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 86, - 91, - ], - "type": "Keyword", - "value": "class", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 5, + "column": 19, + "line": 2, }, "start": Object { - "column": 6, - "line": 5, + "column": 18, + "line": 2, }, }, "range": Array [ - 92, - 93, + 30, + 31, ], - "type": "Identifier", - "value": "X", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 5, + "column": 21, + "line": 2, }, "start": Object { - "column": 8, - "line": 5, + "column": 20, + "line": 2, }, }, "range": Array [ - 94, - 101, + 32, + 33, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 5, + "column": 22, + "line": 2, }, "start": Object { - "column": 16, - "line": 5, + "column": 21, + "line": 2, }, }, "range": Array [ - 102, - 103, + 33, + 34, ], - "type": "Identifier", - "value": "M", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 5, + "column": 1, + "line": 3, }, "start": Object { - "column": 17, - "line": 5, + "column": 0, + "line": 3, }, }, "range": Array [ - 103, - 104, + 35, + 36, ], "type": "Punctuator", - "value": "<", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-implements.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 5, - }, - "start": Object { - "column": 18, - "line": 5, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 25, + "line": 1, + }, }, + "range": Array [ + 25, + 29, + ], + "type": "ClassBody", }, - "range": Array [ - 104, - 107, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 5, - }, - "start": Object { - "column": 21, - "line": 5, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", }, - "range": Array [ - 107, - 108, + "implements": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "Bar", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 24, + ], + "type": "TSClassImplements", + }, ], - "type": "Punctuator", - "value": ">", - }, - Object { "loc": Object { "end": Object { - "column": 23, - "line": 5, + "column": 1, + "line": 3, }, "start": Object { - "column": 22, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 108, - 109, + 0, + 29, ], - "type": "Punctuator", - "value": "(", + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "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": 24, - "line": 5, + "column": 5, + "line": 1, }, "start": Object { - "column": 23, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 109, - 110, + 0, + 5, ], - "type": "Identifier", - "value": "C", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 5, + "column": 9, + "line": 1, }, "start": Object { - "column": 24, - "line": 5, + "column": 6, + "line": 1, }, }, "range": Array [ - 110, - 111, + 6, + 9, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 36, - "line": 5, + "column": 20, + "line": 1, }, "start": Object { - "column": 26, - "line": 5, + "column": 10, + "line": 1, }, }, "range": Array [ - 112, - 122, + 10, + 20, ], "type": "Keyword", "value": "implements", @@ -11672,35 +12051,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 38, - "line": 5, + "column": 24, + "line": 1, }, "start": Object { - "column": 37, - "line": 5, + "column": 21, + "line": 1, }, }, "range": Array [ - 123, - 124, + 21, + 24, ], "type": "Identifier", - "value": "I", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 5, + "column": 26, + "line": 1, }, "start": Object { - "column": 39, - "line": 5, + "column": 25, + "line": 1, }, }, "range": Array [ - 125, - 126, + 25, + 26, ], "type": "Punctuator", "value": "{", @@ -11708,579 +12087,329 @@ Object { Object { "loc": Object { "end": Object { - "column": 42, - "line": 5, + "column": 1, + "line": 3, }, "start": Object { - "column": 41, - "line": 5, + "column": 0, + "line": 3, }, }, "range": Array [ - 127, - 128, + 28, + 29, ], "type": "Punctuator", "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-implements-and-extends.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 7, - }, - "start": Object { - "column": 0, - "line": 7, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 80, + "line": 1, + }, + "start": Object { + "column": 78, + "line": 1, + }, }, + "range": Array [ + 78, + 80, + ], + "type": "ClassBody", }, - "range": Array [ - 130, - 135, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 7, - }, - "start": Object { - "column": 6, - "line": 7, + "id": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "name": "ClassWithParentAndInterface", + "range": Array [ + 6, + 33, + ], + "type": "Identifier", }, - "range": Array [ - 136, - 137, + "implements": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "name": "MyInterface", + "range": Array [ + 45, + 56, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 56, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 56, + ], + "type": "TSClassImplements", + }, ], - "type": "Identifier", - "value": "C", - }, - Object { "loc": Object { "end": Object { - "column": 9, - "line": 7, + "column": 80, + "line": 1, }, "start": Object { - "column": 8, - "line": 7, + "column": 0, + "line": 1, }, }, "range": Array [ - 138, - 139, + 0, + 80, ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 7, - }, - "start": Object { - "column": 10, - "line": 7, + "superClass": Object { + "loc": Object { + "end": Object { + "column": 77, + "line": 1, + }, + "start": Object { + "column": 65, + "line": 1, + }, }, + "name": "MyOtherClass", + "range": Array [ + 65, + 77, + ], + "type": "Identifier", }, - "range": Array [ - 140, - 141, - ], - "type": "Punctuator", - "value": "}", + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 81, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, - "line": 8, + "column": 5, + "line": 1, }, "start": Object { "column": 0, - "line": 8, + "line": 1, }, }, "range": Array [ - 142, - 151, + 0, + 5, ], "type": "Keyword", - "value": "interface", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 8, + "column": 33, + "line": 1, }, "start": Object { - "column": 10, - "line": 8, + "column": 6, + "line": 1, }, }, "range": Array [ - 152, - 153, + 6, + 33, ], "type": "Identifier", - "value": "I", + "value": "ClassWithParentAndInterface", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 8, + "column": 44, + "line": 1, }, "start": Object { - "column": 12, - "line": 8, + "column": 34, + "line": 1, }, }, "range": Array [ - 154, - 155, + 34, + 44, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "implements", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 8, + "column": 56, + "line": 1, }, "start": Object { - "column": 14, - "line": 8, + "column": 45, + "line": 1, }, }, "range": Array [ - 156, - 157, + 45, + 56, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "MyInterface", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 9, + "column": 64, + "line": 1, }, "start": Object { - "column": 0, - "line": 9, + "column": 57, + "line": 1, }, }, "range": Array [ - 158, - 162, + 57, + 64, ], - "type": "Identifier", - "value": "type", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 9, + "column": 77, + "line": 1, }, "start": Object { - "column": 5, - "line": 9, + "column": 65, + "line": 1, }, }, "range": Array [ - 163, - 174, + 65, + 77, ], "type": "Identifier", - "value": "Constructor", + "value": "MyOtherClass", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 9, + "column": 79, + "line": 1, }, "start": Object { - "column": 16, - "line": 9, + "column": 78, + "line": 1, }, }, "range": Array [ - 174, - 175, + 78, + 79, ], "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 9, - }, - "start": Object { - "column": 17, - "line": 9, - }, - }, - "range": Array [ - 175, - 176, - ], - "type": "Identifier", - "value": "T", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 9, + "column": 80, + "line": 1, }, "start": Object { - "column": 18, - "line": 9, + "column": 79, + "line": 1, }, }, "range": Array [ - 176, - 177, + 79, + 80, ], "type": "Punctuator", - "value": ">", + "value": "}", }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 9, - }, - "start": Object { - "column": 20, - "line": 9, - }, - }, - "range": Array [ - 178, - 179, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 9, - }, - "start": Object { - "column": 22, - "line": 9, - }, - }, - "range": Array [ - 180, - 183, - ], - "type": "Keyword", - "value": "new", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 9, - }, - "start": Object { - "column": 26, - "line": 9, - }, - }, - "range": Array [ - 184, - 185, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 9, - }, - "start": Object { - "column": 27, - "line": 9, - }, - }, - "range": Array [ - 185, - 188, - ], - "type": "Punctuator", - "value": "...", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 9, - }, - "start": Object { - "column": 30, - "line": 9, - }, - }, - "range": Array [ - 188, - 192, - ], - "type": "Identifier", - "value": "args", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 9, - }, - "start": Object { - "column": 34, - "line": 9, - }, - }, - "range": Array [ - 192, - 193, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 9, - }, - "start": Object { - "column": 36, - "line": 9, - }, - }, - "range": Array [ - 194, - 197, - ], - "type": "Identifier", - "value": "any", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 9, - }, - "start": Object { - "column": 39, - "line": 9, - }, - }, - "range": Array [ - 197, - 198, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 9, - }, - "start": Object { - "column": 40, - "line": 9, - }, - }, - "range": Array [ - 198, - 199, - ], - "type": "Punctuator", - "value": "]", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 9, - }, - "start": Object { - "column": 41, - "line": 9, - }, - }, - "range": Array [ - 199, - 200, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 9, - }, - "start": Object { - "column": 43, - "line": 9, - }, - }, - "range": Array [ - 201, - 203, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 9, - }, - "start": Object { - "column": 46, - "line": 9, - }, - }, - "range": Array [ - 204, - 205, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 9, - }, - "start": Object { - "column": 47, - "line": 9, - }, - }, - "range": Array [ - 205, - 206, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-optional-computed-property.src 1`] = ` -Object { - "body": Array [ + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-implements-generic.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", - }, - }, - ], + "body": Array [], "loc": Object { "end": Object { "column": 1, "line": 3, }, "start": Object { - "column": 8, + "column": 28, "line": 1, }, }, "range": Array [ - 8, - 45, + 28, + 32, ], "type": "ClassBody", }, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 1, }, "start": Object { @@ -12288,13 +12417,104 @@ Object { "line": 1, }, }, - "name": "X", + "name": "Foo", "range": Array [ 6, - 7, + 9, ], "type": "Identifier", }, + "implements": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "Bar", + "range": Array [ + 21, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 24, + ], + "type": "TSClassImplements", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "S", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + }, + ], + "range": Array [ + 24, + 27, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + ], "loc": Object { "end": Object { "column": 1, @@ -12307,7 +12527,7 @@ Object { }, "range": Array [ 0, - 45, + 32, ], "superClass": null, "type": "ClassDeclaration", @@ -12325,7 +12545,7 @@ Object { }, "range": Array [ 0, - 46, + 33, ], "sourceType": "script", "tokens": Array [ @@ -12350,7 +12570,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 1, }, "start": Object { @@ -12360,128 +12580,128 @@ Object { }, "range": Array [ 6, - 7, + 9, ], "type": "Identifier", - "value": "X", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 20, "line": 1, }, "start": Object { - "column": 8, + "column": 10, "line": 1, }, }, "range": Array [ - 8, - 9, + 10, + 20, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "implements", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 14, 21, + 24, ], - "type": "Keyword", - "value": "private", + "type": "Identifier", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ - 22, - 23, + 24, + 25, ], "type": "Punctuator", - "value": "[", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 13, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 23, - 28, + 25, + 26, ], - "type": "String", - "value": "'foo'", + "type": "Identifier", + "value": "S", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 28, - 29, + 26, + 27, ], "type": "Punctuator", - "value": "]", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ + 28, 29, - 30, ], "type": "Punctuator", - "value": "?", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { - "column": 21, - "line": 2, + "column": 0, + "line": 3, }, }, "range": Array [ @@ -12489,367 +12709,183 @@ Object { 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": "}", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/class-with-optional-methods.src 1`] = ` +exports[`typescript fixtures/basics/class-with-implements-generic-multiple.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "foo", - "optional": true, - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - "kind": "method", + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 35, + ], + "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 { + "expression": Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 21, + "line": 1, }, }, + "name": "Bar", "range": Array [ - 14, 21, + 24, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": null, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 9, - "line": 2, - }, - "start": Object { - "column": 6, - "line": 2, - }, - }, - "params": Array [], - "range": Array [ - 18, - 21, - ], - "type": "FunctionExpression", - }, + "type": "Identifier", }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "bar", - "optional": true, - "range": Array [ - 24, - 27, - ], - "type": "Identifier", + "loc": Object { + "end": Object { + "column": 24, + "line": 1, }, - "kind": "method", + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 24, + ], + "type": "TSClassImplements", + "typeParameters": Object { "loc": Object { "end": Object { - "column": 17, - "line": 3, + "column": 30, + "line": 1, }, "start": Object { - "column": 2, - "line": 3, + "column": 24, + "line": 1, }, }, - "range": Array [ - 24, - 39, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": null, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 28, - 39, - ], - "returnType": Object { + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 26, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 25, + "line": 1, }, }, "range": Array [ - 30, - 38, + 25, + 26, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 26, + "line": 1, }, "start": Object { - "column": 10, - "line": 3, + "column": 25, + "line": 1, }, }, + "name": "S", "range": Array [ - 32, - 38, + 25, + 26, ], - "type": "TSStringKeyword", - }, - }, - "type": "FunctionExpression", - }, - }, - Object { - "accessibility": "private", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "name": "baz", - "optional": true, - "range": Array [ - 50, - 53, - ], - "type": "Identifier", - }, - "kind": "method", - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 42, - 65, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": null, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, + "type": "Identifier", }, }, - "params": Array [], - "range": Array [ - 54, - 65, - ], - "returnType": Object { + Object { "loc": Object { "end": Object { - "column": 24, - "line": 4, + "column": 29, + "line": 1, }, "start": Object { - "column": 16, - "line": 4, + "column": 28, + "line": 1, }, }, "range": Array [ - 56, - 64, + 28, + 29, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 24, - "line": 4, + "column": 29, + "line": 1, }, "start": Object { - "column": 18, - "line": 4, + "column": 28, + "line": 1, }, }, + "name": "T", "range": Array [ - 58, - 64, + 28, + 29, ], - "type": "TSStringKeyword", + "type": "Identifier", }, }, - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 67, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, + ], + "range": Array [ + 24, + 30, + ], + "type": "TSTypeParameterInstantiation", }, }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - }, + ], "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 3, }, "start": Object { "column": 0, @@ -12858,7 +12894,7 @@ Object { }, "range": Array [ 0, - 67, + 35, ], "superClass": null, "type": "ClassDeclaration", @@ -12867,7 +12903,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 4, }, "start": Object { "column": 0, @@ -12876,7 +12912,7 @@ Object { }, "range": Array [ 0, - 68, + 36, ], "sourceType": "script", "tokens": Array [ @@ -12919,7 +12955,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 20, "line": 1, }, "start": Object { @@ -12929,385 +12965,151 @@ Object { }, "range": Array [ 10, - 11, + 20, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "implements", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 14, - 17, + 21, + 24, ], "type": "Identifier", - "value": "foo", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ - 17, - 18, + 24, + 25, ], "type": "Punctuator", - "value": "?", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 6, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 18, - 19, + 25, + 26, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "S", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 19, - 20, + 26, + 27, ], "type": "Punctuator", - "value": ")", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 20, - 21, + 28, + 29, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 30, + "line": 1, }, "start": Object { - "column": 2, - "line": 3, + "column": 29, + "line": 1, }, }, "range": Array [ - 24, - 27, + 29, + 30, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 3, + "column": 32, + "line": 1, }, "start": Object { - "column": 5, - "line": 3, + "column": 31, + "line": 1, }, }, "range": Array [ - 27, - 28, + 31, + 32, ], "type": "Punctuator", - "value": "?", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 1, "line": 3, }, - "start": Object { - "column": 6, - "line": 3, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 30, - 31, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 32, - 38, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 3, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "range": Array [ - 38, - 39, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 42, - 49, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 50, - 53, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, - }, - }, - "range": Array [ - 58, - 64, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 64, - 65, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, "start": Object { "column": 0, - "line": 5, + "line": 3, }, }, "range": Array [ - 66, - 67, + 34, + 35, ], "type": "Punctuator", "value": "}", @@ -13317,716 +13119,874 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-optional-properties.src 1`] = ` +exports[`typescript fixtures/basics/class-with-mixin.src 1`] = ` Object { "body": Array [ Object { + "async": false, "body": Object { "body": Array [ Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "optional": true, - "range": Array [ - 14, - 19, - ], - "static": false, - "type": "ClassProperty", - "value": null, - }, - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "name": "bar", - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "optional": true, - "range": Array [ - 22, - 36, - ], - "static": false, - "type": "ClassProperty", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 27, - 35, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "argument": Object { + "body": Object { + "body": Array [], "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 33, + "line": 2, }, "start": Object { - "column": 9, - "line": 3, + "column": 30, + "line": 2, }, }, "range": Array [ - 29, - 35, + 79, + 82, ], - "type": "TSStringKeyword", - }, - }, - "value": null, - }, - Object { - "accessibility": "private", - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "name": "baz", - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, + "type": "ClassBody", }, - }, - "optional": true, - "range": Array [ - 39, - 61, - ], - "static": false, - "type": "ClassProperty", - "typeAnnotation": Object { + "id": null, "loc": Object { "end": Object { - "column": 23, - "line": 4, + "column": 33, + "line": 2, }, "start": Object { - "column": 15, - "line": 4, + "column": 11, + "line": 2, }, }, "range": Array [ - 52, 60, + 82, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "superClass": Object { "loc": Object { "end": Object { - "column": 23, - "line": 4, + "column": 29, + "line": 2, }, "start": Object { - "column": 17, - "line": 4, + "column": 25, + "line": 2, }, }, + "name": "Base", "range": Array [ - 54, - 60, + 74, + 78, ], - "type": "TSStringKeyword", + "type": "Identifier", }, + "type": "ClassExpression", }, - "value": null, + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 53, + 82, + ], + "type": "ReturnStatement", }, ], "loc": Object { "end": Object { "column": 1, - "line": 5, + "line": 3, }, "start": Object { - "column": 10, + "column": 47, "line": 1, }, }, "range": Array [ - 10, - 63, + 47, + 84, ], - "type": "ClassBody", + "type": "BlockStatement", }, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 9, + "column": 10, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, - "name": "Foo", + "name": "M", "range": Array [ - 6, 9, + 10, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 63, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 64, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, + "line": 3, }, "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, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "name": "Base", + "range": Array [ + 38, + 45, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 45, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 44, + 45, + ], + "type": "Identifier", + }, + }, + }, }, - }, + ], "range": Array [ - 6, - 9, + 0, + 84, ], - "type": "Identifier", - "value": "Foo", + "type": "FunctionDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "params": Array [ + Object { + "constraint": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 36, + ], + "type": "TSTypeReference", + "typeName": Object { + "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": 36, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "members": Array [], + "range": Array [ + 33, + 35, + ], + "type": "TSTypeLiteral", + }, + ], + "range": Array [ + 32, + 36, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "range": Array [ + 11, + 36, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 10, + 37, + ], + "type": "TSTypeParameterDeclaration", + }, }, Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 42, + "line": 5, + }, + "start": Object { + "column": 39, + "line": 5, + }, }, - "start": Object { - "column": 10, - "line": 1, + "range": Array [ + 125, + 128, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 5, + }, }, + "name": "X", + "range": Array [ + 92, + 93, + ], + "type": "Identifier", }, - "range": Array [ - 10, - 11, + "implements": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 5, + }, + "start": Object { + "column": 37, + "line": 5, + }, + }, + "name": "I", + "range": Array [ + 123, + 124, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 38, + "line": 5, + }, + "start": Object { + "column": 37, + "line": 5, + }, + }, + "range": Array [ + 123, + 124, + ], + "type": "TSClassImplements", + }, ], - "type": "Punctuator", - "value": "{", - }, - Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 42, + "line": 5, }, "start": Object { - "column": 2, - "line": 2, + "column": 0, + "line": 5, }, }, "range": Array [ - 14, - 17, + 86, + 128, ], - "type": "Identifier", - "value": "foo", + "superClass": Object { + "arguments": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 5, + }, + "start": Object { + "column": 23, + "line": 5, + }, + }, + "name": "C", + "range": Array [ + 109, + 110, + ], + "type": "Identifier", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 5, + }, + "start": Object { + "column": 16, + "line": 5, + }, + }, + "name": "M", + "range": Array [ + 102, + 103, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 25, + "line": 5, + }, + "start": Object { + "column": 16, + "line": 5, + }, + }, + "range": Array [ + 102, + 111, + ], + "type": "CallExpression", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 5, + }, + "start": Object { + "column": 17, + "line": 5, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 5, + }, + "start": Object { + "column": 18, + "line": 5, + }, + }, + "range": Array [ + 104, + 107, + ], + "type": "TSAnyKeyword", + }, + ], + "range": Array [ + 103, + 108, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + "type": "ClassDeclaration", }, Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 11, + "line": 7, + }, + "start": Object { + "column": 8, + "line": 7, + }, + }, + "range": Array [ + 138, + 141, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 7, + }, + "start": Object { + "column": 6, + "line": 7, + }, + }, + "name": "C", + "range": Array [ + 136, + 137, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 11, + "line": 7, }, "start": Object { - "column": 5, - "line": 2, + "column": 0, + "line": 7, }, }, "range": Array [ - 17, - 18, + 130, + 141, ], - "type": "Punctuator", - "value": "?", + "superClass": null, + "type": "ClassDeclaration", }, Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 15, + "line": 8, + }, + "start": Object { + "column": 12, + "line": 8, + }, + }, + "range": Array [ + 154, + 157, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 8, + }, + "start": Object { + "column": 10, + "line": 8, + }, + }, + "name": "I", + "range": Array [ + 152, + 153, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 15, + "line": 8, }, "start": Object { - "column": 6, - "line": 2, + "column": 0, + "line": 8, }, }, "range": Array [ - 18, - 19, + 142, + 157, ], - "type": "Punctuator", - "value": ";", + "type": "TSInterfaceDeclaration", }, 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", + }, "loc": Object { "end": Object { - "column": 5, - "line": 3, - }, - "start": Object { - "column": 2, - "line": 3, - }, - }, - "range": Array [ - 22, - 25, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 3, - }, - "start": Object { - "column": 5, - "line": 3, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "range": Array [ - 29, - 35, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 4, - }, - "start": Object { - "column": 2, - "line": 4, - }, - }, - "range": Array [ - 39, - 46, - ], - "type": "Keyword", - "value": "private", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 10, - "line": 4, - }, - }, - "range": Array [ - 47, - 50, - ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": "?", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 4, - }, - "start": Object { - "column": 15, - "line": 4, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 4, - }, - "start": Object { - "column": 17, - "line": 4, - }, - }, - "range": Array [ - 54, - 60, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 4, - }, - "start": Object { - "column": 23, - "line": 4, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, + "column": 48, + "line": 9, }, "start": Object { "column": 0, - "line": 5, + "line": 9, }, }, "range": Array [ - 62, - 63, + 158, + 206, ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-optional-property-undefined.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [ + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 9, + }, + "start": Object { + "column": 22, + "line": 9, + }, + }, + "params": Array [ Object { - "accessibility": "private", - "computed": false, - "key": Object { + "argument": Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 34, + "line": 9, }, "start": Object { - "column": 10, - "line": 2, + "column": 30, + "line": 9, }, }, - "name": "foo", + "name": "args", "range": Array [ - 20, - 23, + 188, + 192, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 27, - "line": 2, + "column": 41, + "line": 9, }, "start": Object { - "column": 2, - "line": 2, + "column": 27, + "line": 9, }, }, - "optional": true, "range": Array [ - 12, - 37, + 185, + 199, ], - "static": false, - "type": "ClassProperty", - "value": Object { + "type": "RestElement", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 41, + "line": 9, }, "start": Object { - "column": 17, - "line": 2, + "column": 34, + "line": 9, }, }, - "name": "undefined", "range": Array [ - 27, - 36, + 192, + 199, ], - "type": "Identifier", + "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": 1, - "line": 3, + "range": Array [ + 180, + 205, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 9, + }, + "start": Object { + "column": 43, + "line": 9, + }, }, - "start": Object { - "column": 8, - "line": 1, + "range": Array [ + 201, + 205, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 9, + }, + "start": Object { + "column": 46, + "line": 9, + }, + }, + "range": Array [ + 204, + 205, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 9, + }, + "start": Object { + "column": 46, + "line": 9, + }, + }, + "name": "T", + "range": Array [ + 204, + 205, + ], + "type": "Identifier", + }, }, }, - "range": Array [ - 8, - 39, - ], - "type": "ClassBody", + "type": "TSConstructorType", }, - "id": Object { + "typeParameters": Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 19, + "line": 9, }, "start": Object { - "column": 6, - "line": 1, + "column": 16, + "line": 9, }, }, - "name": "X", + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 9, + }, + "start": Object { + "column": 17, + "line": 9, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 9, + }, + "start": Object { + "column": 17, + "line": 9, + }, + }, + "name": "T", + "range": Array [ + 175, + 176, + ], + "type": "Identifier", + }, + "range": Array [ + 175, + 176, + ], + "type": "TSTypeParameter", + }, + ], "range": Array [ - 6, - 7, + 174, + 177, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 39, - ], - "superClass": null, - "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 10, }, "start": Object { "column": 0, @@ -14035,14 +13995,14 @@ Object { }, "range": Array [ 0, - 41, + 207, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -14052,154 +14012,406 @@ 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": 9, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ + 11, 12, - 19, ], - "type": "Keyword", - "value": "private", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ + 13, 20, - 23, ], - "type": "Identifier", - "value": "foo", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { - "column": 13, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 23, - 24, + 21, + 32, ], - "type": "Punctuator", - "value": "?", + "type": "Identifier", + "value": "Constructor", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 33, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 32, + "line": 1, }, }, "range": Array [ - 25, - 26, + 32, + 33, ], "type": "Punctuator", - "value": "=", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, - }, + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 42, + ], + "type": "Identifier", + "value": "Base", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 53, + 59, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 60, + 65, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, "start": Object { "column": 17, "line": 2, }, }, "range": Array [ - 27, - 36, + 66, + 73, ], "type": "Keyword", - "value": "undefined", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 29, "line": 2, }, "start": Object { - "column": 26, + "column": 25, "line": 2, }, }, "range": Array [ - 36, - 37, + 74, + 78, + ], + "type": "Identifier", + "value": "Base", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 79, + 80, ], "type": "Punctuator", - "value": ";", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 81, + 82, + ], + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { @@ -14213,539 +14425,26 @@ Object { }, }, "range": Array [ - 38, - 39, + 83, + 84, ], "type": "Punctuator", "value": "}", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-private-parameter-properties.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": 2, - "line": 2, - }, - }, - "name": "constructor", - "range": Array [ - 14, - 25, - ], - "type": "Identifier", - }, - "kind": "constructor", - "loc": Object { - "end": Object { - "column": 59, - "line": 5, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 14, - 201, - ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 59, - "line": 5, - }, - "start": Object { - "column": 57, - "line": 5, - }, - }, - "range": Array [ - 199, - 201, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 59, - "line": 5, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "params": Array [ - Object { - "accessibility": "private", - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 22, - "line": 2, - }, - }, - "name": "firstName", - "range": Array [ - 34, - 51, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 43, - 51, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 45, - 51, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 26, - 51, - ], - "type": "TSParameterProperty", - }, - Object { - "accessibility": "private", - "loc": Object { - "end": Object { - "column": 47, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 3, - }, - "start": Object { - "column": 31, - "line": 3, - }, - }, - "name": "lastName", - "range": Array [ - 84, - 100, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 3, - }, - "start": Object { - "column": 39, - "line": 3, - }, - }, - "range": Array [ - 92, - 100, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 3, - }, - "start": Object { - "column": 41, - "line": 3, - }, - }, - "range": Array [ - 94, - 100, - ], - "type": "TSStringKeyword", - }, - }, - }, - "range": Array [ - 67, - 100, - ], - "readonly": true, - "type": "TSParameterProperty", - }, - Object { - "accessibility": "private", - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "parameter": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 4, - }, - "start": Object { - "column": 22, - "line": 4, - }, - }, - "name": "age", - "range": Array [ - 124, - 135, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 4, - }, - "start": Object { - "column": 25, - "line": 4, - }, - }, - "range": Array [ - 127, - 135, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 129, - 135, - ], - "type": "TSNumberKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 116, - 140, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 4, - }, - "start": Object { - "column": 36, - "line": 4, - }, - }, - "range": Array [ - 138, - 140, - ], - "raw": "30", - "type": "Literal", - "value": 30, - }, - "type": "AssignmentPattern", - }, - "range": Array [ - 116, - 140, - ], - "type": "TSParameterProperty", - }, - Object { - "accessibility": "private", - "loc": Object { - "end": Object { - "column": 55, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "parameter": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 5, - }, - "start": Object { - "column": 31, - "line": 5, - }, - }, - "name": "student", - "range": Array [ - 173, - 189, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 5, - }, - "start": Object { - "column": 38, - "line": 5, - }, - }, - "range": Array [ - 180, - 189, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 47, - "line": 5, - }, - "start": Object { - "column": 40, - "line": 5, - }, - }, - "range": Array [ - 182, - 189, - ], - "type": "TSBooleanKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 55, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 156, - 197, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 5, - }, - "start": Object { - "column": 50, - "line": 5, - }, - }, - "range": Array [ - 192, - 197, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - "type": "AssignmentPattern", - }, - "range": Array [ - 156, - 197, - ], - "readonly": true, - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 25, - 201, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 203, - ], - "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": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 203, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 203, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { "column": 5, - "line": 1, + "line": 5, }, "start": Object { "column": 0, - "line": 1, + "line": 5, }, }, "range": Array [ - 0, - 5, + 86, + 91, ], "type": "Keyword", "value": "class", @@ -14753,534 +14452,606 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 7, + "line": 5, }, "start": Object { "column": 6, - "line": 1, + "line": 5, }, }, "range": Array [ - 6, - 9, + 92, + 93, ], "type": "Identifier", - "value": "Foo", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 15, + "line": 5, }, "start": Object { - "column": 10, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 10, - 11, + 94, + 101, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 17, + "line": 5, }, "start": Object { - "column": 2, - "line": 2, + "column": 16, + "line": 5, }, }, "range": Array [ - 14, - 25, + 102, + 103, ], "type": "Identifier", - "value": "constructor", + "value": "M", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 18, + "line": 5, }, "start": Object { - "column": 13, - "line": 2, + "column": 17, + "line": 5, }, }, "range": Array [ - 25, - 26, + 103, + 104, ], "type": "Punctuator", - "value": "(", + "value": "<", }, Object { "loc": Object { "end": Object { "column": 21, - "line": 2, + "line": 5, }, "start": Object { - "column": 14, - "line": 2, + "column": 18, + "line": 5, }, }, "range": Array [ - 26, - 33, + 104, + 107, ], - "type": "Keyword", - "value": "private", + "type": "Identifier", + "value": "any", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 2, + "column": 22, + "line": 5, }, "start": Object { - "column": 22, - "line": 2, + "column": 21, + "line": 5, }, }, "range": Array [ - 34, - 43, + 107, + 108, ], - "type": "Identifier", - "value": "firstName", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 2, + "column": 23, + "line": 5, }, "start": Object { - "column": 31, - "line": 2, + "column": 22, + "line": 5, }, }, "range": Array [ - 43, - 44, + 108, + 109, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 2, + "column": 24, + "line": 5, }, "start": Object { - "column": 33, - "line": 2, + "column": 23, + "line": 5, }, }, "range": Array [ - 45, - 51, + 109, + 110, ], "type": "Identifier", - "value": "string", + "value": "C", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 2, + "column": 25, + "line": 5, }, "start": Object { - "column": 39, - "line": 2, + "column": 24, + "line": 5, }, }, "range": Array [ - 51, - 52, + 110, + 111, ], "type": "Punctuator", - "value": ",", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 3, + "column": 36, + "line": 5, }, "start": Object { - "column": 14, - "line": 3, + "column": 26, + "line": 5, }, }, "range": Array [ - 67, - 74, + 112, + 122, ], "type": "Keyword", - "value": "private", + "value": "implements", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 3, + "column": 38, + "line": 5, }, "start": Object { - "column": 22, - "line": 3, + "column": 37, + "line": 5, }, }, "range": Array [ - 75, - 83, + 123, + 124, ], "type": "Identifier", - "value": "readonly", + "value": "I", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 3, + "column": 40, + "line": 5, }, "start": Object { - "column": 31, - "line": 3, + "column": 39, + "line": 5, }, }, "range": Array [ - 84, - 92, + 125, + 126, ], - "type": "Identifier", - "value": "lastName", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 3, + "column": 42, + "line": 5, }, "start": Object { - "column": 39, - "line": 3, + "column": 41, + "line": 5, }, }, "range": Array [ - 92, - 93, + 127, + 128, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 3, + "column": 5, + "line": 7, }, "start": Object { - "column": 41, - "line": 3, + "column": 0, + "line": 7, }, }, "range": Array [ - 94, - 100, + 130, + 135, ], - "type": "Identifier", - "value": "string", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 48, - "line": 3, + "column": 7, + "line": 7, }, "start": Object { - "column": 47, - "line": 3, + "column": 6, + "line": 7, }, }, "range": Array [ - 100, - 101, + 136, + 137, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "C", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 4, + "column": 9, + "line": 7, }, "start": Object { - "column": 14, - "line": 4, + "column": 8, + "line": 7, }, }, "range": Array [ - 116, - 123, + 138, + 139, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 7, + }, + "start": Object { + "column": 10, + "line": 7, + }, + }, + "range": Array [ + 140, + 141, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 8, + }, + }, + "range": Array [ + 142, + 151, ], "type": "Keyword", - "value": "private", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 4, + "column": 11, + "line": 8, }, "start": Object { - "column": 22, - "line": 4, + "column": 10, + "line": 8, }, }, "range": Array [ - 124, - 127, + 152, + 153, ], "type": "Identifier", - "value": "age", + "value": "I", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 4, + "column": 13, + "line": 8, }, "start": Object { - "column": 25, - "line": 4, + "column": 12, + "line": 8, }, }, "range": Array [ - 127, - 128, + 154, + 155, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 4, + "column": 15, + "line": 8, }, "start": Object { - "column": 27, - "line": 4, + "column": 14, + "line": 8, }, }, "range": Array [ - 129, - 135, + 156, + 157, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 9, + }, + "start": Object { + "column": 0, + "line": 9, + }, + }, + "range": Array [ + 158, + 162, ], "type": "Identifier", - "value": "number", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 4, + "column": 16, + "line": 9, }, "start": Object { - "column": 34, - "line": 4, + "column": 5, + "line": 9, }, }, "range": Array [ - 136, - 137, + 163, + 174, + ], + "type": "Identifier", + "value": "Constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 9, + }, + "start": Object { + "column": 16, + "line": 9, + }, + }, + "range": Array [ + 174, + 175, ], "type": "Punctuator", - "value": "=", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 4, + "column": 18, + "line": 9, }, "start": Object { - "column": 36, - "line": 4, + "column": 17, + "line": 9, }, }, "range": Array [ - 138, - 140, + 175, + 176, ], - "type": "Numeric", - "value": "30", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 4, + "column": 19, + "line": 9, }, "start": Object { - "column": 38, - "line": 4, + "column": 18, + "line": 9, }, }, "range": Array [ - 140, - 141, + 176, + 177, ], "type": "Punctuator", - "value": ",", + "value": ">", }, Object { "loc": Object { "end": Object { "column": 21, - "line": 5, + "line": 9, }, "start": Object { - "column": 14, - "line": 5, + "column": 20, + "line": 9, }, }, "range": Array [ - 156, - 163, + 178, + 179, ], - "type": "Keyword", - "value": "private", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 5, + "column": 25, + "line": 9, }, "start": Object { "column": 22, - "line": 5, + "line": 9, }, }, "range": Array [ - 164, - 172, + 180, + 183, ], - "type": "Identifier", - "value": "readonly", + "type": "Keyword", + "value": "new", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 5, + "column": 27, + "line": 9, }, "start": Object { - "column": 31, - "line": 5, + "column": 26, + "line": 9, }, }, "range": Array [ - 173, - 180, + 184, + 185, ], - "type": "Identifier", - "value": "student", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 5, + "column": 30, + "line": 9, }, "start": Object { - "column": 38, - "line": 5, + "column": 27, + "line": 9, }, }, "range": Array [ - 180, - 181, + 185, + 188, ], "type": "Punctuator", - "value": ":", + "value": "...", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 5, + "column": 34, + "line": 9, }, "start": Object { - "column": 40, - "line": 5, + "column": 30, + "line": 9, }, }, "range": Array [ - 182, - 189, + 188, + 192, ], "type": "Identifier", - "value": "boolean", + "value": "args", }, Object { "loc": Object { "end": Object { - "column": 49, - "line": 5, + "column": 35, + "line": 9, }, "start": Object { - "column": 48, - "line": 5, + "column": 34, + "line": 9, }, }, "range": Array [ - 190, - 191, + 192, + 193, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 55, - "line": 5, + "column": 39, + "line": 9, }, "start": Object { - "column": 50, - "line": 5, + "column": 36, + "line": 9, }, }, "range": Array [ - 192, + 194, 197, ], - "type": "Boolean", - "value": "false", + "type": "Identifier", + "value": "any", }, Object { "loc": Object { "end": Object { - "column": 56, - "line": 5, + "column": 40, + "line": 9, }, "start": Object { - "column": 55, - "line": 5, + "column": 39, + "line": 9, }, }, "range": Array [ @@ -15288,563 +15059,382 @@ Object { 198, ], "type": "Punctuator", - "value": ")", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 58, - "line": 5, + "column": 41, + "line": 9, }, "start": Object { - "column": 57, - "line": 5, + "column": 40, + "line": 9, }, }, "range": Array [ + 198, 199, - 200, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 59, - "line": 5, + "column": 42, + "line": 9, }, "start": Object { - "column": 58, - "line": 5, + "column": 41, + "line": 9, }, }, "range": Array [ + 199, 200, - 201, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 45, + "line": 9, }, "start": Object { - "column": 0, - "line": 6, + "column": 43, + "line": 9, }, }, "range": Array [ - 202, + 201, 203, ], "type": "Punctuator", - "value": "}", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 9, + }, + "start": Object { + "column": 46, + "line": 9, + }, + }, + "range": Array [ + 204, + 205, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 9, + }, + "start": Object { + "column": 47, + "line": 9, + }, + }, + "range": Array [ + 205, + 206, + ], + "type": "Punctuator", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/class-with-protected-parameter-properties.src 1`] = ` +exports[`typescript fixtures/basics/class-with-mixin-reference.src 1`] = ` Object { "body": Array [ Object { + "async": false, "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "name": "constructor", - "range": Array [ - 14, - 25, - ], - "type": "Identifier", + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 49, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "M", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, }, - "kind": "constructor", + "start": Object { + "column": 37, + "line": 1, + }, + }, + "name": "Base", + "range": Array [ + 37, + 44, + ], + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 61, - "line": 5, + "column": 44, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 41, + "line": 1, }, }, "range": Array [ - 14, - 209, + 41, + 44, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "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": 61, - "line": 5, + "column": 44, + "line": 1, }, "start": Object { - "column": 59, - "line": 5, + "column": 43, + "line": 1, }, }, + "name": "T", "range": Array [ - 207, - 209, + 43, + 44, ], - "type": "BlockStatement", + "type": "Identifier", }, - "expression": false, - "generator": false, - "id": null, + }, + }, + }, + ], + "range": Array [ + 0, + 49, + ], + "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": 61, - "line": 5, + "column": 35, + "line": 1, }, "start": Object { - "column": 13, - "line": 2, + "column": 21, + "line": 1, }, }, - "params": Array [ - Object { - "accessibility": "protected", - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, + "range": Array [ + 21, + 35, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "name": "firstName", - "range": Array [ - 36, - 53, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 45, - 53, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, - }, - "range": Array [ - 47, - 53, - ], - "type": "TSStringKeyword", - }, - }, + "start": Object { + "column": 21, + "line": 1, }, - "range": Array [ - 26, - 53, - ], - "type": "TSParameterProperty", }, - Object { - "accessibility": "protected", - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, + "name": "Constructor", + "range": Array [ + 21, + 32, + ], + "type": "Identifier", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "name": "lastName", - "range": Array [ - 88, - 104, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 41, - "line": 3, - }, - }, - "range": Array [ - 96, - 104, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 43, - "line": 3, - }, - }, - "range": Array [ - 98, - 104, - ], - "type": "TSStringKeyword", - }, - }, + "start": Object { + "column": 32, + "line": 1, }, - "range": Array [ - 69, - 104, - ], - "readonly": true, - "type": "TSParameterProperty", }, - Object { - "accessibility": "protected", - "loc": Object { - "end": Object { - "column": 40, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "parameter": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "name": "age", - "range": Array [ - 130, - 141, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 4, - }, - "start": Object { - "column": 27, - "line": 4, - }, - }, - "range": Array [ - 133, - 141, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 4, - }, - "start": Object { - "column": 29, - "line": 4, - }, - }, - "range": Array [ - 135, - 141, - ], - "type": "TSNumberKeyword", - }, - }, - }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 40, - "line": 4, + "column": 34, + "line": 1, }, "start": Object { - "column": 14, - "line": 4, + "column": 33, + "line": 1, }, }, "range": Array [ - 120, - 146, + 33, + 34, ], - "right": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 4, - }, - "start": Object { - "column": 38, - "line": 4, - }, - }, - "range": Array [ - 144, - 146, - ], - "raw": "30", - "type": "Literal", - "value": 30, - }, - "type": "AssignmentPattern", - }, - "range": Array [ - 120, - 146, - ], - "type": "TSParameterProperty", - }, - Object { - "accessibility": "protected", - "loc": Object { - "end": Object { - "column": 57, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "parameter": Object { - "left": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 49, - "line": 5, + "column": 34, + "line": 1, }, "start": Object { "column": 33, - "line": 5, + "line": 1, }, }, - "name": "student", + "name": "M", "range": Array [ - 181, - 197, + 33, + 34, ], "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 5, - }, - "start": Object { - "column": 40, - "line": 5, - }, - }, - "range": Array [ - 188, - 197, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 5, - }, - "start": Object { - "column": 42, - "line": 5, - }, - }, - "range": Array [ - 190, - 197, - ], - "type": "TSBooleanKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 57, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 162, - 205, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 5, - }, - "start": Object { - "column": 52, - "line": 5, - }, - }, - "range": Array [ - 200, - 205, - ], - "raw": "false", - "type": "Literal", - "value": false, }, - "type": "AssignmentPattern", }, - "range": Array [ - 162, - 205, - ], - "readonly": true, - "type": "TSParameterProperty", + ], + "range": Array [ + 32, + 35, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, }, - ], + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "T", "range": Array [ - 25, - 209, + 11, + 12, ], - "type": "FunctionExpression", + "type": "Identifier", }, + "range": Array [ + 11, + 35, + ], + "type": "TSTypeParameter", }, ], - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, "range": Array [ 10, - 211, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 6, - 9, + 36, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 211, - ], - "superClass": null, - "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 0, + "line": 3, }, "start": Object { "column": 0, @@ -15853,14 +15443,14 @@ Object { }, "range": Array [ 0, - 211, + 50, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -15870,28 +15460,28 @@ Object { }, "range": Array [ 0, - 5, + 8, ], "type": "Keyword", - "value": "class", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 10, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, "range": Array [ - 6, 9, + 10, ], "type": "Identifier", - "value": "Foo", + "value": "M", }, Object { "loc": Object { @@ -15909,202 +15499,184 @@ Object { 11, ], "type": "Punctuator", - "value": "{", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 14, - 25, + 11, + 12, ], "type": "Identifier", - "value": "constructor", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { "column": 13, - "line": 2, + "line": 1, }, }, "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, - }, - "range": Array [ - 26, - 35, + 13, + 20, ], "type": "Keyword", - "value": "protected", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 36, - 45, + 21, + 32, ], "type": "Identifier", - "value": "firstName", + "value": "Constructor", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 33, + "line": 1, }, "start": Object { - "column": 33, - "line": 2, + "column": 32, + "line": 1, }, }, "range": Array [ - 45, - 46, + 32, + 33, ], "type": "Punctuator", - "value": ":", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 34, + "line": 1, }, "start": Object { - "column": 35, - "line": 2, + "column": 33, + "line": 1, }, }, "range": Array [ - 47, - 53, + 33, + 34, ], "type": "Identifier", - "value": "string", + "value": "M", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 2, + "column": 35, + "line": 1, }, "start": Object { - "column": 41, - "line": 2, + "column": 34, + "line": 1, }, }, "range": Array [ - 53, - 54, + 34, + 35, ], "type": "Punctuator", - "value": ",", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 36, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 35, + "line": 1, }, }, "range": Array [ - 69, - 78, + 35, + 36, ], - "type": "Keyword", - "value": "protected", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 3, + "column": 37, + "line": 1, }, "start": Object { - "column": 24, - "line": 3, + "column": 36, + "line": 1, }, }, "range": Array [ - 79, - 87, + 36, + 37, ], - "type": "Identifier", - "value": "readonly", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 41, - "line": 3, + "line": 1, }, "start": Object { - "column": 33, - "line": 3, + "column": 37, + "line": 1, }, }, "range": Array [ - 88, - 96, + 37, + 41, ], "type": "Identifier", - "value": "lastName", + "value": "Base", }, Object { "loc": Object { "end": Object { "column": 42, - "line": 3, + "line": 1, }, "start": Object { "column": 41, - "line": 3, + "line": 1, }, }, "range": Array [ - 96, - 97, + 41, + 42, ], "type": "Punctuator", "value": ":", @@ -16112,269 +15684,371 @@ Object { Object { "loc": Object { "end": Object { - "column": 49, - "line": 3, + "column": 44, + "line": 1, }, "start": Object { "column": 43, - "line": 3, + "line": 1, }, }, "range": Array [ - 98, - 104, + 43, + 44, ], "type": "Identifier", - "value": "string", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 50, - "line": 3, + "column": 45, + "line": 1, }, "start": Object { - "column": 49, - "line": 3, + "column": 44, + "line": 1, }, }, "range": Array [ - 104, - 105, + 44, + 45, ], "type": "Punctuator", - "value": ",", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 4, + "column": 47, + "line": 1, }, "start": Object { - "column": 14, - "line": 4, + "column": 46, + "line": 1, }, }, "range": Array [ - 120, - 129, + 46, + 47, ], - "type": "Keyword", - "value": "protected", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 4, + "column": 1, + "line": 2, }, "start": Object { - "column": 24, - "line": 4, + "column": 0, + "line": 2, }, }, "range": Array [ - 130, - 133, + 48, + 49, ], - "type": "Identifier", - "value": "age", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-optional-computed-property.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 4, + "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, + }, }, - "start": Object { - "column": 27, - "line": 4, + "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", }, - "range": Array [ - 133, - 134, - ], - "type": "Punctuator", - "value": ":", - }, - Object { "loc": Object { "end": Object { - "column": 35, - "line": 4, + "column": 1, + "line": 3, }, "start": Object { - "column": 29, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 135, - 141, + 0, + 45, ], - "type": "Identifier", - "value": "number", + "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": 37, - "line": 4, + "column": 5, + "line": 1, }, "start": Object { - "column": 36, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 142, - 143, + 0, + 5, ], - "type": "Punctuator", - "value": "=", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 4, + "column": 7, + "line": 1, }, "start": Object { - "column": 38, - "line": 4, + "column": 6, + "line": 1, }, }, "range": Array [ - 144, - 146, + 6, + 7, ], - "type": "Numeric", - "value": "30", + "type": "Identifier", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 4, + "column": 9, + "line": 1, }, "start": Object { - "column": 40, - "line": 4, + "column": 8, + "line": 1, }, }, "range": Array [ - 146, - 147, + 8, + 9, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 5, + "column": 11, + "line": 2, }, "start": Object { - "column": 14, - "line": 5, + "column": 4, + "line": 2, }, }, "range": Array [ - 162, - 171, + 14, + 21, ], "type": "Keyword", - "value": "protected", + "value": "private", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 5, + "column": 13, + "line": 2, }, "start": Object { - "column": 24, - "line": 5, + "column": 12, + "line": 2, }, }, "range": Array [ - 172, - 180, + 22, + 23, ], - "type": "Identifier", - "value": "readonly", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 5, + "column": 18, + "line": 2, }, "start": Object { - "column": 33, - "line": 5, + "column": 13, + "line": 2, }, }, "range": Array [ - 181, - 188, + 23, + 28, ], - "type": "Identifier", - "value": "student", + "type": "String", + "value": "'foo'", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 5, + "column": 19, + "line": 2, }, "start": Object { - "column": 40, - "line": 5, + "column": 18, + "line": 2, }, }, "range": Array [ - 188, - 189, + 28, + 29, ], "type": "Punctuator", - "value": ":", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 49, - "line": 5, + "column": 20, + "line": 2, }, "start": Object { - "column": 42, - "line": 5, + "column": 19, + "line": 2, }, }, "range": Array [ - 190, - 197, + 29, + 30, ], - "type": "Identifier", - "value": "boolean", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 51, - "line": 5, + "column": 22, + "line": 2, }, "start": Object { - "column": 50, - "line": 5, + "column": 21, + "line": 2, }, }, "range": Array [ - 198, - 199, + 31, + 32, ], "type": "Punctuator", "value": "=", @@ -16382,99 +16056,63 @@ Object { Object { "loc": Object { "end": Object { - "column": 57, - "line": 5, + "column": 32, + "line": 2, }, "start": Object { - "column": 52, - "line": 5, + "column": 23, + "line": 2, }, }, "range": Array [ - 200, - 205, + 33, + 42, ], - "type": "Boolean", - "value": "false", + "type": "Keyword", + "value": "undefined", }, Object { "loc": Object { "end": Object { - "column": 58, - "line": 5, + "column": 33, + "line": 2, }, "start": Object { - "column": 57, - "line": 5, + "column": 32, + "line": 2, }, }, "range": Array [ - 205, - 206, + 42, + 43, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 60, - "line": 5, + "column": 1, + "line": 3, }, "start": Object { - "column": 59, - "line": 5, + "column": 0, + "line": 3, }, }, "range": Array [ - 207, - 208, + 44, + 45, ], "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 5, - }, - "start": Object { - "column": 60, - "line": 5, - }, - }, - "range": Array [ - 208, - 209, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 210, - 211, - ], - "type": "Punctuator", - "value": "}", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/class-with-public-parameter-properties.src 1`] = ` +exports[`typescript fixtures/basics/class-with-optional-methods.src 1`] = ` Object { "body": Array [ Object { @@ -16485,7 +16123,7 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 13, + "column": 5, "line": 2, }, "start": Object { @@ -16493,18 +16131,19 @@ Object { "line": 2, }, }, - "name": "constructor", + "name": "foo", + "optional": true, "range": Array [ 14, - 25, + 17, ], "type": "Identifier", }, - "kind": "constructor", + "kind": "method", "loc": Object { "end": Object { - "column": 58, - "line": 5, + "column": 9, + "line": 2, }, "start": Object { "column": 2, @@ -16513,403 +16152,224 @@ Object { }, "range": Array [ 14, - 197, + 21, ], "static": false, "type": "MethodDefinition", "value": Object { "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 58, - "line": 5, - }, - "start": Object { - "column": 56, - "line": 5, - }, + "body": null, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 9, + "line": 2, }, - "range": Array [ - 195, - 197, - ], - "type": "BlockStatement", + "start": Object { + "column": 6, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 18, + 21, + ], + "type": "FunctionExpression", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "name": "bar", + "optional": true, + "range": Array [ + 24, + 27, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, }, + }, + "range": Array [ + 24, + 39, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": null, "expression": false, "generator": false, "id": null, "loc": Object { "end": Object { - "column": 58, - "line": 5, + "column": 17, + "line": 3, }, "start": Object { - "column": 13, - "line": 2, + "column": 6, + "line": 3, }, }, - "params": Array [ - Object { - "accessibility": "public", - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, + "params": Array [], + "range": Array [ + 28, + 39, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 21, - "line": 2, - }, - }, - "name": "firstName", - "range": Array [ - 33, - 50, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, - }, - }, - "range": Array [ - 42, - 50, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 44, - 50, - ], - "type": "TSStringKeyword", - }, - }, + "start": Object { + "column": 8, + "line": 3, }, - "range": Array [ - 26, - 50, - ], - "type": "TSParameterProperty", }, - Object { - "accessibility": "public", + "range": Array [ + 30, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 46, + "column": 16, "line": 3, }, "start": Object { - "column": 14, + "column": 10, "line": 3, }, }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 30, - "line": 3, - }, - }, - "name": "lastName", - "range": Array [ - 82, - 98, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 38, - "line": 3, - }, - }, - "range": Array [ - 90, - 98, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 3, - }, - "start": Object { - "column": 40, - "line": 3, - }, - }, - "range": Array [ - 92, - 98, - ], - "type": "TSStringKeyword", - }, - }, - }, "range": Array [ - 66, - 98, + 32, + 38, ], - "readonly": true, - "type": "TSParameterProperty", + "type": "TSStringKeyword", }, - Object { - "accessibility": "public", + }, + "type": "FunctionExpression", + }, + }, + Object { + "accessibility": "private", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 10, + "line": 4, + }, + }, + "name": "baz", + "optional": true, + "range": Array [ + 50, + 53, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 25, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 42, + 65, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": null, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 25, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "params": Array [], + "range": Array [ + 54, + 65, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "range": Array [ + 56, + 64, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 37, + "column": 24, "line": 4, }, "start": Object { - "column": 14, + "column": 18, "line": 4, }, }, - "parameter": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 21, - "line": 4, - }, - }, - "name": "age", - "range": Array [ - 121, - 132, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 24, - "line": 4, - }, - }, - "range": Array [ - 124, - 132, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 126, - 132, - ], - "type": "TSNumberKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "range": Array [ - 114, - 137, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 4, - }, - "start": Object { - "column": 35, - "line": 4, - }, - }, - "range": Array [ - 135, - 137, - ], - "raw": "30", - "type": "Literal", - "value": 30, - }, - "type": "AssignmentPattern", - }, "range": Array [ - 114, - 137, + 58, + 64, ], - "type": "TSParameterProperty", + "type": "TSStringKeyword", }, - Object { - "accessibility": "public", - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "parameter": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 5, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "name": "student", - "range": Array [ - 169, - 185, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 5, - }, - "start": Object { - "column": 37, - "line": 5, - }, - }, - "range": Array [ - 176, - 185, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 5, - }, - "start": Object { - "column": 39, - "line": 5, - }, - }, - "range": Array [ - 178, - 185, - ], - "type": "TSBooleanKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 153, - 193, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 49, - "line": 5, - }, - }, - "range": Array [ - 188, - 193, - ], - "raw": "false", - "type": "Literal", - "value": false, - }, - "type": "AssignmentPattern", - }, - "range": Array [ - 153, - 193, - ], - "readonly": true, - "type": "TSParameterProperty", - }, - ], - "range": Array [ - 25, - 197, - ], + }, "type": "FunctionExpression", }, }, @@ -16917,7 +16377,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 5, }, "start": Object { "column": 10, @@ -16926,7 +16386,7 @@ Object { }, "range": Array [ 10, - 199, + 67, ], "type": "ClassBody", }, @@ -16951,7 +16411,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 5, }, "start": Object { "column": 0, @@ -16960,7 +16420,7 @@ Object { }, "range": Array [ 0, - 199, + 67, ], "superClass": null, "type": "ClassDeclaration", @@ -16968,7 +16428,7 @@ Object { ], "loc": Object { "end": Object { - "column": 1, + "column": 0, "line": 6, }, "start": Object { @@ -16978,7 +16438,7 @@ Object { }, "range": Array [ 0, - 199, + 68, ], "sourceType": "script", "tokens": Array [ @@ -17039,7 +16499,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 5, "line": 2, }, "start": Object { @@ -17049,187 +16509,169 @@ Object { }, "range": Array [ 14, - 25, + 17, ], "type": "Identifier", - "value": "constructor", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 6, "line": 2, }, "start": Object { - "column": 13, + "column": 5, "line": 2, }, }, "range": Array [ - 25, - 26, + 17, + 18, ], "type": "Punctuator", - "value": "(", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 7, "line": 2, }, "start": Object { - "column": 14, + "column": 6, "line": 2, }, }, "range": Array [ - 26, - 32, + 18, + 19, ], - "type": "Keyword", - "value": "public", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 8, "line": 2, }, "start": Object { - "column": 21, + "column": 7, "line": 2, }, }, "range": Array [ - 33, - 42, + 19, + 20, ], - "type": "Identifier", - "value": "firstName", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 9, "line": 2, }, "start": Object { - "column": 30, + "column": 8, "line": 2, }, }, "range": Array [ - 42, - 43, + 20, + 21, ], "type": "Punctuator", - "value": ":", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 2, + "column": 5, + "line": 3, }, "start": Object { - "column": 32, - "line": 2, + "column": 2, + "line": 3, }, }, "range": Array [ - 44, - 50, + 24, + 27, ], "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ",", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 6, "line": 3, }, "start": Object { - "column": 14, + "column": 5, "line": 3, }, }, "range": Array [ - 66, - 72, + 27, + 28, ], - "type": "Keyword", - "value": "public", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 7, "line": 3, }, "start": Object { - "column": 21, + "column": 6, "line": 3, }, }, "range": Array [ - 73, - 81, + 28, + 29, ], - "type": "Identifier", - "value": "readonly", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 8, "line": 3, }, "start": Object { - "column": 30, + "column": 7, "line": 3, }, }, "range": Array [ - 82, - 90, + 29, + 30, ], - "type": "Identifier", - "value": "lastName", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 39, + "column": 9, "line": 3, }, "start": Object { - "column": 38, + "column": 8, "line": 3, }, }, "range": Array [ - 90, - 91, + 30, + 31, ], "type": "Punctuator", "value": ":", @@ -17237,17 +16679,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 46, + "column": 16, "line": 3, }, "start": Object { - "column": 40, + "column": 10, "line": 3, }, }, "range": Array [ - 92, - 98, + 32, + 38, ], "type": "Identifier", "value": "string", @@ -17255,215 +16697,125 @@ Object { Object { "loc": Object { "end": Object { - "column": 47, + "column": 17, "line": 3, }, "start": Object { - "column": 46, + "column": 16, "line": 3, }, }, "range": Array [ - 98, - 99, + 38, + 39, ], "type": "Punctuator", - "value": ",", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 9, "line": 4, }, "start": Object { - "column": 14, + "column": 2, "line": 4, }, }, "range": Array [ - 114, - 120, + 42, + 49, ], "type": "Keyword", - "value": "public", + "value": "private", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 13, "line": 4, }, "start": Object { - "column": 21, + "column": 10, "line": 4, }, }, "range": Array [ - 121, - 124, + 50, + 53, ], "type": "Identifier", - "value": "age", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 14, "line": 4, }, "start": Object { - "column": 24, + "column": 13, "line": 4, }, }, "range": Array [ - 124, - 125, + 53, + 54, ], "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 4, - }, - "start": Object { - "column": 26, - "line": 4, - }, - }, - "range": Array [ - 126, - 132, - ], - "type": "Identifier", - "value": "number", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 15, "line": 4, }, "start": Object { - "column": 33, + "column": 14, "line": 4, }, }, "range": Array [ - 133, - 134, + 54, + 55, ], "type": "Punctuator", - "value": "=", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 16, "line": 4, }, "start": Object { - "column": 35, + "column": 15, "line": 4, }, }, "range": Array [ - 135, - 137, + 55, + 56, ], - "type": "Numeric", - "value": "30", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 17, "line": 4, }, "start": Object { - "column": 37, + "column": 16, "line": 4, }, }, "range": Array [ - 137, - 138, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 5, - }, - "start": Object { - "column": 14, - "line": 5, - }, - }, - "range": Array [ - 153, - 159, - ], - "type": "Keyword", - "value": "public", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 5, - }, - "start": Object { - "column": 21, - "line": 5, - }, - }, - "range": Array [ - 160, - 168, - ], - "type": "Identifier", - "value": "readonly", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 5, - }, - "start": Object { - "column": 30, - "line": 5, - }, - }, - "range": Array [ - 169, - 176, - ], - "type": "Identifier", - "value": "student", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 5, - }, - "start": Object { - "column": 37, - "line": 5, - }, - }, - "range": Array [ - 176, - 177, + 56, + 57, ], "type": "Punctuator", "value": ":", @@ -17471,125 +16823,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 46, - "line": 5, + "column": 24, + "line": 4, }, "start": Object { - "column": 39, - "line": 5, + "column": 18, + "line": 4, }, }, "range": Array [ - 178, - 185, + 58, + 64, ], "type": "Identifier", - "value": "boolean", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 5, - }, - "start": Object { - "column": 47, - "line": 5, - }, - }, - "range": Array [ - 186, - 187, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 5, - }, - "start": Object { - "column": 49, - "line": 5, - }, - }, - "range": Array [ - 188, - 193, - ], - "type": "Boolean", - "value": "false", - }, - Object { - "loc": Object { - "end": Object { - "column": 55, - "line": 5, - }, - "start": Object { - "column": 54, - "line": 5, - }, - }, - "range": Array [ - 193, - 194, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 5, - }, - "start": Object { - "column": 56, - "line": 5, - }, - }, - "range": Array [ - 195, - 196, - ], - "type": "Punctuator", - "value": "{", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 58, - "line": 5, + "column": 25, + "line": 4, }, "start": Object { - "column": 57, - "line": 5, + "column": 24, + "line": 4, }, }, "range": Array [ - 196, - 197, + 64, + 65, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 6, + "line": 5, }, "start": Object { "column": 0, - "line": 6, + "line": 5, }, }, "range": Array [ - 198, - 199, + 66, + 67, ], "type": "Punctuator", "value": "}", @@ -17599,7 +16879,7 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-readonly-parameter-properties.src 1`] = ` +exports[`typescript fixtures/basics/class-with-optional-properties.src 1`] = ` Object { "body": Array [ Object { @@ -17610,7 +16890,7 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 13, + "column": 5, "line": 2, }, "start": Object { @@ -17618,253 +16898,184 @@ Object { "line": 2, }, }, - "name": "constructor", + "name": "foo", "range": Array [ 14, - 25, + 17, ], "type": "Identifier", }, - "kind": "constructor", "loc": Object { "end": Object { - "column": 53, - "line": 3, + "column": 7, + "line": 2, }, "start": Object { "column": 2, "line": 2, }, }, + "optional": true, "range": Array [ 14, - 107, + 19, ], "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 53, - "line": 3, - }, - "start": Object { - "column": 51, - "line": 3, - }, + "type": "ClassProperty", + "value": null, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, }, - "range": Array [ - 105, - 107, - ], - "type": "BlockStatement", }, - "expression": false, - "generator": false, - "id": null, + "name": "bar", + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "optional": true, + "range": Array [ + 22, + 36, + ], + "static": false, + "type": "ClassProperty", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 53, + "column": 15, "line": 3, }, "start": Object { - "column": 13, - "line": 2, + "column": 7, + "line": 3, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 14, - "line": 2, - }, + "range": Array [ + 27, + 35, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "name": "firstName", - "range": Array [ - 35, - 52, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 44, - 52, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 52, - ], - "type": "TSStringKeyword", - }, - }, + "start": Object { + "column": 9, + "line": 3, }, - "range": Array [ - 26, - 52, - ], - "readonly": true, - "type": "TSParameterProperty", }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "parameter": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "name": "lastName", - "range": Array [ - 77, - 93, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 31, - "line": 3, - }, - }, - "range": Array [ - 85, - 93, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "range": Array [ - 87, - 93, - ], - "type": "TSStringKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 68, - 103, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 42, - "line": 3, - }, - }, - "range": Array [ - 96, - 103, - ], - "raw": "'Smith'", - "type": "Literal", - "value": "Smith", - }, - "type": "AssignmentPattern", - }, - "range": Array [ - 68, - 103, - ], - "readonly": true, - "type": "TSParameterProperty", + "range": Array [ + 29, + 35, + ], + "type": "TSStringKeyword", + }, + }, + "value": null, + }, + Object { + "accessibility": "private", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 10, + "line": 4, }, + }, + "name": "baz", + "range": Array [ + 47, + 50, ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "optional": true, + "range": Array [ + 39, + 61, + ], + "static": false, + "type": "ClassProperty", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 4, + }, + }, "range": Array [ - 25, - 107, + 52, + 60, ], - "type": "FunctionExpression", + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 4, + }, + "start": Object { + "column": 17, + "line": 4, + }, + }, + "range": Array [ + 54, + 60, + ], + "type": "TSStringKeyword", + }, }, + "value": null, }, ], "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 5, }, "start": Object { "column": 10, @@ -17873,7 +17084,7 @@ Object { }, "range": Array [ 10, - 109, + 63, ], "type": "ClassBody", }, @@ -17898,7 +17109,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 5, }, "start": Object { "column": 0, @@ -17907,7 +17118,7 @@ Object { }, "range": Array [ 0, - 109, + 63, ], "superClass": null, "type": "ClassDeclaration", @@ -17915,8 +17126,8 @@ Object { ], "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 0, + "line": 6, }, "start": Object { "column": 0, @@ -17925,7 +17136,7 @@ Object { }, "range": Array [ 0, - 109, + 64, ], "sourceType": "script", "tokens": Array [ @@ -17986,7 +17197,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 5, "line": 2, }, "start": Object { @@ -17996,295 +17207,259 @@ Object { }, "range": Array [ 14, - 25, + 17, ], "type": "Identifier", - "value": "constructor", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 6, "line": 2, }, "start": Object { - "column": 13, + "column": 5, "line": 2, }, }, "range": Array [ - 25, - 26, + 17, + 18, ], "type": "Punctuator", - "value": "(", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 7, "line": 2, }, "start": Object { - "column": 14, + "column": 6, "line": 2, }, }, "range": Array [ - 26, - 34, + 18, + 19, ], - "type": "Identifier", - "value": "readonly", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 2, + "column": 5, + "line": 3, }, "start": Object { - "column": 23, - "line": 2, + "column": 2, + "line": 3, }, }, "range": Array [ - 35, - 44, + 22, + 25, ], "type": "Identifier", - "value": "firstName", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 6, + "line": 3, }, "start": Object { - "column": 32, - "line": 2, + "column": 5, + "line": 3, }, }, "range": Array [ - 44, - 45, + 25, + 26, ], "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 52, - ], - "type": "Identifier", - "value": "string", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 8, + "line": 3, }, "start": Object { - "column": 40, - "line": 2, + "column": 7, + "line": 3, }, }, "range": Array [ - 52, - 53, + 27, + 28, ], "type": "Punctuator", - "value": ",", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 15, "line": 3, }, "start": Object { - "column": 14, + "column": 9, "line": 3, }, }, "range": Array [ - 68, - 76, + 29, + 35, ], "type": "Identifier", - "value": "readonly", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 16, "line": 3, }, "start": Object { - "column": 23, + "column": 15, "line": 3, }, }, "range": Array [ - 77, - 85, + 35, + 36, ], - "type": "Identifier", - "value": "lastName", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 3, + "column": 9, + "line": 4, }, "start": Object { - "column": 31, - "line": 3, + "column": 2, + "line": 4, }, }, "range": Array [ - 85, - 86, + 39, + 46, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "private", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 3, + "column": 13, + "line": 4, }, "start": Object { - "column": 33, - "line": 3, + "column": 10, + "line": 4, }, }, "range": Array [ - 87, - 93, + 47, + 50, ], "type": "Identifier", - "value": "string", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 3, + "column": 14, + "line": 4, }, "start": Object { - "column": 40, - "line": 3, + "column": 13, + "line": 4, }, }, "range": Array [ - 94, - 95, + 50, + 51, ], "type": "Punctuator", - "value": "=", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 49, - "line": 3, + "column": 16, + "line": 4, }, "start": Object { - "column": 42, - "line": 3, + "column": 15, + "line": 4, }, }, "range": Array [ - 96, - 103, + 52, + 53, ], - "type": "String", - "value": "'Smith'", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 50, - "line": 3, + "column": 23, + "line": 4, }, "start": Object { - "column": 49, - "line": 3, + "column": 17, + "line": 4, }, }, "range": Array [ - 103, - 104, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 3, - }, - "start": Object { - "column": 51, - "line": 3, - }, - }, - "range": Array [ - 105, - 106, + 54, + 60, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 53, - "line": 3, + "column": 24, + "line": 4, }, "start": Object { - "column": 52, - "line": 3, + "column": 23, + "line": 4, }, }, "range": Array [ - 106, - 107, + 60, + 61, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 5, }, "start": Object { "column": 0, - "line": 4, + "line": 5, }, }, "range": Array [ - 108, - 109, + 62, + 63, ], "type": "Punctuator", "value": "}", @@ -18294,68 +17469,67 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-readonly-property.src 1`] = ` +exports[`typescript fixtures/basics/class-with-optional-property-undefined.src 1`] = ` Object { "body": Array [ Object { "body": Object { "body": Array [ Object { - "accessibility": "public", + "accessibility": "private", "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 23, + "column": 13, "line": 2, }, "start": Object { - "column": 20, + "column": 10, "line": 2, }, }, "name": "foo", "range": Array [ - 32, - 35, + 20, + 23, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 35, + "column": 27, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, + "optional": true, "range": Array [ - 16, - 47, + 12, + 37, ], - "readonly": true, "static": false, "type": "ClassProperty", "value": Object { "loc": Object { "end": Object { - "column": 34, + "column": 26, "line": 2, }, "start": Object { - "column": 26, + "column": 17, "line": 2, }, }, + "name": "undefined", "range": Array [ - 38, - 46, + 27, + 36, ], - "raw": "'string'", - "type": "Literal", - "value": "string", + "type": "Identifier", }, }, ], @@ -18365,20 +17539,20 @@ Object { "line": 3, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, - 49, + 8, + 39, ], "type": "ClassBody", }, "id": Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { @@ -18386,10 +17560,10 @@ Object { "line": 1, }, }, - "name": "Foo", + "name": "X", "range": Array [ 6, - 9, + 7, ], "type": "Identifier", }, @@ -18405,7 +17579,7 @@ Object { }, "range": Array [ 0, - 49, + 39, ], "superClass": null, "type": "ClassDeclaration", @@ -18414,7 +17588,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 5, }, "start": Object { "column": 0, @@ -18423,7 +17597,7 @@ Object { }, "range": Array [ 0, - 50, + 41, ], "sourceType": "script", "tokens": Array [ @@ -18448,7 +17622,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { @@ -18458,25 +17632,25 @@ Object { }, "range": Array [ 6, - 9, + 7, ], "type": "Identifier", - "value": "Foo", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 9, "line": 1, }, "start": Object { - "column": 10, + "column": 8, "line": 1, }, }, "range": Array [ - 10, - 11, + 8, + 9, ], "type": "Punctuator", "value": "{", @@ -18484,71 +17658,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, + "column": 9, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "range": Array [ - 16, - 22, + 12, + 19, ], "type": "Keyword", - "value": "public", + "value": "private", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 13, "line": 2, }, "start": Object { - "column": 11, + "column": 10, "line": 2, }, }, "range": Array [ + 20, 23, - 31, ], "type": "Identifier", - "value": "readonly", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 14, "line": 2, }, "start": Object { - "column": 20, + "column": 13, "line": 2, }, }, "range": Array [ - 32, - 35, + 23, + 24, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 16, "line": 2, }, "start": Object { - "column": 24, + "column": 15, "line": 2, }, }, "range": Array [ - 36, - 37, + 25, + 26, ], "type": "Punctuator", "value": "=", @@ -18556,35 +17730,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 34, + "column": 26, "line": 2, }, "start": Object { - "column": 26, + "column": 17, "line": 2, }, }, "range": Array [ - 38, - 46, + 27, + 36, ], - "type": "String", - "value": "'string'", + "type": "Keyword", + "value": "undefined", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 27, "line": 2, }, "start": Object { - "column": 34, + "column": 26, "line": 2, }, }, "range": Array [ - 46, - 47, + 36, + 37, ], "type": "Punctuator", "value": ";", @@ -18601,8 +17775,8 @@ Object { }, }, "range": Array [ - 48, - 49, + 38, + 39, ], "type": "Punctuator", "value": "}", @@ -18612,7 +17786,7 @@ Object { } `; -exports[`typescript fixtures/basics/class-with-static-parameter-properties.src 1`] = ` +exports[`typescript fixtures/basics/class-with-private-parameter-properties.src 1`] = ` Object { "body": Array [ Object { @@ -18623,35 +17797,35 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 15, + "column": 13, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "name": "constructor", "range": Array [ - 16, - 27, + 14, + 25, ], "type": "Identifier", }, "kind": "constructor", "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 59, + "line": 5, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "range": Array [ - 16, - 54, + 14, + 201, ], "static": false, "type": "MethodDefinition", @@ -18661,17 +17835,17 @@ Object { "body": Array [], "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 59, + "line": 5, }, "start": Object { - "column": 34, - "line": 2, + "column": 57, + "line": 5, }, }, "range": Array [ - 46, - 54, + 199, + 201, ], "type": "BlockStatement", }, @@ -18680,420 +17854,391 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 59, + "line": 5, }, "start": Object { - "column": 15, + "column": 13, "line": 2, }, }, "params": Array [ Object { + "accessibility": "private", "loc": Object { "end": Object { - "column": 32, + "column": 39, "line": 2, }, "start": Object { - "column": 16, + "column": 14, "line": 2, }, }, "parameter": Object { "loc": Object { "end": Object { - "column": 32, + "column": 39, "line": 2, }, "start": Object { - "column": 23, + "column": 22, "line": 2, }, }, - "name": "a", + "name": "firstName", "range": Array [ - 35, - 44, + 34, + 51, ], "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 32, + "column": 39, "line": 2, }, "start": Object { - "column": 24, + "column": 31, "line": 2, }, }, "range": Array [ - 36, - 44, + 43, + 51, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 32, + "column": 39, "line": 2, }, "start": Object { - "column": 26, + "column": 33, "line": 2, }, }, "range": Array [ - 38, - 44, + 45, + 51, ], "type": "TSStringKeyword", }, }, }, "range": Array [ - 28, - 44, + 26, + 51, ], - "static": true, "type": "TSParameterProperty", }, - ], - "range": Array [ - 27, - 54, - ], - "type": "FunctionExpression", - }, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 56, - ], - "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": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 56, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 8, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 59, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 9, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 16, - 27, - ], - "type": "Identifier", - "value": "constructor", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 28, - 34, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 2, - }, - "start": Object { - "column": 23, - "line": 2, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 36, - 37, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, - }, - "range": Array [ - 38, - 44, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 44, - 45, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 46, - 47, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 53, - 54, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-type-parameter.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], + Object { + "accessibility": "private", + "loc": Object { + "end": Object { + "column": 47, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 3, + }, + "start": Object { + "column": 31, + "line": 3, + }, + }, + "name": "lastName", + "range": Array [ + 84, + 100, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 3, + }, + "start": Object { + "column": 39, + "line": 3, + }, + }, + "range": Array [ + 92, + 100, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 3, + }, + "start": Object { + "column": 41, + "line": 3, + }, + }, + "range": Array [ + 94, + 100, + ], + "type": "TSStringKeyword", + }, + }, + }, + "range": Array [ + 67, + 100, + ], + "readonly": true, + "type": "TSParameterProperty", + }, + Object { + "accessibility": "private", + "loc": Object { + "end": Object { + "column": 38, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "parameter": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 4, + }, + "start": Object { + "column": 22, + "line": 4, + }, + }, + "name": "age", + "range": Array [ + 124, + 135, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 4, + }, + "start": Object { + "column": 25, + "line": 4, + }, + }, + "range": Array [ + 127, + 135, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 4, + }, + "start": Object { + "column": 27, + "line": 4, + }, + }, + "range": Array [ + 129, + 135, + ], + "type": "TSNumberKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 38, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "range": Array [ + 116, + 140, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 4, + }, + "start": Object { + "column": 36, + "line": 4, + }, + }, + "range": Array [ + 138, + 140, + ], + "raw": "30", + "type": "Literal", + "value": 30, + }, + "type": "AssignmentPattern", + }, + "range": Array [ + 116, + 140, + ], + "type": "TSParameterProperty", + }, + Object { + "accessibility": "private", + "loc": Object { + "end": Object { + "column": 55, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "parameter": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 5, + }, + "start": Object { + "column": 31, + "line": 5, + }, + }, + "name": "student", + "range": Array [ + 173, + 189, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 5, + }, + "start": Object { + "column": 38, + "line": 5, + }, + }, + "range": Array [ + 180, + 189, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 5, + }, + "start": Object { + "column": 40, + "line": 5, + }, + }, + "range": Array [ + 182, + 189, + ], + "type": "TSBooleanKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 55, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "range": Array [ + 156, + 197, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 5, + }, + "start": Object { + "column": 50, + "line": 5, + }, + }, + "range": Array [ + 192, + 197, + ], + "raw": "false", + "type": "Literal", + "value": false, + }, + "type": "AssignmentPattern", + }, + "range": Array [ + 156, + 197, + ], + "readonly": true, + "type": "TSParameterProperty", + }, + ], + "range": Array [ + 25, + 201, + ], + "type": "FunctionExpression", + }, + }, + ], "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 6, }, "start": Object { - "column": 13, + "column": 10, "line": 1, }, }, "range": Array [ - 13, - 17, + 10, + 203, ], "type": "ClassBody", }, @@ -19118,7 +18263,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 6, }, "start": Object { "column": 0, @@ -19127,53 +18272,16 @@ Object { }, "range": Array [ 0, - 17, + 203, ], "superClass": null, "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 10, - 11, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 9, - 12, - ], - "type": "TSTypeParameterDeclaration", - }, }, ], "loc": Object { "end": Object { - "column": 0, - "line": 4, + "column": 1, + "line": 6, }, "start": Object { "column": 0, @@ -19182,7 +18290,7 @@ Object { }, "range": Array [ 0, - 18, + 203, ], "sourceType": "script", "tokens": Array [ @@ -19225,976 +18333,575 @@ Object { 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": 11, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 10, - 11, + 14, + 25, ], "type": "Identifier", - "value": "T", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 11, - 12, + 25, + 26, ], "type": "Punctuator", - "value": ">", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 21, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 13, - 14, + 26, + 33, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "private", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 31, + "line": 2, }, "start": Object { - "column": 0, - "line": 3, + "column": 22, + "line": 2, }, }, "range": Array [ - 16, - 17, + 34, + 43, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "firstName", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-type-parameter-default.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 19, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, }, - "range": Array [ - 19, - 23, - ], - "type": "ClassBody", }, - "id": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, }, - "name": "Foo", - "range": Array [ - 6, - 9, - ], - "type": "Identifier", }, + "range": Array [ + 45, + 51, + ], + "type": "Identifier", + "value": "string", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 40, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 39, + "line": 2, }, }, "range": Array [ - 0, - 23, + 51, + 52, ], - "superClass": null, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, }, - "params": Array [ - Object { - "default": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 17, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, - }, - }, - "name": "Bar", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - }, - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "T", - "range": Array [ - 10, - 17, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 9, - 18, - ], - "type": "TSTypeParameterDeclaration", }, + "range": Array [ + 67, + 74, + ], + "type": "Keyword", + "value": "private", }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 30, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 22, + "line": 3, }, }, "range": Array [ - 0, - 5, + 75, + 83, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "readonly", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 39, + "line": 3, }, "start": Object { - "column": 6, - "line": 1, + "column": 31, + "line": 3, }, }, "range": Array [ - 6, - 9, + 84, + 92, ], "type": "Identifier", - "value": "Foo", + "value": "lastName", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 40, + "line": 3, }, "start": Object { - "column": 9, - "line": 1, + "column": 39, + "line": 3, }, }, "range": Array [ - 9, - 10, + 92, + 93, ], "type": "Punctuator", - "value": "<", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 47, + "line": 3, }, "start": Object { - "column": 10, - "line": 1, + "column": 41, + "line": 3, }, }, "range": Array [ - 10, - 11, + 94, + 100, ], "type": "Identifier", - "value": "T", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 48, + "line": 3, }, "start": Object { - "column": 12, - "line": 1, + "column": 47, + "line": 3, }, }, "range": Array [ - 12, - 13, + 100, + 101, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 21, + "line": 4, }, "start": Object { "column": 14, - "line": 1, + "line": 4, }, }, "range": Array [ - 14, - 17, + 116, + 123, ], - "type": "Identifier", - "value": "Bar", + "type": "Keyword", + "value": "private", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 25, + "line": 4, }, "start": Object { - "column": 17, - "line": 1, + "column": 22, + "line": 4, }, }, "range": Array [ - 17, - 18, + 124, + 127, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "age", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 26, + "line": 4, }, "start": Object { - "column": 19, - "line": 1, + "column": 25, + "line": 4, }, }, "range": Array [ - 19, - 20, + 127, + 128, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 33, + "line": 4, }, "start": Object { - "column": 0, - "line": 3, + "column": 27, + "line": 4, }, }, "range": Array [ - 22, - 23, + 129, + 135, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "number", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/class-with-type-parameter-underscore.src 1`] = ` -Object { - "body": Array [ Object { - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 15, - ], - "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": 15, - "line": 1, + "column": 35, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 34, + "line": 4, }, }, "range": Array [ - 0, - 15, + 136, + 137, ], - "superClass": null, - "type": "ClassDeclaration", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "name": "__P", - "range": Array [ - 8, - 11, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 7, - 12, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - ], - "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": 5, - "line": 1, + "column": 38, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 36, + "line": 4, }, }, "range": Array [ - 0, - 5, + 138, + 140, ], - "type": "Keyword", - "value": "class", + "type": "Numeric", + "value": "30", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 39, + "line": 4, }, "start": Object { - "column": 6, - "line": 1, + "column": 38, + "line": 4, }, }, "range": Array [ - 6, - 7, + 140, + 141, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 21, + "line": 5, }, "start": Object { - "column": 7, - "line": 1, + "column": 14, + "line": 5, }, }, "range": Array [ - 7, - 8, + 156, + 163, ], - "type": "Punctuator", - "value": "<", + "type": "Keyword", + "value": "private", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 30, + "line": 5, }, "start": Object { - "column": 8, - "line": 1, + "column": 22, + "line": 5, }, }, "range": Array [ - 8, - 11, + 164, + 172, ], "type": "Identifier", - "value": "__P", + "value": "readonly", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 38, + "line": 5, }, "start": Object { - "column": 11, - "line": 1, + "column": 31, + "line": 5, }, }, "range": Array [ - 11, - 12, + 173, + 180, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "student", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 39, + "line": 5, }, "start": Object { - "column": 13, - "line": 1, + "column": 38, + "line": 5, }, }, "range": Array [ - 13, - 14, + 180, + 181, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 47, + "line": 5, }, "start": Object { - "column": 14, - "line": 1, + "column": 40, + "line": 5, }, }, "range": Array [ - 14, - 15, + 182, + 189, ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/const-enum.src 1`] = ` -Object { - "body": Array [ - Object { - "const": true, - "id": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "Foo", - "range": Array [ - 11, - 14, - ], - "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": "foo", - "range": Array [ - 21, - 24, - ], - "type": "Identifier", - }, - "initializer": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "raw": "1", - "type": "Literal", - "value": 1, - }, - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 21, - 28, - ], - "type": "TSEnumMember", - }, - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "name": "bar", - "range": Array [ - 34, - 37, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 34, - 37, - ], - "type": "TSEnumMember", - }, - ], - "range": Array [ - 0, - 39, - ], - "type": "TSEnumDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 39, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Keyword", - "value": "const", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 10, - ], - "type": "Keyword", - "value": "enum", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "range": Array [ - 11, - 14, - ], - "type": "Identifier", - "value": "Foo", + "type": "Identifier", + "value": "boolean", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 49, + "line": 5, }, "start": Object { - "column": 15, - "line": 1, + "column": 48, + "line": 5, }, }, "range": Array [ - 15, - 16, + 190, + 191, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 55, + "line": 5, }, "start": Object { - "column": 4, - "line": 2, + "column": 50, + "line": 5, }, }, "range": Array [ - 21, - 24, + 192, + 197, ], - "type": "Identifier", - "value": "foo", + "type": "Boolean", + "value": "false", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 56, + "line": 5, }, "start": Object { - "column": 8, - "line": 2, + "column": 55, + "line": 5, }, }, "range": Array [ - 25, - 26, + 197, + 198, ], "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Numeric", - "value": "1", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 58, + "line": 5, }, "start": Object { - "column": 11, - "line": 2, + "column": 57, + "line": 5, }, }, "range": Array [ - 28, - 29, + 199, + 200, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 59, + "line": 5, }, "start": Object { - "column": 4, - "line": 3, + "column": 58, + "line": 5, }, }, "range": Array [ - 34, - 37, + 200, + 201, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 6, }, "start": Object { "column": 0, - "line": 4, + "line": 6, }, }, "range": Array [ - 38, - 39, + 202, + 203, ], "type": "Punctuator", "value": "}", @@ -20204,7 +18911,7 @@ Object { } `; -exports[`typescript fixtures/basics/declare-class-with-optional-method.src 1`] = ` +exports[`typescript fixtures/basics/class-with-property-values.src 1`] = ` Object { "body": Array [ Object { @@ -20215,136 +18922,410 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 7, + "column": 3, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, - "name": "bar", - "optional": true, + "name": "a", "range": Array [ - 24, - 27, + 14, + 15, ], "type": "Identifier", }, - "kind": "method", "loc": Object { "end": Object { - "column": 16, + "column": 8, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "range": Array [ - 24, - 36, + 14, + 20, ], "static": false, - "type": "MethodDefinition", + "type": "ClassProperty", "value": Object { - "async": false, - "body": null, - "expression": false, - "generator": false, - "id": null, "loc": Object { "end": Object { - "column": 16, + "column": 7, "line": 2, }, "start": Object { - "column": 8, + "column": 6, "line": 2, }, }, - "params": Array [], "range": Array [ - 28, - 36, + 18, + 19, ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, + "raw": "2", + "type": "Literal", + "value": 2, + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, }, - "range": Array [ - 30, - 35, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 12, - "line": 2, - }, - }, - "range": Array [ - 32, - 35, - ], - "type": "TSAnyKeyword", + "start": Object { + "column": 2, + "line": 3, }, }, - "type": "FunctionExpression", + "name": "b", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 23, + 30, + ], + "static": false, + "type": "ClassProperty", + "value": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "properties": Array [], + "range": Array [ + 27, + 29, + ], + "type": "ObjectExpression", }, }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 38, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 14, - "line": 1, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "name": "c", + "range": Array [ + 33, + 34, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 33, + 40, + ], + "static": false, + "type": "ClassProperty", + "value": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "range": Array [ + 37, + 39, + ], + "type": "ArrayExpression", + }, }, - }, - "name": "Foo", - "range": Array [ - 14, - 17, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "name": "d", + "range": Array [ + 43, + 44, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 5, + }, + }, + "range": Array [ + 43, + 50, + ], + "static": false, + "type": "ClassProperty", + "value": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 5, + }, + "start": Object { + "column": 6, + "line": 5, + }, + }, + "range": Array [ + 47, + 49, + ], + "raw": "\\"\\"", + "type": "Literal", + "value": "", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 6, + }, + }, + "name": "e", + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 6, + }, + "start": Object { + "column": 2, + "line": 6, + }, + }, + "range": Array [ + 53, + 80, + ], + "static": false, + "type": "ClassProperty", + "value": Object { + "arguments": Array [ + Object { + "elements": Array [ + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 6, + }, + "start": Object { + "column": 17, + "line": 6, + }, + }, + "properties": Array [], + "range": Array [ + 68, + 70, + ], + "type": "ObjectExpression", + }, + Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 6, + }, + "start": Object { + "column": 21, + "line": 6, + }, + }, + "range": Array [ + 72, + 74, + ], + "type": "ArrayExpression", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 6, + }, + "start": Object { + "column": 25, + "line": 6, + }, + }, + "range": Array [ + 76, + 77, + ], + "raw": "2", + "type": "Literal", + "value": 2, + }, + ], + "loc": Object { + "end": Object { + "column": 27, + "line": 6, + }, + "start": Object { + "column": 16, + "line": 6, + }, + }, + "range": Array [ + 67, + 78, + ], + "type": "ArrayExpression", + }, + ], + "callee": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 10, + "line": 6, + }, + }, + "name": "Array", + "range": Array [ + 61, + 66, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 6, + }, + "start": Object { + "column": 6, + "line": 6, + }, + }, + "range": Array [ + 57, + 79, + ], + "type": "NewExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 7, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 82, + ], + "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": 7, }, "start": Object { "column": 0, @@ -20353,7 +19334,7 @@ Object { }, "range": Array [ 0, - 38, + 82, ], "superClass": null, "type": "ClassDeclaration", @@ -20361,8 +19342,8 @@ Object { ], "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 0, + "line": 8, }, "start": Object { "column": 0, @@ -20371,14 +19352,14 @@ Object { }, "range": Array [ 0, - 38, + 83, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 1, }, "start": Object { @@ -20388,64 +19369,82 @@ Object { }, "range": Array [ 0, - 7, + 5, ], - "type": "Identifier", - "value": "declare", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 9, "line": 1, }, "start": Object { - "column": 8, + "column": 6, "line": 1, }, }, "range": Array [ - 8, - 13, + 6, + 9, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 11, "line": 1, }, "start": Object { - "column": 14, + "column": 10, "line": 1, }, }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, "range": Array [ 14, - 17, + 15, ], "type": "Identifier", - "value": "Foo", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 5, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 18, - 19, + 16, + 17, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { @@ -20454,16 +19453,16 @@ Object { "line": 2, }, "start": Object { - "column": 4, + "column": 6, "line": 2, }, }, "range": Array [ - 24, - 27, + 18, + 19, ], - "type": "Identifier", - "value": "bar", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { @@ -20477,93 +19476,129 @@ Object { }, }, "range": Array [ - 27, - 28, + 19, + 20, ], "type": "Punctuator", - "value": "?", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 3, + "line": 3, }, "start": Object { - "column": 8, - "line": 2, + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, }, }, "range": Array [ + 27, 28, - 29, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 8, + "line": 3, }, "start": Object { - "column": 9, - "line": 2, + "column": 7, + "line": 3, }, }, "range": Array [ + 28, 29, - 30, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 9, + "line": 3, }, "start": Object { - "column": 10, - "line": 2, + "column": 8, + "line": 3, }, }, "range": Array [ + 29, 30, - 31, ], "type": "Punctuator", - "value": ":", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 3, + "line": 4, }, "start": Object { - "column": 12, - "line": 2, + "column": 2, + "line": 4, }, }, "range": Array [ - 32, - 35, + 33, + 34, ], "type": "Identifier", - "value": "any", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 5, + "line": 4, }, "start": Object { - "column": 15, - "line": 2, + "column": 4, + "line": 4, }, }, "range": Array [ @@ -20571,17 +19606,17 @@ Object { 36, ], "type": "Punctuator", - "value": ";", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 7, + "line": 4, }, "start": Object { - "column": 0, - "line": 3, + "column": 6, + "line": 4, }, }, "range": Array [ @@ -20589,651 +19624,364 @@ Object { 38, ], "type": "Punctuator", - "value": "}", + "value": "[", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/declare-function.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "body": null, - "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": 42, - "line": 1, + "column": 8, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 7, + "line": 4, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 21, - 32, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 32, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, - }, - }, - "range": Array [ - 26, - 32, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], "range": Array [ - 0, - 42, + 38, + 39, ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 4, }, - "range": Array [ - 33, - 41, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 1, - }, - "start": Object { - "column": 35, - "line": 1, - }, - }, - "range": Array [ - 35, - 41, - ], - "type": "TSStringKeyword", + "start": Object { + "column": 8, + "line": 4, }, }, - "type": "DeclareFunction", - }, - ], - "loc": Object { - "end": Object { - "column": 42, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": ";", }, - }, - "range": Array [ - 0, - 42, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 3, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 2, + "line": 5, }, }, "range": Array [ - 0, - 7, + 43, + 44, ], "type": "Identifier", - "value": "declare", + "value": "d", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 8, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 8, - 16, + 45, + 46, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 8, + "line": 5, }, "start": Object { - "column": 17, - "line": 1, + "column": 6, + "line": 5, }, }, "range": Array [ - 17, - 20, + 47, + 49, ], - "type": "Identifier", - "value": "foo", + "type": "String", + "value": "\\"\\"", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 9, + "line": 5, }, "start": Object { - "column": 20, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 20, - 21, + 49, + 50, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 3, + "line": 6, }, "start": Object { - "column": 21, - "line": 1, + "column": 2, + "line": 6, }, }, "range": Array [ - 21, - 24, + 53, + 54, ], "type": "Identifier", - "value": "bar", + "value": "e", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 5, + "line": 6, }, "start": Object { - "column": 24, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 24, - 25, + 55, + 56, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 9, + "line": 6, }, "start": Object { - "column": 26, - "line": 1, + "column": 6, + "line": 6, }, }, "range": Array [ - 26, - 32, + 57, + 60, ], - "type": "Identifier", - "value": "string", + "type": "Keyword", + "value": "new", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 1, + "column": 15, + "line": 6, }, "start": Object { - "column": 32, - "line": 1, + "column": 10, + "line": 6, }, }, "range": Array [ - 32, - 33, + 61, + 66, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "Array", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 16, + "line": 6, }, "start": Object { - "column": 33, - "line": 1, + "column": 15, + "line": 6, }, }, "range": Array [ - 33, - 34, + 66, + 67, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 1, + "column": 17, + "line": 6, }, "start": Object { - "column": 35, - "line": 1, + "column": 16, + "line": 6, }, }, "range": Array [ - 35, - 41, + 67, + 68, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 18, + "line": 6, }, "start": Object { - "column": 41, - "line": 1, + "column": 17, + "line": 6, }, }, "range": Array [ - 41, - 42, + 68, + 69, ], "type": "Punctuator", - "value": ";", + "value": "{", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/destructuring-assignment.src 1`] = ` -Object { - "body": Array [ Object { - "expression": Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 13, - "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": 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 { - "elements": Array [], - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 11, - ], - "type": "ArrayPattern", - }, - "type": "AssignmentPattern", - }, - }, - ], - "range": Array [ - 1, - 13, - ], - "type": "ObjectPattern", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 1, - 19, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - }, - "type": "AssignmentExpression", - }, "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 19, + "line": 6, }, "start": Object { - "column": 0, - "line": 1, + "column": 18, + "line": 6, }, }, "range": Array [ - 0, - 21, + 69, + 70, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "}", }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, - "line": 1, + "column": 20, + "line": 6, }, "start": Object { - "column": 0, - "line": 1, + "column": 19, + "line": 6, }, }, "range": Array [ - 0, - 1, + 70, + 71, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 1, + "column": 22, + "line": 6, }, "start": Object { - "column": 1, - "line": 1, + "column": 21, + "line": 6, }, }, "range": Array [ - 1, - 2, + 72, + 73, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 23, + "line": 6, }, "start": Object { - "column": 3, - "line": 1, + "column": 22, + "line": 6, }, }, "range": Array [ - 3, - 6, + 73, + 74, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 24, + "line": 6, }, "start": Object { - "column": 7, - "line": 1, + "column": 23, + "line": 6, }, }, "range": Array [ - 7, - 8, + 74, + 75, ], "type": "Punctuator", - "value": "=", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 26, + "line": 6, }, "start": Object { - "column": 9, - "line": 1, + "column": 25, + "line": 6, }, }, "range": Array [ - 9, - 10, + 76, + 77, ], - "type": "Punctuator", - "value": "[", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 27, + "line": 6, }, "start": Object { - "column": 10, - "line": 1, + "column": 26, + "line": 6, }, }, "range": Array [ - 10, - 11, + 77, + 78, ], "type": "Punctuator", "value": "]", @@ -21241,590 +19989,540 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 28, + "line": 6, }, "start": Object { - "column": 12, - "line": 1, + "column": 27, + "line": 6, }, }, "range": Array [ - 12, - 13, + 78, + 79, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 29, + "line": 6, }, "start": Object { - "column": 14, - "line": 1, - }, - }, - "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - "value": "bar", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, + "column": 28, + "line": 6, }, }, "range": Array [ - 20, - 21, + 79, + 80, ], "type": "Punctuator", "value": ";", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/export-assignment.src 1`] = ` -Object { - "body": Array [ - Object { - "expression": 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": 13, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "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, + "column": 1, + "line": 7, }, "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, + "line": 7, }, }, "range": Array [ - 12, - 13, + 81, + 82, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/export-default-class-with-generic.src 1`] = ` +exports[`typescript fixtures/basics/class-with-protected-parameter-properties.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, - }, - }, - "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 { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 2, + "line": 2, }, }, - "name": "T", + "name": "constructor", "range": Array [ - 21, - 22, + 14, + 25, ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 20, - 23, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 28, - ], - "type": "ExportDefaultDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 29, - ], - "sourceType": "module", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 14, - ], - "type": "Keyword", - "value": "default", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 20, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Identifier", - "value": "T", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, - }, - "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 27, - 28, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -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, + "type": "Identifier", }, - "start": Object { - "column": 20, - "line": 1, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 61, + "line": 5, + }, + "start": Object { + "column": 2, + "line": 2, + }, }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, + "range": Array [ + 14, + 209, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 61, + "line": 5, + }, + "start": Object { + "column": 59, + "line": 5, + }, }, + "range": Array [ + 207, + 209, + ], + "type": "BlockStatement", }, - "name": "T", - "range": Array [ - 21, - 22, - ], - "type": "TSTypeParameter", - }, - Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 61, + "line": 5, }, "start": Object { - "column": 24, - "line": 1, + "column": 13, + "line": 2, }, }, - "name": "U", + "params": Array [ + Object { + "accessibility": "protected", + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "name": "firstName", + "range": Array [ + 36, + 53, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 45, + 53, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 35, + "line": 2, + }, + }, + "range": Array [ + 47, + 53, + ], + "type": "TSStringKeyword", + }, + }, + }, + "range": Array [ + 26, + 53, + ], + "type": "TSParameterProperty", + }, + Object { + "accessibility": "protected", + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 3, + }, + }, + "name": "lastName", + "range": Array [ + 88, + 104, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 41, + "line": 3, + }, + }, + "range": Array [ + 96, + 104, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 43, + "line": 3, + }, + }, + "range": Array [ + 98, + 104, + ], + "type": "TSStringKeyword", + }, + }, + }, + "range": Array [ + 69, + 104, + ], + "readonly": true, + "type": "TSParameterProperty", + }, + Object { + "accessibility": "protected", + "loc": Object { + "end": Object { + "column": 40, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "parameter": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 4, + }, + "start": Object { + "column": 24, + "line": 4, + }, + }, + "name": "age", + "range": Array [ + 130, + 141, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 4, + }, + "start": Object { + "column": 27, + "line": 4, + }, + }, + "range": Array [ + 133, + 141, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 4, + }, + "start": Object { + "column": 29, + "line": 4, + }, + }, + "range": Array [ + 135, + 141, + ], + "type": "TSNumberKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 40, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "range": Array [ + 120, + 146, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 4, + }, + "start": Object { + "column": 38, + "line": 4, + }, + }, + "range": Array [ + 144, + 146, + ], + "raw": "30", + "type": "Literal", + "value": 30, + }, + "type": "AssignmentPattern", + }, + "range": Array [ + 120, + 146, + ], + "type": "TSParameterProperty", + }, + Object { + "accessibility": "protected", + "loc": Object { + "end": Object { + "column": 57, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "parameter": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 5, + }, + "start": Object { + "column": 33, + "line": 5, + }, + }, + "name": "student", + "range": Array [ + 181, + 197, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 5, + }, + "start": Object { + "column": 40, + "line": 5, + }, + }, + "range": Array [ + 188, + 197, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 5, + }, + "start": Object { + "column": 42, + "line": 5, + }, + }, + "range": Array [ + 190, + 197, + ], + "type": "TSBooleanKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 57, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "range": Array [ + 162, + 205, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 5, + }, + "start": Object { + "column": 52, + "line": 5, + }, + }, + "range": Array [ + 200, + 205, + ], + "raw": "false", + "type": "Literal", + "value": false, + }, + "type": "AssignmentPattern", + }, + "range": Array [ + 162, + 205, + ], + "readonly": true, + "type": "TSParameterProperty", + }, + ], "range": Array [ - 24, 25, + 209, ], - "type": "TSTypeParameter", + "type": "FunctionExpression", }, - ], - "range": Array [ - 20, - 26, - ], - "type": "TSTypeParameterDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 211, + ], + "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, + "line": 6, }, "start": Object { "column": 0, @@ -21833,15 +20531,16 @@ Object { }, "range": Array [ 0, - 31, + 211, ], - "type": "ExportDefaultDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 4, + "column": 1, + "line": 6, }, "start": Object { "column": 0, @@ -21850,14 +20549,14 @@ Object { }, "range": Array [ 0, - 32, + 211, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 5, "line": 1, }, "start": Object { @@ -21867,709 +20566,403 @@ 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": "default", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 11, "line": 1, }, "start": Object { - "column": 15, + "column": 10, "line": 1, }, }, "range": Array [ - 15, - 20, + 10, + 11, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 20, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 20, - 21, + 14, + 25, ], - "type": "Punctuator", - "value": "<", - }, + "type": "Identifier", + "value": "constructor", + }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 21, - 22, + 25, + 26, ], - "type": "Identifier", - "value": "T", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { "column": 23, - "line": 1, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 22, - 23, + 26, + 35, ], - "type": "Punctuator", - "value": ",", + "type": "Keyword", + "value": "protected", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 33, + "line": 2, }, "start": Object { "column": 24, - "line": 1, + "line": 2, }, }, "range": Array [ - 24, - 25, + 36, + 45, ], "type": "Identifier", - "value": "U", + "value": "firstName", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 34, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 33, + "line": 2, }, }, "range": Array [ - 25, - 26, + 45, + 46, ], "type": "Punctuator", - "value": ">", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 41, + "line": 2, }, "start": Object { - "column": 27, - "line": 1, + "column": 35, + "line": 2, }, }, "range": Array [ - 27, - 28, + 47, + 53, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 42, + "line": 2, }, "start": Object { - "column": 0, - "line": 3, + "column": 41, + "line": 2, }, }, "range": Array [ - 30, - 31, + 53, + 54, ], "type": "Punctuator", - "value": "}", + "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", - }, - "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": 23, + "line": 3, }, - "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": 14, + "line": 3, }, }, + "range": Array [ + 69, + 78, + ], + "type": "Keyword", + "value": "protected", + }, + Object { "loc": Object { "end": Object { - "column": 1, + "column": 32, "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 24, + "line": 3, }, }, "range": Array [ - 0, - 24, + 79, + 87, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "readonly", }, - }, - "range": Array [ - 0, - 25, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 41, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 33, + "line": 3, }, }, "range": Array [ - 0, - 6, + 88, + 96, ], - "type": "Keyword", - "value": "export", + "type": "Identifier", + "value": "lastName", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 42, + "line": 3, }, "start": Object { - "column": 7, - "line": 1, + "column": 41, + "line": 3, }, }, "range": Array [ - 7, - 12, + 96, + 97, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 49, + "line": 3, }, "start": Object { - "column": 13, - "line": 1, + "column": 43, + "line": 3, }, }, "range": Array [ - 13, - 16, + 98, + 104, ], "type": "Identifier", - "value": "Foo", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 50, + "line": 3, }, "start": Object { - "column": 16, - "line": 1, + "column": 49, + "line": 3, }, }, "range": Array [ - 16, - 17, + 104, + 105, ], "type": "Punctuator", - "value": "<", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 23, + "line": 4, }, "start": Object { - "column": 17, - "line": 1, + "column": 14, + "line": 4, }, }, "range": Array [ - 17, - 18, + 120, + 129, ], - "type": "Identifier", - "value": "T", + "type": "Keyword", + "value": "protected", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 27, + "line": 4, }, "start": Object { - "column": 18, - "line": 1, + "column": 24, + "line": 4, }, }, "range": Array [ - 18, - 19, + 130, + 133, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "age", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 28, + "line": 4, }, "start": Object { - "column": 20, - "line": 1, + "column": 27, + "line": 4, }, }, "range": Array [ - 20, - 21, + 133, + 134, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 35, + "line": 4, }, "start": Object { - "column": 0, - "line": 3, + "column": 29, + "line": 4, }, }, "range": Array [ - 23, - 24, + 135, + 141, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "number", }, - ], - "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": 1, - "line": 3, + "column": 37, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, + "column": 36, + "line": 4, }, }, "range": Array [ - 0, - 27, + 142, + 143, ], - "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, - "line": 1, + "column": 40, + "line": 4, }, "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 6, - ], - "type": "Keyword", - "value": "export", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 12, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 13, - "line": 1, - }, - }, - "range": Array [ - 13, - 16, - ], - "type": "Identifier", - "value": "Foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": "<", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, + "column": 38, + "line": 4, }, }, "range": Array [ - 17, - 18, + 144, + 146, ], - "type": "Identifier", - "value": "T", + "type": "Numeric", + "value": "30", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 41, + "line": 4, }, "start": Object { - "column": 18, - "line": 1, + "column": 40, + "line": 4, }, }, "range": Array [ - 18, - 19, + 146, + 147, ], "type": "Punctuator", "value": ",", @@ -22577,421 +20970,197 @@ Object { Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Identifier", - "value": "U", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 21, - "line": 1, - }, - }, - "range": Array [ - 21, - 22, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { "column": 23, - "line": 1, - }, - }, - "range": Array [ - 23, - 24, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, + "line": 5, }, "start": Object { - "column": 0, - "line": 3, + "column": 14, + "line": 5, }, }, "range": Array [ - 26, - 27, + 162, + 171, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "protected", }, - ], - "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": 1, - "line": 4, - }, - "start": Object { - "column": 7, - "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", - }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 32, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 24, + "line": 5, }, }, "range": Array [ - 0, - 40, + 172, + 180, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "readonly", }, - }, - "range": Array [ - 0, - 40, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 40, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 33, + "line": 5, }, }, "range": Array [ - 0, - 6, + 181, + 188, ], - "type": "Keyword", - "value": "export", + "type": "Identifier", + "value": "student", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 41, + "line": 5, }, "start": Object { - "column": 7, - "line": 1, + "column": 40, + "line": 5, }, }, "range": Array [ - 7, - 11, + 188, + 189, ], - "type": "Keyword", - "value": "enum", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 49, + "line": 5, }, "start": Object { - "column": 12, - "line": 1, + "column": 42, + "line": 5, }, }, "range": Array [ - 12, - 15, + 190, + 197, ], "type": "Identifier", - "value": "Foo", + "value": "boolean", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 51, + "line": 5, }, "start": Object { - "column": 16, - "line": 1, + "column": 50, + "line": 5, }, }, "range": Array [ - 16, - 17, + 198, + 199, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 57, + "line": 5, }, "start": Object { - "column": 4, - "line": 2, + "column": 52, + "line": 5, }, }, "range": Array [ - 22, - 25, + 200, + 205, ], - "type": "Identifier", - "value": "foo", + "type": "Boolean", + "value": "false", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 58, + "line": 5, }, "start": Object { - "column": 8, - "line": 2, + "column": 57, + "line": 5, }, }, "range": Array [ - 26, - 27, + 205, + 206, ], "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, - }, - "range": Array [ - 28, - 29, - ], - "type": "Numeric", - "value": "1", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 60, + "line": 5, }, "start": Object { - "column": 11, - "line": 2, + "column": 59, + "line": 5, }, }, "range": Array [ - 29, - 30, + 207, + 208, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 61, + "line": 5, }, "start": Object { - "column": 4, - "line": 3, + "column": 60, + "line": 5, }, }, "range": Array [ - 35, - 38, + 208, + 209, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 6, }, "start": Object { "column": 0, - "line": 4, + "line": 6, }, }, "range": Array [ - 39, - 40, + 210, + 211, ], "type": "Punctuator", "value": "}", @@ -23001,122 +21170,484 @@ Object { } `; -exports[`typescript fixtures/basics/export-type-alias-declaration.src 1`] = ` +exports[`typescript fixtures/basics/class-with-public-parameter-properties.src 1`] = ` Object { "body": Array [ Object { - "declaration": Object { - "declarations": Array [ + "body": Object { + "body": Array [ Object { - "id": Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 12, - "line": 1, + "column": 2, + "line": 2, }, }, - "name": "TestAlias", + "name": "constructor", "range": Array [ - 12, - 21, + 14, + 25, ], "type": "Identifier", }, - "init": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 1, - }, - "start": Object { - "column": 24, - "line": 1, - }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 58, + "line": 5, }, - "range": Array [ - 24, - 39, - ], - "type": "TSUnionType", - "types": Array [ + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 197, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 58, + "line": 5, + }, + "start": Object { + "column": 56, + "line": 5, + }, + }, + "range": Array [ + 195, + 197, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 58, + "line": 5, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "params": Array [ Object { + "accessibility": "public", "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 38, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 14, + "line": 2, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "name": "firstName", + "range": Array [ + 33, + 50, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 42, + 50, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 44, + 50, + ], + "type": "TSStringKeyword", + }, }, }, "range": Array [ - 24, - 30, + 26, + 50, ], - "type": "TSStringKeyword", + "type": "TSParameterProperty", }, Object { + "accessibility": "public", "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 46, + "line": 3, }, "start": Object { - "column": 33, - "line": 1, + "column": 14, + "line": 3, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 3, + }, + }, + "name": "lastName", + "range": Array [ + 82, + 98, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 3, + }, + "start": Object { + "column": 38, + "line": 3, + }, + }, + "range": Array [ + 90, + 98, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 3, + }, + "start": Object { + "column": 40, + "line": 3, + }, + }, + "range": Array [ + 92, + 98, + ], + "type": "TSStringKeyword", + }, }, }, "range": Array [ - 33, - 39, + 66, + 98, ], - "type": "TSNumberKeyword", + "readonly": true, + "type": "TSParameterProperty", + }, + Object { + "accessibility": "public", + "loc": Object { + "end": Object { + "column": 37, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "parameter": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 4, + }, + "start": Object { + "column": 21, + "line": 4, + }, + }, + "name": "age", + "range": Array [ + 121, + 132, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 4, + }, + "start": Object { + "column": 24, + "line": 4, + }, + }, + "range": Array [ + 124, + 132, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 4, + }, + "start": Object { + "column": 26, + "line": 4, + }, + }, + "range": Array [ + 126, + 132, + ], + "type": "TSNumberKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "range": Array [ + 114, + 137, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 4, + }, + "start": Object { + "column": 35, + "line": 4, + }, + }, + "range": Array [ + 135, + 137, + ], + "raw": "30", + "type": "Literal", + "value": 30, + }, + "type": "AssignmentPattern", + }, + "range": Array [ + 114, + 137, + ], + "type": "TSParameterProperty", + }, + Object { + "accessibility": "public", + "loc": Object { + "end": Object { + "column": 54, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "parameter": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 5, + }, + "start": Object { + "column": 30, + "line": 5, + }, + }, + "name": "student", + "range": Array [ + 169, + 185, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 5, + }, + "start": Object { + "column": 37, + "line": 5, + }, + }, + "range": Array [ + 176, + 185, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 5, + }, + "start": Object { + "column": 39, + "line": 5, + }, + }, + "range": Array [ + 178, + 185, + ], + "type": "TSBooleanKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 54, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, + }, + "range": Array [ + 153, + 193, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 5, + }, + "start": Object { + "column": 49, + "line": 5, + }, + }, + "range": Array [ + 188, + 193, + ], + "raw": "false", + "type": "Literal", + "value": false, + }, + "type": "AssignmentPattern", + }, + "range": Array [ + 153, + 193, + ], + "readonly": true, + "type": "TSParameterProperty", }, ], + "range": Array [ + 25, + 197, + ], + "type": "FunctionExpression", }, - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 40, - ], - "type": "VariableDeclarator", }, ], - "kind": "type", "loc": Object { "end": Object { - "column": 40, + "column": 1, + "line": 6, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 199, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, "line": 1, }, "start": Object { - "column": 7, + "column": 6, "line": 1, }, }, + "name": "Foo", "range": Array [ - 7, - 40, + 6, + 9, ], - "type": "VariableDeclaration", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 40, - "line": 1, + "column": 1, + "line": 6, }, "start": Object { "column": 0, @@ -23125,17 +21656,16 @@ Object { }, "range": Array [ 0, - 40, + 199, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 40, - "line": 1, + "column": 1, + "line": 6, }, "start": Object { "column": 0, @@ -23144,14 +21674,14 @@ Object { }, "range": Array [ 0, - 40, + 199, ], - "sourceType": "module", + "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 5, "line": 1, }, "start": Object { @@ -23161,447 +21691,331 @@ Object { }, "range": Array [ 0, - 6, + 5, ], "type": "Keyword", - "value": "export", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 9, "line": 1, }, "start": Object { - "column": 7, + "column": 6, "line": 1, }, }, "range": Array [ - 7, - 11, + 6, + 9, ], "type": "Identifier", - "value": "type", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 11, "line": 1, }, "start": Object { - "column": 12, + "column": 10, "line": 1, }, }, "range": Array [ - 12, - 21, + 10, + 11, ], - "type": "Identifier", - "value": "TestAlias", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 22, - 23, + 14, + 25, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 13, + "line": 2, }, }, "range": Array [ - 24, - 30, + 25, + 26, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 20, + "line": 2, }, "start": Object { - "column": 31, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 31, + 26, 32, ], - "type": "Punctuator", - "value": "|", + "type": "Keyword", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 30, + "line": 2, }, "start": Object { - "column": 33, - "line": 1, + "column": 21, + "line": 2, }, }, "range": Array [ 33, - 39, + 42, ], "type": "Identifier", - "value": "number", + "value": "firstName", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 1, + "column": 31, + "line": 2, }, "start": Object { - "column": 39, - "line": 1, + "column": 30, + "line": 2, }, }, "range": Array [ - 39, - 40, + 42, + 43, ], "type": "Punctuator", - "value": ";", + "value": ":", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/export-type-class-declaration.src 1`] = ` -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, - }, - }, - "name": "TestClassProps", - "range": Array [ - 12, - 26, - ], - "type": "Identifier", - }, - "init": 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": 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, - }, + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, }, - "range": Array [ - 7, - 51, - ], - "type": "VariableDeclaration", }, + "range": Array [ + 44, + 50, + ], + "type": "Identifier", + "value": "string", + }, + Object { "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 39, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 38, + "line": 2, }, }, "range": Array [ - 0, + 50, 51, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ",", }, - }, - "range": Array [ - 0, - 51, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 20, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 14, + "line": 3, }, }, "range": Array [ - 0, - 6, + 66, + 72, ], "type": "Keyword", - "value": "export", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 29, + "line": 3, }, "start": Object { - "column": 7, - "line": 1, + "column": 21, + "line": 3, }, }, "range": Array [ - 7, - 11, + 73, + 81, ], "type": "Identifier", - "value": "type", + "value": "readonly", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 38, + "line": 3, }, "start": Object { - "column": 12, - "line": 1, + "column": 30, + "line": 3, }, }, "range": Array [ - 12, - 26, + 82, + 90, ], "type": "Identifier", - "value": "TestClassProps", + "value": "lastName", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 39, + "line": 3, }, "start": Object { - "column": 27, - "line": 1, + "column": 38, + "line": 3, }, }, "range": Array [ - 27, - 28, + 90, + 91, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 46, + "line": 3, }, "start": Object { - "column": 29, - "line": 1, + "column": 40, + "line": 3, }, }, "range": Array [ - 29, - 30, + 92, + 98, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 3, + }, + "start": Object { + "column": 46, + "line": 3, + }, + }, + "range": Array [ + 98, + 99, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 20, + "line": 4, }, "start": Object { - "column": 4, - "line": 2, + "column": 14, + "line": 4, }, }, "range": Array [ - 35, - 40, + 114, + 120, + ], + "type": "Keyword", + "value": "public", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 4, + }, + "start": Object { + "column": 21, + "line": 4, + }, + }, + "range": Array [ + 121, + 124, ], "type": "Identifier", - "value": "count", + "value": "age", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 25, + "line": 4, }, "start": Object { - "column": 9, - "line": 2, + "column": 24, + "line": 4, }, }, "range": Array [ - 40, - 41, + 124, + 125, ], "type": "Punctuator", "value": ":", @@ -23609,17 +22023,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 32, + "line": 4, }, "start": Object { - "column": 11, - "line": 2, + "column": 26, + "line": 4, }, }, "range": Array [ - 42, - 48, + 126, + 132, ], "type": "Identifier", "value": "number", @@ -23627,402 +22041,197 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 34, + "line": 4, }, "start": Object { - "column": 0, - "line": 3, + "column": 33, + "line": 4, }, }, "range": Array [ - 49, - 50, + 133, + 134, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 37, + "line": 4, }, "start": Object { - "column": 1, - "line": 3, + "column": 35, + "line": 4, }, }, "range": Array [ - 50, - 51, + 135, + 137, + ], + "type": "Numeric", + "value": "30", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 4, + }, + "start": Object { + "column": 37, + "line": 4, + }, + }, + "range": Array [ + 137, + 138, ], "type": "Punctuator", - "value": ";", + "value": ",", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/export-type-function-declaration.src 1`] = ` -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", - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 27, - "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", - }, - }, - }, - ], - "range": Array [ - 27, - 46, - ], - "type": "TSFunctionType", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 40, - "line": 1, - }, - }, - "range": Array [ - 40, - 46, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 46, - "line": 1, - }, - "start": Object { - "column": 42, - "line": 1, - }, - }, - "range": Array [ - 42, - 46, - ], - "type": "TSVoidKeyword", - }, - }, - "typeParameters": null, - }, - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 47, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 47, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 47, - ], - "type": "VariableDeclaration", - }, - "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": 47, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 47, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 20, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 14, + "line": 5, }, }, "range": Array [ - 0, - 6, + 153, + 159, ], "type": "Keyword", - "value": "export", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 29, + "line": 5, }, "start": Object { - "column": 7, - "line": 1, + "column": 21, + "line": 5, }, }, "range": Array [ - 7, - 11, + 160, + 168, ], "type": "Identifier", - "value": "type", + "value": "readonly", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 37, + "line": 5, }, "start": Object { - "column": 12, - "line": 1, + "column": 30, + "line": 5, }, }, "range": Array [ - 12, - 24, + 169, + 176, ], "type": "Identifier", - "value": "TestCallback", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "=", + "value": "student", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 38, + "line": 5, }, "start": Object { - "column": 27, - "line": 1, + "column": 37, + "line": 5, }, }, "range": Array [ - 27, - 28, + 176, + 177, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 46, + "line": 5, }, "start": Object { - "column": 28, - "line": 1, + "column": 39, + "line": 5, }, }, "range": Array [ - 28, - 29, + 178, + 185, ], "type": "Identifier", - "value": "a", + "value": "boolean", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 48, + "line": 5, }, "start": Object { - "column": 29, - "line": 1, + "column": 47, + "line": 5, }, }, "range": Array [ - 29, - 30, + 186, + 187, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 54, + "line": 5, }, "start": Object { - "column": 31, - "line": 1, + "column": 49, + "line": 5, }, }, "range": Array [ - 31, - 37, + 188, + 193, ], - "type": "Identifier", - "value": "number", + "type": "Boolean", + "value": "false", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 55, + "line": 5, }, "start": Object { - "column": 37, - "line": 1, + "column": 54, + "line": 5, }, }, "range": Array [ - 37, - 38, + 193, + 194, ], "type": "Punctuator", "value": ")", @@ -24030,333 +22239,442 @@ Object { Object { "loc": Object { "end": Object { - "column": 41, - "line": 1, + "column": 57, + "line": 5, }, "start": Object { - "column": 39, - "line": 1, + "column": 56, + "line": 5, }, }, "range": Array [ - 39, - 41, + 195, + 196, ], "type": "Punctuator", - "value": "=>", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 46, - "line": 1, + "column": 58, + "line": 5, }, "start": Object { - "column": 42, - "line": 1, + "column": 57, + "line": 5, }, }, "range": Array [ - 42, - 46, + 196, + 197, ], - "type": "Keyword", - "value": "void", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 1, + "column": 1, + "line": 6, }, "start": Object { - "column": 46, - "line": 1, + "column": 0, + "line": 6, }, }, "range": Array [ - 46, - 47, + 198, + 199, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/function-with-await.src 1`] = ` +exports[`typescript fixtures/basics/class-with-readonly-parameter-properties.src 1`] = ` Object { "body": Array [ Object { - "async": true, "body": Object { "body": Array [ 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", - }, + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 16, + "column": 13, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, + "name": "constructor", "range": Array [ - 34, - 46, + 14, + 25, ], - "type": "AwaitExpression", + "type": "Identifier", }, + "kind": "constructor", "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 53, + "line": 3, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "range": Array [ - 34, - 47, + 14, + 107, ], - "type": "ExpressionStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 49, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "name": "hope", - "range": Array [ - 15, - 19, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "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, - ], - "type": "FunctionDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 50, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 5, - ], - "type": "Identifier", - "value": "async", - }, - Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "range": Array [ - 6, - 14, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 19, - ], - "type": "Identifier", - "value": "hope", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 20, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 26, - ], - "type": "Identifier", - "value": "future", + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 53, + "line": 3, + }, + "start": Object { + "column": 51, + "line": 3, + }, + }, + "range": Array [ + 105, + 107, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 53, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "name": "firstName", + "range": Array [ + 35, + 52, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 44, + 52, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 2, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 46, + 52, + ], + "type": "TSStringKeyword", + }, + }, + }, + "range": Array [ + 26, + 52, + ], + "readonly": true, + "type": "TSParameterProperty", + }, + Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "parameter": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 3, + }, + "start": Object { + "column": 23, + "line": 3, + }, + }, + "name": "lastName", + "range": Array [ + 77, + 93, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 3, + }, + "start": Object { + "column": 31, + "line": 3, + }, + }, + "range": Array [ + 85, + 93, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 3, + }, + }, + "range": Array [ + 87, + 93, + ], + "type": "TSStringKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 68, + 103, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 42, + "line": 3, + }, + }, + "range": Array [ + 96, + 103, + ], + "raw": "'Smith'", + "type": "Literal", + "value": "Smith", + }, + "type": "AssignmentPattern", + }, + "range": Array [ + 68, + 103, + ], + "readonly": true, + "type": "TSParameterProperty", + }, + ], + "range": Array [ + 25, + 107, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 109, + ], + "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": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 109, + ], + "superClass": null, + "type": "ClassDeclaration", }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 109, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 27, + "column": 5, "line": 1, }, "start": Object { - "column": 26, + "column": 0, "line": 1, }, }, "range": Array [ - 26, - 27, + 0, + 5, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 9, "line": 1, }, "start": Object { - "column": 28, + "column": 6, "line": 1, }, }, "range": Array [ - 28, - 29, + 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": "{", @@ -24364,417 +22682,429 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, + "column": 13, "line": 2, }, "start": Object { - "column": 4, + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 14, + 25, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 14, "line": 2, }, }, "range": Array [ + 26, 34, - 39, ], "type": "Identifier", - "value": "await", + "value": "readonly", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 32, "line": 2, }, "start": Object { - "column": 10, + "column": 23, "line": 2, }, }, "range": Array [ - 40, - 46, + 35, + 44, ], "type": "Identifier", - "value": "future", + "value": "firstName", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 33, "line": 2, }, "start": Object { - "column": 16, + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 2, + }, + "start": Object { + "column": 34, "line": 2, }, }, "range": Array [ 46, - 47, + 52, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 40, + "line": 2, + }, + }, + "range": Array [ + 52, + 53, ], "type": "Punctuator", - "value": ";", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 22, "line": 3, }, "start": Object { - "column": 0, + "column": 14, "line": 3, }, }, "range": Array [ - 48, - 49, + 68, + 76, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "readonly", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/function-with-object-type-with-optional-properties.src 1`] = ` -Object { - "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 47, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 31, + "line": 3, }, - "range": Array [ - 47, - 51, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "start": Object { + "column": 23, + "line": 3, }, - "name": "foo", - "range": Array [ - 9, - 12, - ], - "type": "Identifier", }, + "range": Array [ + 77, + 85, + ], + "type": "Identifier", + "value": "lastName", + }, + Object { "loc": Object { "end": Object { - "column": 1, + "column": 32, "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 31, + "line": 3, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 45, - "line": 1, - }, - "start": Object { - "column": 13, - "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", - }, - }, - 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", + "range": Array [ + 85, + 86, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 3, + }, + }, + "range": Array [ + 87, + 93, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 3, + }, + "start": Object { + "column": 40, + "line": 3, + }, + }, + "range": Array [ + 94, + 95, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 42, + "line": 3, + }, + }, + "range": Array [ + 96, + 103, + ], + "type": "String", + "value": "'Smith'", + }, + Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 3, + }, + "start": Object { + "column": 49, + "line": 3, + }, + }, + "range": Array [ + 103, + 104, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 52, + "line": 3, + }, + "start": Object { + "column": 51, + "line": 3, + }, + }, + "range": Array [ + 105, + 106, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 3, + }, + "start": Object { + "column": 52, + "line": 3, + }, + }, + "range": Array [ + 106, + 107, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 108, + 109, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-readonly-property.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "public", + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 20, + "line": 2, }, }, - "method": false, + "name": "foo", "range": Array [ - 19, - 22, + 32, + 35, ], - "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": "Identifier", }, - ], - "range": Array [ - 13, - 45, - ], - "type": "ObjectPattern", - "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 45, - "line": 1, + "column": 35, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 23, - 45, + 16, + 47, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "readonly": true, + "static": false, + "type": "ClassProperty", + "value": Object { "loc": Object { "end": Object { - "column": 45, - "line": 1, + "column": 34, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 26, + "line": 2, }, }, - "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, + 38, + 46, ], - "type": "TSTypeLiteral", + "raw": "'string'", + "type": "Literal", + "value": "string", }, }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 1, + }, }, - ], + "range": Array [ + 10, + 49, + ], + "type": "ClassBody", + }, + "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, - 51, + 49, ], - "type": "FunctionDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { @@ -24789,14 +23119,14 @@ Object { }, "range": Array [ 0, - 52, + 50, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { @@ -24806,331 +23136,578 @@ Object { }, "range": Array [ 0, - 8, + 5, ], "type": "Keyword", - "value": "function", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, "range": Array [ + 6, 9, - 12, ], "type": "Identifier", - "value": "foo", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 11, "line": 1, }, "start": Object { - "column": 12, + "column": 10, "line": 1, }, }, "range": Array [ - 12, - 13, + 10, + 11, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 13, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 13, - 14, + 16, + 22, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 19, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 14, - 17, + 23, + 31, ], "type": "Identifier", - "value": "bar", + "value": "readonly", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 17, - "line": 1, + "column": 20, + "line": 2, }, }, "range": Array [ - 17, - 18, + 32, + 35, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 34, + "line": 2, }, "start": Object { - "column": 19, - "line": 1, + "column": 26, + "line": 2, }, }, "range": Array [ - 19, - 22, + 38, + 46, ], - "type": "Identifier", - "value": "baz", + "type": "String", + "value": "'string'", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 1, + "column": 35, + "line": 2, }, "start": Object { - "column": 22, - "line": 1, + "column": 34, + "line": 2, }, }, "range": Array [ - 22, - 23, + 46, + 47, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 23, - 24, + 48, + 49, ], "type": "Punctuator", - "value": ":", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-static-parameter-properties.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 [ + 16, + 27, + ], + "type": "Identifier", + }, + "kind": "constructor", + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 16, + 54, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 46, + 54, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "parameter": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 35, + 44, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 36, + 44, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 38, + 44, + ], + "type": "TSStringKeyword", + }, + }, + }, + "range": Array [ + 28, + 44, + ], + "static": true, + "type": "TSParameterProperty", + }, + ], + "range": Array [ + 27, + 54, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 56, + ], + "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": 26, - "line": 1, + "column": 1, + "line": 5, }, "start": Object { - "column": 25, + "column": 0, "line": 1, }, }, "range": Array [ - 25, - 26, + 0, + 56, ], - "type": "Punctuator", - "value": "{", + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 8, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 59, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 29, + "column": 5, "line": 1, }, "start": Object { - "column": 26, + "column": 0, "line": 1, }, }, "range": Array [ - 26, - 29, + 0, + 5, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 9, "line": 1, }, "start": Object { - "column": 29, + "column": 6, "line": 1, }, }, "range": Array [ - 29, - 30, + 6, + 9, ], - "type": "Punctuator", - "value": "?", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 31, + "column": 11, "line": 1, }, "start": Object { - "column": 30, + "column": 10, "line": 1, }, }, "range": Array [ - 30, - 31, + 10, + 11, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 32, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 32, - 38, + 16, + 27, ], "type": "Identifier", - "value": "string", + "value": "constructor", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 38, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 38, - 39, + 27, + 28, ], "type": "Punctuator", - "value": ",", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 43, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 40, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 40, - 43, + 28, + 34, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, ], "type": "Identifier", - "value": "baz", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 44, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 43, - "line": 1, + "column": 24, + "line": 2, }, }, "range": Array [ - 43, - 44, + 36, + 37, ], "type": "Punctuator", - "value": "?", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 45, - "line": 1, + "column": 32, + "line": 2, }, "start": Object { - "column": 44, - "line": 1, + "column": 26, + "line": 2, }, }, "range": Array [ + 38, 44, - 45, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 46, - "line": 1, + "column": 33, + "line": 2, }, "start": Object { - "column": 45, - "line": 1, + "column": 32, + "line": 2, }, }, "range": Array [ + 44, 45, - 46, ], "type": "Punctuator", "value": ")", @@ -25138,35 +23715,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 48, - "line": 1, + "column": 35, + "line": 2, }, "start": Object { - "column": 47, - "line": 1, + "column": 34, + "line": 2, }, }, "range": Array [ + 46, 47, - 48, ], "type": "Punctuator", "value": "{", }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "}", + }, Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { "column": 0, - "line": 3, + "line": 5, }, }, "range": Array [ - 50, - 51, + 55, + 56, ], "type": "Punctuator", "value": "}", @@ -25176,11 +23771,10 @@ Object { } `; -exports[`typescript fixtures/basics/function-with-object-type-without-annotation.src 1`] = ` +exports[`typescript fixtures/basics/class-with-type-parameter.src 1`] = ` Object { "body": Array [ Object { - "async": false, "body": Object { "body": Array [], "loc": Object { @@ -25189,33 +23783,31 @@ Object { "line": 3, }, "start": Object { - "column": 45, + "column": 13, "line": 1, }, }, "range": Array [ - 45, - 49, + 13, + 17, ], - "type": "BlockStatement", + "type": "ClassBody", }, - "expression": false, - "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 12, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, - "name": "foo", + "name": "Foo", "range": Array [ + 6, 9, - 12, ], "type": "Identifier", }, @@ -25229,288 +23821,66 @@ Object { "line": 1, }, }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 43, - "line": 1, - }, - "start": Object { - "column": 13, - "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", - }, - }, - 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", - }, - }, - ], - "range": Array [ - 13, - 43, - ], - "type": "ObjectPattern", - "typeAnnotation": Object { + "range": Array [ + 0, + 17, + ], + "superClass": null, + "type": "ClassDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 43, + "column": 11, "line": 1, }, "start": Object { - "column": 23, + "column": 10, "line": 1, }, }, - "range": Array [ - 23, - 43, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "name": Object { "loc": Object { "end": Object { - "column": 43, + "column": 11, "line": 1, }, "start": Object { - "column": 25, + "column": 10, "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", - }, - ], + "name": "T", "range": Array [ - 25, - 43, + 10, + 11, ], - "type": "TSTypeLiteral", + "type": "Identifier", }, + "range": Array [ + 10, + 11, + ], + "type": "TSTypeParameter", }, - }, - ], - "range": Array [ - 0, - 49, - ], - "type": "FunctionDeclaration", + ], + "range": Array [ + 9, + 12, + ], + "type": "TSTypeParameterDeclaration", + }, }, ], "loc": Object { @@ -25525,14 +23895,14 @@ Object { }, "range": Array [ 0, - 50, + 18, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { @@ -25542,313 +23912,427 @@ Object { }, "range": Array [ 0, - 8, + 5, ], "type": "Keyword", - "value": "function", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 9, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, "range": Array [ + 6, 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": "(", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 10, "line": 1, }, "start": Object { - "column": 13, + "column": 9, "line": 1, }, }, "range": Array [ - 13, - 14, + 9, + 10, ], "type": "Punctuator", - "value": "{", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 11, "line": 1, }, "start": Object { - "column": 14, + "column": 10, "line": 1, }, }, "range": Array [ - 14, - 17, + 10, + 11, ], "type": "Identifier", - "value": "bar", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 12, "line": 1, }, "start": Object { - "column": 17, + "column": 11, "line": 1, }, }, "range": Array [ - 17, - 18, + 11, + 12, ], "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 19, - "line": 1, - }, - }, - "range": Array [ - 19, - 22, - ], - "type": "Identifier", - "value": "baz", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 14, "line": 1, }, "start": Object { - "column": 22, + "column": 13, "line": 1, }, }, "range": Array [ - 22, - 23, + 13, + 14, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 23, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 23, - 24, + 16, + 17, ], "type": "Punctuator", - "value": ":", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/class-with-type-parameter-default.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 1, + }, }, + "range": Array [ + 19, + 23, + ], + "type": "ClassBody", }, - "range": Array [ - 25, - 26, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 26, - "line": 1, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "name": "Foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "bar", - }, - Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 29, + "column": 0, "line": 1, }, }, "range": Array [ - 29, - 30, + 0, + 23, ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 31, - "line": 1, + "superClass": null, + "type": "ClassDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, }, - }, - "range": Array [ - 31, - 37, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, + "params": Array [ + Object { + "default": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "Bar", + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + }, + }, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, + "range": Array [ + 10, + 17, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 9, + 18, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, "line": 1, }, "start": Object { - "column": 37, + "column": 0, "line": 1, }, }, "range": Array [ - 37, - 38, + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, ], "type": "Punctuator", - "value": ",", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 42, + "column": 11, "line": 1, }, "start": Object { - "column": 39, + "column": 10, "line": 1, }, }, "range": Array [ - 39, - 42, + 10, + 11, ], "type": "Identifier", - "value": "baz", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 43, + "column": 13, "line": 1, }, "start": Object { - "column": 42, + "column": 12, "line": 1, }, }, "range": Array [ - 42, - 43, + 12, + 13, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 44, + "column": 17, "line": 1, }, "start": Object { - "column": 43, + "column": 14, "line": 1, }, }, "range": Array [ - 43, - 44, + 14, + 17, + ], + "type": "Identifier", + "value": "Bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, ], "type": "Punctuator", - "value": ")", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 46, + "column": 20, "line": 1, }, "start": Object { - "column": 45, + "column": 19, "line": 1, }, }, "range": Array [ - 45, - 46, + 19, + 20, ], "type": "Punctuator", "value": "{", @@ -25865,8 +24349,8 @@ Object { }, }, "range": Array [ - 48, - 49, + 22, + 23, ], "type": "Punctuator", "value": "}", @@ -25876,232 +24360,70 @@ Object { } `; -exports[`typescript fixtures/basics/function-with-type-parameters.src 1`] = ` +exports[`typescript fixtures/basics/class-with-type-parameter-underscore.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 [ - 36, - 37, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 29, - 38, - ], - "type": "ReturnStatement", - }, - ], + "body": Array [], "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 23, + "column": 13, "line": 1, }, }, "range": Array [ - 23, - 40, + 13, + 15, ], - "type": "BlockStatement", + "type": "ClassBody", }, - "expression": false, - "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 10, + "column": 7, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, - "name": "a", + "name": "A", "range": Array [ - 9, - 10, + 6, + 7, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 15, + "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, + 15, ], - "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", + "superClass": null, + "type": "ClassDeclaration", "typeParameters": Object { "loc": Object { "end": Object { - "column": 13, + "column": 12, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, @@ -26109,25 +24431,42 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "column": 8, "line": 1, }, }, - "name": "X", + "name": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "__P", + "range": Array [ + 8, + 11, + ], + "type": "Identifier", + }, "range": Array [ + 8, 11, - 12, ], "type": "TSTypeParameter", }, ], "range": Array [ - 10, - 13, + 7, + 12, ], "type": "TSTypeParameterDeclaration", }, @@ -26136,7 +24475,7 @@ Object { "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -26145,14 +24484,14 @@ Object { }, "range": Array [ 0, - 41, + 16, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 5, "line": 1, }, "start": Object { @@ -26162,43 +24501,43 @@ Object { }, "range": Array [ 0, - 8, + 5, ], "type": "Keyword", - "value": "function", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 7, "line": 1, }, "start": Object { - "column": 9, + "column": 6, "line": 1, }, }, "range": Array [ - 9, - 10, + 6, + 7, ], "type": "Identifier", - "value": "a", + "value": "A", }, 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": "<", @@ -26206,35 +24545,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 11, "line": 1, }, "start": Object { - "column": 11, + "column": 8, "line": 1, }, }, "range": Array [ + 8, 11, - 12, ], "type": "Identifier", - "value": "X", + "value": "__P", }, 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": ">", @@ -26255,7 +24594,7 @@ Object { 14, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { @@ -26272,134 +24611,286 @@ Object { 14, 15, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/const-enum.src 1`] = ` +Object { + "body": Array [ Object { + "const": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 11, + 14, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 1, + "line": 4, }, "start": Object { - "column": 15, + "column": 0, "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 [ + 21, + 24, + ], + "type": "Identifier", + }, + "initializer": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 21, + 28, + ], + "type": "TSEnumMember", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 34, + 37, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 34, + 37, + ], + "type": "TSEnumMember", + }, + ], "range": Array [ - 15, - 16, + 0, + 39, ], - "type": "Punctuator", - "value": ":", + "type": "TSEnumDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 39, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 18, + "column": 5, "line": 1, }, "start": Object { - "column": 17, + "column": 0, "line": 1, }, }, "range": Array [ - 17, - 18, + 0, + 5, ], - "type": "Identifier", - "value": "X", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 10, "line": 1, }, "start": Object { - "column": 18, + "column": 6, "line": 1, }, }, "range": Array [ - 18, - 19, + 6, + 10, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "enum", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 14, "line": 1, }, "start": Object { - "column": 19, + "column": 11, "line": 1, }, }, "range": Array [ - 19, - 20, + 11, + 14, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 1, }, "start": Object { - "column": 21, + "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, - 22, + 24, ], "type": "Identifier", - "value": "X", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 23, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 23, - 24, + 25, + 26, ], "type": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 2, }, "start": Object { - "column": 4, + "column": 10, "line": 2, }, }, "range": Array [ - 29, - 35, + 27, + 28, ], - "type": "Keyword", - "value": "return", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { @@ -26413,44 +24904,44 @@ Object { }, }, "range": Array [ - 36, - 37, + 28, + 29, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 12, - "line": 2, + "column": 4, + "line": 3, }, }, "range": Array [ + 34, 37, - 38, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 4, }, "start": Object { "column": 0, - "line": 3, + "line": 4, }, }, "range": Array [ + 38, 39, - 40, ], "type": "Punctuator", "value": "}", @@ -26460,108 +24951,166 @@ Object { } `; -exports[`typescript fixtures/basics/function-with-type-parameters-that-have-comments.src 1`] = ` +exports[`typescript fixtures/basics/declare-class-with-optional-method.src 1`] = ` Object { "body": Array [ Object { - "async": false, "body": Object { - "body": Array [], + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "bar", + "optional": true, + "range": Array [ + 24, + 27, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 24, + 36, + ], + "static": false, + "type": "MethodDefinition", + "value": Object { + "async": false, + "body": null, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "params": Array [], + "range": Array [ + 28, + 36, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 30, + 35, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 32, + 35, + ], + "type": "TSAnyKeyword", + }, + }, + "type": "FunctionExpression", + }, + }, + ], "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 33, + "column": 18, "line": 1, }, }, "range": Array [ - 33, - 35, + 18, + 38, ], - "type": "BlockStatement", + "type": "ClassBody", }, - "expression": false, - "generator": false, + "declare": true, "id": Object { "loc": Object { "end": Object { - "column": 16, + "column": 17, "line": 1, }, "start": Object { - "column": 9, + "column": 14, "line": 1, }, }, - "name": "compare", + "name": "Foo", "range": Array [ - 9, - 16, + 14, + 17, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, "line": 1, }, }, - "params": Array [], "range": Array [ 0, - 35, + 38, ], - "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", - }, + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -26570,14 +25119,14 @@ Object { }, "range": Array [ 0, - 35, + 38, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 7, "line": 1, }, "start": Object { @@ -26587,28 +25136,28 @@ Object { }, "range": Array [ 0, - 8, + 7, ], - "type": "Keyword", - "value": "function", + "type": "Identifier", + "value": "declare", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 13, "line": 1, }, "start": Object { - "column": 9, + "column": 8, "line": 1, }, }, "range": Array [ - 9, - 16, + 8, + 13, ], - "type": "Identifier", - "value": "compare", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { @@ -26617,121 +25166,175 @@ Object { "line": 1, }, "start": Object { - "column": 16, + "column": 14, "line": 1, }, }, "range": Array [ - 16, + 14, 17, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 19, "line": 1, }, "start": Object { - "column": 28, + "column": 18, "line": 1, }, }, "range": Array [ - 28, - 29, + 18, + 19, ], - "type": "Identifier", - "value": "T", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 7, + "line": 2, }, "start": Object { - "column": 29, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 29, - 30, + 24, + 27, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 30, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 30, - 31, + 27, + 28, ], "type": "Punctuator", - "value": "(", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 31, - "line": 1, + "column": 8, + "line": 2, }, }, "range": Array [ - 31, - 32, + 28, + 29, ], "type": "Punctuator", - "value": ")", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 33, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ - 33, - 34, + 29, + 30, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 34, - "line": 1, + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 32, + 35, + ], + "type": "Identifier", + "value": "any", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, }, }, "range": Array [ - 34, 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 37, + 38, ], "type": "Punctuator", "value": "}", @@ -26741,89 +25344,36 @@ Object { } `; -exports[`typescript fixtures/basics/function-with-type-parameters-with-constraint.src 1`] = ` +exports[`typescript fixtures/basics/declare-function.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", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 40, - 49, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 34, - "line": 1, - }, - }, - "range": Array [ - 34, - 51, - ], - "type": "BlockStatement", - }, + "declare": true, "expression": false, "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 10, + "column": 20, "line": 1, }, "start": Object { - "column": 9, + "column": 17, "line": 1, }, }, - "name": "a", + "name": "foo", "range": Array [ - 9, - 10, + 17, + 20, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 42, + "line": 1, }, "start": Object { "column": 0, @@ -26834,192 +25384,101 @@ Object { Object { "loc": Object { "end": Object { - "column": 29, + "column": 32, "line": 1, }, "start": Object { - "column": 25, + "column": 21, "line": 1, }, }, - "name": "b", + "name": "bar", "range": Array [ - 25, - 29, + 21, + 32, ], "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 29, + "column": 32, "line": 1, }, "start": Object { - "column": 26, + "column": 24, "line": 1, }, }, "range": Array [ - 26, - 29, + 24, + 32, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 29, + "column": 32, "line": 1, }, "start": Object { - "column": 28, + "column": 26, "line": 1, }, }, "range": Array [ - 28, - 29, + 26, + 32, ], - "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", - }, + "type": "TSStringKeyword", }, }, }, ], "range": Array [ 0, - 51, + 42, ], "returnType": Object { "loc": Object { "end": Object { - "column": 33, + "column": 41, "line": 1, }, "start": Object { - "column": 30, + "column": 33, "line": 1, }, }, "range": Array [ - 30, 33, + 41, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 33, + "column": 41, "line": 1, }, "start": Object { - "column": 32, + "column": 35, "line": 1, }, }, "range": Array [ - 32, - 33, + 35, + 41, ], - "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": 24, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, + "type": "TSStringKeyword", }, - "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": 23, - "line": 1, - }, - "start": Object { - "column": 11, - "line": 1, - }, - }, - "name": "X", - "range": Array [ - 11, - 23, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 10, - 24, - ], - "type": "TSTypeParameterDeclaration", }, + "type": "TSDeclareFunction", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 4, + "column": 42, + "line": 1, }, "start": Object { "column": 0, @@ -27028,14 +25487,14 @@ Object { }, "range": Array [ 0, - 52, + 42, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 7, "line": 1, }, "start": Object { @@ -27045,64 +25504,28 @@ Object { }, "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, + 7, ], "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 11, - ], - "type": "Punctuator", - "value": "<", + "value": "declare", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 16, "line": 1, }, "start": Object { - "column": 11, + "column": 8, "line": 1, }, }, "range": Array [ - 11, - 12, + 8, + 16, ], - "type": "Identifier", - "value": "X", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { @@ -27111,52 +25534,34 @@ Object { "line": 1, }, "start": Object { - "column": 13, + "column": 17, "line": 1, }, }, "range": Array [ - 13, + 17, 20, ], - "type": "Keyword", - "value": "extends", + "type": "Identifier", + "value": "foo", }, 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": 20, "line": 1, }, }, "range": Array [ - 22, - 23, + 20, + 21, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { @@ -27165,16 +25570,16 @@ Object { "line": 1, }, "start": Object { - "column": 23, + "column": 21, "line": 1, }, }, "range": Array [ - 23, + 21, 24, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { @@ -27192,30 +25597,12 @@ Object { 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", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 32, "line": 1, }, "start": Object { @@ -27225,43 +25612,25 @@ Object { }, "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, + 32, ], "type": "Identifier", - "value": "X", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 33, "line": 1, }, "start": Object { - "column": 29, + "column": 32, "line": 1, }, }, "range": Array [ - 29, - 30, + 32, + 33, ], "type": "Punctuator", "value": ")", @@ -27269,17 +25638,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 31, + "column": 34, "line": 1, }, "start": Object { - "column": 30, + "column": 33, "line": 1, }, }, "range": Array [ - 30, - 31, + 33, + 34, ], "type": "Punctuator", "value": ":", @@ -27287,304 +25656,216 @@ Object { Object { "loc": Object { "end": Object { - "column": 33, + "column": 41, "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, + 41, ], "type": "Identifier", - "value": "b", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 42, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 41, + "line": 1, }, }, "range": Array [ - 48, - 49, + 41, + 42, ], "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/destructuring-assignment.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "name": "name", - "range": Array [ - 50, - 54, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 43, - 55, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 37, - "line": 1, - }, - }, - "range": Array [ - 37, - 57, - ], - "type": "BlockStatement", - }, - "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 { + "expression": Object { + "left": Object { "loc": Object { "end": Object { - "column": 28, + "column": 13, "line": 1, }, "start": Object { - "column": 17, + "column": 1, "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": 6, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 3, + 6, + ], + "type": "Identifier", }, - }, - "range": Array [ - 21, - 28, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "kind": "init", "loc": Object { "end": Object { - "column": 28, + "column": 11, "line": 1, }, "start": Object { - "column": 22, + "column": 3, "line": 1, }, }, + "method": false, "range": Array [ - 22, - 28, + 3, + 11, ], - "type": "TSStringKeyword", + "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 { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 11, + ], + "type": "ArrayExpression", + }, + "type": "AssignmentPattern", + }, }, - }, + ], + "range": Array [ + 1, + 13, + ], + "type": "ObjectPattern", }, - ], - "range": Array [ - 0, - 57, - ], - "returnType": Object { "loc": Object { "end": Object { - "column": 36, + "column": 19, "line": 1, }, "start": Object { - "column": 29, + "column": 1, "line": 1, }, }, + "operator": "=", "range": Array [ - 29, - 36, + 1, + 19, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "right": Object { "loc": Object { "end": Object { - "column": 36, + "column": 19, "line": 1, }, "start": Object { - "column": 30, + "column": 16, "line": 1, }, }, + "name": "bar", "range": Array [ - 30, - 36, + 16, + 19, ], - "type": "TSStringKeyword", + "type": "Identifier", }, + "type": "AssignmentExpression", }, - "type": "FunctionDeclaration", + "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": 4, + "column": 21, + "line": 1, }, "start": Object { "column": 0, @@ -27593,14 +25874,14 @@ Object { }, "range": Array [ 0, - 58, + 21, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 1, "line": 1, }, "start": Object { @@ -27610,649 +25891,1126 @@ Object { }, "range": Array [ 0, - 8, + 1, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 2, "line": 1, }, "start": Object { - "column": 9, + "column": 1, "line": 1, }, }, "range": Array [ - 9, - 16, + 1, + 2, ], - "type": "Identifier", - "value": "message", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 6, "line": 1, }, "start": Object { - "column": 16, + "column": 3, "line": 1, }, }, "range": Array [ - 16, - 17, + 3, + 6, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 8, "line": 1, }, "start": Object { - "column": 17, + "column": 7, "line": 1, }, }, "range": Array [ - 17, - 21, + 7, + 8, ], - "type": "Identifier", - "value": "name", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 10, "line": 1, }, "start": Object { - "column": 21, + "column": 9, "line": 1, }, }, "range": Array [ - 21, - 22, + 9, + 10, ], "type": "Punctuator", - "value": ":", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 11, "line": 1, }, "start": Object { - "column": 22, + "column": 10, "line": 1, }, }, "range": Array [ - 22, - 28, + 10, + 11, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 13, "line": 1, }, "start": Object { - "column": 28, + "column": 12, "line": 1, }, }, "range": Array [ - 28, - 29, + 12, + 13, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 15, "line": 1, }, "start": Object { - "column": 29, + "column": 14, "line": 1, }, }, "range": Array [ - 29, - 30, + 14, + 15, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 19, "line": 1, }, "start": Object { - "column": 30, + "column": 16, "line": 1, }, }, "range": Array [ - 30, - 36, + 16, + 19, ], "type": "Identifier", - "value": "string", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 20, "line": 1, }, "start": Object { - "column": 37, + "column": 19, "line": 1, }, }, "range": Array [ - 37, - 38, + 19, + 20, ], "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", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 20, + "line": 1, }, }, "range": Array [ - 54, - 55, + 20, + 21, ], "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`] = ` +exports[`typescript fixtures/basics/destructuring-assignment-nested.src 1`] = ` Object { "body": Array [ Object { - "async": false, - "body": Object { - "body": Array [ - Object { - "argument": 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": 13, - "line": 2, + "column": 79, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 3, + "line": 1, }, }, - "name": "name", + "method": false, "range": Array [ - 89, - 93, + 3, + 79, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, - }, - "range": Array [ - 82, - 94, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 78, - "line": 1, - }, + "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", }, - "range": Array [ - 78, - 96, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": Object { "loc": Object { "end": Object { - "column": 16, + "column": 127, "line": 1, }, "start": Object { - "column": 9, + "column": 1, "line": 1, }, }, - "name": "message", + "operator": "=", "range": Array [ - 9, - 16, + 1, + 127, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "params": Array [ - Object { + "right": Object { "loc": Object { "end": Object { - "column": 28, + "column": 127, "line": 1, }, "start": Object { - "column": 17, + "column": 84, "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": 28, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 28, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "left": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 30, - "line": 1, - }, - }, - "name": "age", - "range": Array [ - 30, - 40, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 40, - "line": 1, - }, - "start": Object { - "column": 33, - "line": 1, - }, - }, - "range": Array [ - 33, - 40, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "properties": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 40, + "column": 89, "line": 1, }, "start": Object { - "column": 34, + "column": 86, "line": 1, }, }, + "name": "foo", "range": Array [ - 34, - 40, + 86, + 89, ], - "type": "TSNumberKeyword", - }, - }, - }, - "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, - }, - "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": 69, - "line": 1, - }, - "start": Object { - "column": 51, - "line": 1, + "type": "Identifier", }, - }, - "name": "args", - "range": Array [ - 51, - 69, - ], - "type": "Identifier", - "typeAnnotation": Object { + "kind": "init", "loc": Object { "end": Object { - "column": 69, + "column": 126, "line": 1, }, "start": Object { - "column": 55, + "column": 86, "line": 1, }, }, + "method": false, "range": Array [ - 55, - 69, + 86, + 126, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "shorthand": false, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 69, + "column": 126, "line": 1, }, "start": Object { - "column": 56, + "column": 91, "line": 1, }, }, - "range": Array [ - 56, - 69, - ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 61, - "line": 1, - }, - "start": Object { - "column": 56, - "line": 1, - }, - }, - "name": "Array", - "range": Array [ - 56, - 61, - ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 69, - "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", }, - "start": Object { - "column": 61, - "line": 1, + "kind": "init", + "loc": Object { + "end": Object { + "column": 124, + "line": 1, + }, + "start": Object { + "column": 93, + "line": 1, + }, }, - }, - "params": Array [ - Object { + "method": false, + "range": Array [ + 93, + 124, + ], + "shorthand": false, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 68, + "column": 124, "line": 1, }, "start": Object { - "column": 62, + "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 [ - 62, - 68, + 98, + 124, ], - "type": "TSStringKeyword", + "type": "ObjectExpression", }, - ], - "range": Array [ - 61, - 69, - ], - "type": "TSTypeParameterInstantiation", - }, + }, + ], + "range": Array [ + 91, + 126, + ], + "type": "ObjectExpression", }, }, - }, - "loc": Object { - "end": Object { - "column": 69, - "line": 1, - }, - "start": Object { - "column": 48, - "line": 1, - }, - }, + ], "range": Array [ - 48, - 69, + 84, + 127, ], - "type": "RestElement", + "type": "ObjectExpression", }, - ], - "range": Array [ - 0, - 96, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 77, - "line": 1, - }, - "start": Object { - "column": 70, - "line": 1, - }, + "type": "AssignmentExpression", + }, + "loc": Object { + "end": Object { + "column": 129, + "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", + "start": Object { + "column": 0, + "line": 1, }, }, - "type": "FunctionDeclaration", + "range": Array [ + 0, + 129, + ], + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -28261,14 +27019,14 @@ Object { }, "range": Array [ 0, - 97, + 130, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 8, + "column": 1, "line": 1, }, "start": Object { @@ -28278,51 +27036,141 @@ Object { }, "range": Array [ 0, - 8, + 1, ], - "type": "Keyword", - "value": "function", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 2, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 2, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 3, + "line": 1, + }, + }, + "range": Array [ + 3, + 6, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, "line": 1, }, "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { "column": 9, "line": 1, }, + "start": Object { + "column": 8, + "line": 1, + }, }, "range": Array [ + 8, 9, - 16, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, ], "type": "Identifier", - "value": "message", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 17, + "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, - 17, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 20, "line": 1, }, "start": Object { @@ -28332,25 +27180,25 @@ Object { }, "range": Array [ 17, - 21, + 20, ], "type": "Identifier", - "value": "name", + "value": "baz", }, 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": ":", @@ -28358,7 +27206,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 23, "line": 1, }, "start": Object { @@ -28368,25 +27216,43 @@ Object { }, "range": Array [ 22, - 28, + 23, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, ], "type": "Identifier", - "value": "string", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 25, "line": 1, }, "start": Object { - "column": 28, + "column": 24, "line": 1, }, }, "range": Array [ - 28, - 29, + 24, + 25, ], "type": "Punctuator", "value": ",", @@ -28394,20 +27260,56 @@ Object { Object { "loc": Object { "end": Object { - "column": 33, + "column": 27, "line": 1, }, "start": Object { - "column": 30, + "column": 26, "line": 1, }, }, "range": Array [ - 30, - 33, + 26, + 27, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 31, ], "type": "Identifier", - "value": "age", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { @@ -28425,12 +27327,12 @@ Object { 34, ], "type": "Punctuator", - "value": ":", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 40, + "column": 35, "line": 1, }, "start": Object { @@ -28440,702 +27342,439 @@ Object { }, "range": Array [ 34, - 40, + 35, ], "type": "Identifier", - "value": "number", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 42, + "column": 36, "line": 1, }, "start": Object { - "column": 41, + "column": 35, "line": 1, }, }, "range": Array [ - 41, - 42, + 35, + 36, ], "type": "Punctuator", - "value": "=", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 46, + "column": 38, "line": 1, }, "start": Object { - "column": 43, + "column": 37, "line": 1, }, }, "range": Array [ - 43, - 46, + 37, + 38, ], - "type": "Numeric", - "value": "100", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 47, + "column": 40, "line": 1, }, "start": Object { - "column": 46, + "column": 39, "line": 1, }, }, "range": Array [ - 46, - 47, + 39, + 40, ], "type": "Punctuator", - "value": ",", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 51, + "column": 41, "line": 1, }, "start": Object { - "column": 48, + "column": 40, "line": 1, }, }, "range": Array [ - 48, - 51, + 40, + 41, ], - "type": "Punctuator", - "value": "...", + "type": "Numeric", + "value": "3", }, Object { "loc": Object { "end": Object { - "column": 55, + "column": 42, "line": 1, }, "start": Object { - "column": 51, + "column": 41, "line": 1, }, }, "range": Array [ - 51, - 55, + 41, + 42, ], - "type": "Identifier", - "value": "args", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 56, + "column": 44, "line": 1, }, "start": Object { - "column": 55, + "column": 43, "line": 1, }, }, "range": Array [ - 55, - 56, + 43, + 44, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 61, + "column": 46, "line": 1, }, "start": Object { - "column": 56, + "column": 45, "line": 1, }, }, "range": Array [ - 56, - 61, + 45, + 46, ], - "type": "Identifier", - "value": "Array", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 62, + "column": 48, "line": 1, }, "start": Object { - "column": 61, + "column": 47, "line": 1, }, }, "range": Array [ - 61, - 62, + 47, + 48, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 68, + "column": 52, "line": 1, }, "start": Object { - "column": 62, + "column": 49, "line": 1, }, }, "range": Array [ - 62, - 68, + 49, + 52, ], "type": "Identifier", - "value": "string", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 69, + "column": 53, "line": 1, }, "start": Object { - "column": 68, + "column": 52, "line": 1, }, }, "range": Array [ - 68, - 69, + 52, + 53, ], "type": "Punctuator", - "value": ">", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 70, + "column": 55, "line": 1, }, "start": Object { - "column": 69, + "column": 54, "line": 1, }, }, "range": Array [ - 69, - 70, + 54, + 55, ], "type": "Punctuator", - "value": ")", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 71, + "column": 56, "line": 1, }, "start": Object { - "column": 70, + "column": 55, "line": 1, }, }, "range": Array [ - 70, - 71, + 55, + 56, + ], + "type": "Numeric", + "value": "2", + }, + Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 1, + }, + "start": Object { + "column": 56, + "line": 1, + }, + }, + "range": Array [ + 56, + 57, ], "type": "Punctuator", - "value": ":", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 77, + "column": 58, "line": 1, }, "start": Object { - "column": 71, + "column": 57, "line": 1, }, }, "range": Array [ - 71, - 77, + 57, + 58, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 79, + "column": 59, "line": 1, }, "start": Object { - "column": 78, + "column": 58, "line": 1, }, }, "range": Array [ - 78, - 79, + 58, + 59, ], "type": "Punctuator", - "value": "{", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 61, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 60, + "line": 1, }, }, "range": Array [ - 82, - 88, + 60, + 61, ], - "type": "Keyword", - "value": "return", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 63, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 62, + "line": 1, }, }, "range": Array [ - 89, - 93, + 62, + 63, ], - "type": "Identifier", - "value": "name", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 64, + "line": 1, }, "start": Object { - "column": 13, - "line": 2, + "column": 63, + "line": 1, }, }, "range": Array [ - 93, - 94, + 63, + 64, ], "type": "Punctuator", - "value": ";", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 66, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 65, + "line": 1, }, }, "range": Array [ - 95, - 96, + 65, + 66, ], "type": "Punctuator", "value": "}", }, - ], - "type": "Program", -} -`; - -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", - }, - "init": 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, - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 28, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", "loc": Object { "end": Object { - "column": 28, + "column": 68, "line": 1, }, "start": Object { - "column": 0, + "column": 67, "line": 1, }, }, "range": Array [ - 0, - 28, + 67, + 68, ], - "type": "VariableDeclaration", + "type": "Punctuator", + "value": "=", }, Object { - "declarations": Array [ - 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", - }, - "init": 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": 26, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 34, - 55, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 70, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 69, + "line": 1, }, }, "range": Array [ - 29, - 55, + 69, + 70, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "{", }, - }, - "range": Array [ - 0, - 56, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, + "column": 71, "line": 1, }, "start": Object { - "column": 0, + "column": 70, "line": 1, }, }, "range": Array [ - 0, - 4, + 70, + 71, ], - "type": "Identifier", - "value": "type", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 73, "line": 1, }, "start": Object { - "column": 5, + "column": 72, "line": 1, }, }, "range": Array [ - 5, - 6, + 72, + 73, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 75, "line": 1, }, "start": Object { - "column": 7, + "column": 74, "line": 1, }, }, "range": Array [ - 7, - 8, + 74, + 75, ], "type": "Punctuator", "value": "=", @@ -29143,341 +27782,521 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 77, "line": 1, }, "start": Object { - "column": 9, + "column": 76, "line": 1, }, }, "range": Array [ - 9, - 15, + 76, + 77, ], - "type": "Keyword", - "value": "typeof", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 79, "line": 1, }, "start": Object { - "column": 16, + "column": 78, "line": 1, }, }, "range": Array [ - 16, - 22, + 78, + 79, ], - "type": "Keyword", - "value": "import", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 81, "line": 1, }, "start": Object { - "column": 22, + "column": 80, "line": 1, }, }, "range": Array [ - 22, - 23, + 80, + 81, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 83, "line": 1, }, "start": Object { - "column": 23, + "column": 82, "line": 1, }, }, "range": Array [ - 23, - 26, + 82, + 83, ], - "type": "String", - "value": "'A'", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 85, "line": 1, }, "start": Object { - "column": 26, + "column": 84, "line": 1, }, }, "range": Array [ - 26, - 27, + 84, + 85, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 89, "line": 1, }, "start": Object { - "column": 27, + "column": 86, "line": 1, }, }, "range": Array [ - 27, - 28, + 86, + 89, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 2, + "column": 90, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 89, + "line": 1, }, }, "range": Array [ - 29, - 33, + 89, + 90, ], - "type": "Identifier", - "value": "type", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 92, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 91, + "line": 1, }, }, "range": Array [ - 34, - 35, + 91, + 92, ], - "type": "Identifier", - "value": "B", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 96, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 93, + "line": 1, }, }, "range": Array [ - 36, - 37, + 93, + 96, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 97, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 96, + "line": 1, }, }, "range": Array [ - 38, - 44, + 96, + 97, ], - "type": "Keyword", - "value": "import", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 99, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 98, + "line": 1, }, }, "range": Array [ - 44, - 45, + 98, + 99, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 103, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 100, + "line": 1, }, }, "range": Array [ - 45, - 48, + 100, + 103, ], - "type": "String", - "value": "\\"B\\"", + "type": "Identifier", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 104, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 103, + "line": 1, }, }, "range": Array [ - 48, - 49, + 103, + 104, ], "type": "Punctuator", - "value": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 106, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 105, + "line": 1, }, }, "range": Array [ - 49, - 50, + 105, + 106, ], "type": "Punctuator", - "value": ".", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 107, + "line": 1, }, "start": Object { - "column": 21, - "line": 2, + "column": 106, + "line": 1, }, }, "range": Array [ - 50, - 51, + 106, + 107, ], - "type": "Identifier", - "value": "X", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 108, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 107, + "line": 1, }, }, "range": Array [ - 51, - 52, + 107, + 108, ], "type": "Punctuator", - "value": "<", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 110, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 109, + "line": 1, }, }, "range": Array [ - 52, - 53, + 109, + 110, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 114, + "line": 1, + }, + "start": Object { + "column": 111, + "line": 1, + }, + }, + "range": Array [ + 111, + 114, ], "type": "Identifier", - "value": "Y", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 115, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 114, + "line": 1, }, }, "range": Array [ - 53, - 54, + 114, + 115, ], "type": "Punctuator", - "value": ">", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 117, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 116, + "line": 1, }, }, "range": Array [ - 54, - 55, + 116, + 117, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 118, + "line": 1, + }, + "start": Object { + "column": 117, + "line": 1, + }, + }, + "range": Array [ + 117, + 118, + ], + "type": "Numeric", + "value": "3", + }, + Object { + "loc": Object { + "end": Object { + "column": 119, + "line": 1, + }, + "start": Object { + "column": 118, + "line": 1, + }, + }, + "range": Array [ + 118, + 119, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 121, + "line": 1, + }, + "start": Object { + "column": 120, + "line": 1, + }, + }, + "range": Array [ + 120, + 121, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 122, + "line": 1, + }, + "start": Object { + "column": 121, + "line": 1, + }, + }, + "range": Array [ + 121, + 122, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 124, + "line": 1, + }, + "start": Object { + "column": 123, + "line": 1, + }, + }, + "range": Array [ + 123, + 124, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 126, + "line": 1, + }, + "start": Object { + "column": 125, + "line": 1, + }, + }, + "range": Array [ + 125, + 126, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 127, + "line": 1, + }, + "start": Object { + "column": 126, + "line": 1, + }, + }, + "range": Array [ + 126, + 127, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 128, + "line": 1, + }, + "start": Object { + "column": 127, + "line": 1, + }, + }, + "range": Array [ + 127, + 128, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 129, + "line": 1, + }, + "start": Object { + "column": 128, + "line": 1, + }, + }, + "range": Array [ + 128, + 129, ], "type": "Punctuator", "value": ";", @@ -29487,213 +28306,160 @@ Object { } `; -exports[`typescript fixtures/basics/import-type-with-type-parameters-in-type-reference.src 1`] = ` +exports[`typescript fixtures/basics/destructuring-assignment-object.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, - }, + "expression": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 1, + "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, + "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", }, - }, - "range": Array [ - 9, - 29, - ], - "type": "TSTypeReference", - "typeName": Object { + "kind": "init", "loc": Object { "end": Object { - "column": 10, + "column": 11, "line": 1, }, "start": Object { - "column": 9, + "column": 3, "line": 1, }, }, - "name": "A", + "method": false, "range": Array [ - 9, - 10, + 3, + 11, ], - "type": "Identifier", - }, - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 29, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "params": Array [ - Object { - "isTypeOf": false, + "shorthand": true, + "type": "Property", + "value": Object { + "left": Object { "loc": Object { "end": Object { - "column": 28, + "column": 6, "line": 1, }, "start": Object { - "column": 11, + "column": 3, "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", + "name": "foo", + "range": Array [ + 3, + 6, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, }, - "qualifier": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "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, }, - "name": "B", - "range": Array [ - 22, - 23, - ], - "type": "Identifier", }, + "properties": Array [], "range": Array [ + 9, 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", - }, + "type": "ObjectExpression", }, - ], - "range": Array [ - 10, - 29, - ], - "type": "TSTypeParameterInstantiation", + "type": "AssignmentPattern", + }, }, + ], + "range": Array [ + 1, + 13, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "operator": "=", + "range": Array [ + 1, + 19, + ], + "right": Object { "loc": Object { "end": Object { - "column": 30, + "column": 19, "line": 1, }, "start": Object { - "column": 5, + "column": 16, "line": 1, }, }, + "name": "bar", "range": Array [ - 5, - 30, + 16, + 19, ], - "type": "VariableDeclarator", + "type": "Identifier", }, - ], - "kind": "type", + "type": "AssignmentExpression", + }, "loc": Object { "end": Object { - "column": 30, + "column": 21, "line": 1, }, "start": Object { @@ -29703,9 +28469,9 @@ Object { }, "range": Array [ 0, - 30, + 21, ], - "type": "VariableDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { @@ -29720,14 +28486,14 @@ Object { }, "range": Array [ 0, - 31, + 22, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, + "column": 1, "line": 1, }, "start": Object { @@ -29737,10 +28503,28 @@ Object { }, "range": Array [ 0, - 4, + 1, ], - "type": "Identifier", - "value": "type", + "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 { @@ -29749,16 +28533,16 @@ Object { "line": 1, }, "start": Object { - "column": 5, + "column": 3, "line": 1, }, }, "range": Array [ - 5, + 3, 6, ], "type": "Identifier", - "value": "X", + "value": "foo", }, Object { "loc": Object { @@ -29793,8 +28577,8 @@ Object { 9, 10, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { @@ -29812,76 +28596,76 @@ Object { 11, ], "type": "Punctuator", - "value": "<", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 13, "line": 1, }, "start": Object { - "column": 11, + "column": 12, "line": 1, }, }, "range": Array [ - 11, - 17, + 12, + 13, ], - "type": "Keyword", - "value": "import", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 15, "line": 1, }, "start": Object { - "column": 17, + "column": 14, "line": 1, }, }, "range": Array [ - 17, - 18, + 14, + 15, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 19, "line": 1, }, "start": Object { - "column": 18, + "column": 16, "line": 1, }, }, "range": Array [ - 18, - 20, + 16, + 19, ], - "type": "String", - "value": "\\"\\"", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 20, "line": 1, }, "start": Object { - "column": 20, + "column": 19, "line": 1, }, }, "range": Array [ + 19, 20, - 21, ], "type": "Punctuator", "value": ")", @@ -29889,331 +28673,480 @@ Object { 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": ".", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/destructuring-assignment-property.src 1`] = ` +Object { + "body": Array [ Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 37, + ], + "type": "BlockStatement", + }, + "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": 23, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 22, + "column": 0, "line": 1, }, }, + "params": Array [ + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "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", + }, + "kind": "init", + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "method": false, + "range": Array [ + 15, + 23, + ], + "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": 23, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 23, + ], + "right": Object { + "elements": Array [], + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 23, + ], + "type": "ArrayExpression", + }, + "type": "AssignmentPattern", + }, + }, + ], + "range": Array [ + 13, + 25, + ], + "type": "ObjectPattern", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 31, + ], + "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 [ - 22, - 23, + 0, + 37, ], - "type": "Identifier", - "value": "B", + "type": "FunctionDeclaration", + }, + ], + "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": 24, + "column": 8, "line": 1, }, "start": Object { - "column": 23, + "column": 0, "line": 1, }, }, "range": Array [ - 23, - 24, + 0, + 8, ], - "type": "Punctuator", - "value": "<", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 12, "line": 1, }, "start": Object { - "column": 24, + "column": 9, "line": 1, }, }, "range": Array [ - 24, - 27, + 9, + 12, ], "type": "Identifier", - "value": "any", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 13, "line": 1, }, "start": Object { - "column": 27, + "column": 12, "line": 1, }, }, "range": Array [ - 27, - 28, + 12, + 13, ], "type": "Punctuator", - "value": ">", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 14, "line": 1, }, "start": Object { - "column": 28, + "column": 13, "line": 1, }, }, "range": Array [ - 28, - 29, + 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", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/interface-extends.src 1`] = ` -Object { - "body": Array [ Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 20, + "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", + "start": Object { + "column": 19, + "line": 1, }, + }, + "range": Array [ + 19, + 20, ], - "id": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, }, - "name": "Foo", - "range": Array [ - 10, - 13, - ], - "type": "Identifier", }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "[", + }, + Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 23, + "line": 1, }, "start": Object { - "column": 0, + "column": 22, "line": 1, }, }, "range": Array [ - 0, - 30, + 22, + 23, ], - "type": "TSInterfaceDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "]", }, - }, - "range": Array [ - 0, - 31, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 25, "line": 1, }, "start": Object { - "column": 0, + "column": 24, "line": 1, }, }, "range": Array [ - 0, - 9, + 24, + 25, ], - "type": "Keyword", - "value": "interface", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 27, "line": 1, }, "start": Object { - "column": 10, + "column": 26, "line": 1, }, }, "range": Array [ - 10, - 13, + 26, + 27, ], - "type": "Identifier", - "value": "Foo", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 31, "line": 1, }, "start": Object { - "column": 14, + "column": 28, "line": 1, }, }, "range": Array [ - 14, - 21, + 28, + 31, ], - "type": "Keyword", - "value": "extends", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 32, "line": 1, }, "start": Object { - "column": 22, + "column": 31, "line": 1, }, }, "range": Array [ - 22, - 25, + 31, + 32, ], - "type": "Identifier", - "value": "Bar", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 34, "line": 1, }, "start": Object { - "column": 26, + "column": 33, "line": 1, }, }, "range": Array [ - 26, - 27, + 33, + 34, ], "type": "Punctuator", "value": "{", @@ -30230,8 +29163,8 @@ Object { }, }, "range": Array [ - 29, - 30, + 36, + 37, ], "type": "Punctuator", "value": "}", @@ -30241,123 +29174,198 @@ Object { } `; -exports[`typescript fixtures/basics/interface-extends-multiple.src 1`] = ` +exports[`typescript fixtures/basics/directive-in-module.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "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, + "body": Array [ + Object { + "directive": "use strict", + "expression": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 15, + 27, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, }, }, - "name": "Bar", "range": Array [ - 22, - 25, + 15, + 28, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, + "type": "ExpressionStatement", }, - "range": Array [ - 22, - 25, - ], - "type": "TSInterfaceHeritage", - }, - Object { - "id": Object { + 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", + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 39, + 40, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 35, + 40, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 12, + "line": 3, }, "start": Object { - "column": 26, - "line": 1, + "column": 2, + "line": 3, }, }, - "name": "Baz", "range": Array [ - 26, - 29, + 31, + 41, ], - "type": "Identifier", + "type": "VariableDeclaration", }, - "loc": Object { - "end": Object { - "column": 29, - "line": 1, + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 44, + 56, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", }, - "start": Object { - "column": 26, - "line": 1, + "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 [ - 26, - 29, - ], - "type": "TSInterfaceHeritage", }, - ], + "range": Array [ + 11, + 59, + ], + "type": "TSModuleBlock", + }, "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 10, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, - "name": "Foo", + "name": "foo", "range": Array [ + 7, 10, - 13, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { "column": 0, @@ -30366,15 +29374,15 @@ Object { }, "range": Array [ 0, - 34, + 59, ], - "type": "TSInterfaceDeclaration", + "type": "TSModuleDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 6, }, "start": Object { "column": 0, @@ -30383,14 +29391,14 @@ Object { }, "range": Array [ 0, - 35, + 60, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { @@ -30400,376 +29408,223 @@ Object { }, "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, + 6, ], "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", + "value": "module", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 10, "line": 1, }, "start": Object { - "column": 22, + "column": 7, "line": 1, }, }, "range": Array [ - 22, - 25, + 7, + 10, ], "type": "Identifier", - "value": "Bar", + "value": "foo", }, 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": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 14, + "line": 2, }, "start": Object { - "column": 26, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 26, - 29, + 15, + 27, ], - "type": "Identifier", - "value": "Baz", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 30, - "line": 1, + "column": 14, + "line": 2, }, }, "range": Array [ - 30, - 31, + 27, + 28, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 5, "line": 3, }, "start": Object { - "column": 0, + "column": 2, "line": 3, }, }, "range": Array [ - 33, + 31, 34, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "var", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/interface-type-parameters.src 1`] = ` -Object { - "body": Array [ Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 21, - ], - "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, + "column": 7, "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 6, + "line": 3, }, }, "range": Array [ - 0, - 21, + 35, + 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, - }, - "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": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "a", }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { "column": 9, - "line": 1, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 3, }, }, "range": Array [ - 0, - 9, + 37, + 38, ], - "type": "Keyword", - "value": "interface", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 11, + "line": 3, }, "start": Object { "column": 10, - "line": 1, + "line": 3, }, }, "range": Array [ - 10, - 13, + 39, + 40, ], - "type": "Identifier", - "value": "Foo", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 12, + "line": 3, }, "start": Object { - "column": 13, - "line": 1, + "column": 11, + "line": 3, }, }, "range": Array [ - 13, - 14, + 40, + 41, ], "type": "Punctuator", - "value": "<", + "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, + "line": 4, }, "start": Object { - "column": 15, - "line": 1, + "column": 2, + "line": 4, }, }, "range": Array [ - 15, - 16, + 44, + 56, ], - "type": "Punctuator", - "value": ">", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 15, + "line": 4, }, "start": Object { - "column": 17, - "line": 1, + "column": 14, + "line": 4, }, }, "range": Array [ - 17, - 18, + 56, + 57, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 5, }, "start": Object { "column": 0, - "line": 3, + "line": 5, }, }, "range": Array [ - 20, - 21, + 58, + 59, ], "type": "Punctuator", "value": "}", @@ -30779,1245 +29634,188 @@ Object { } `; -exports[`typescript fixtures/basics/interface-with-all-property-types.src 1`] = ` +exports[`typescript fixtures/basics/directive-in-namespace.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [ Object { - "computed": false, - "key": Object { + "directive": "use strict", + "expression": Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, - "name": "baa", "range": Array [ - 20, - 23, + 18, + 30, ], - "type": "Identifier", + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", }, "loc": Object { "end": Object { - "column": 16, + "column": 15, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "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": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "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, - }, - }, - "range": Array [ - 43, - 49, - ], - "type": "TSNumberKeyword", - }, - }, - }, - 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": 17, - "line": 4, - }, - "start": Object { - "column": 11, - "line": 4, - }, - }, - "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, + 18, + 31, ], - "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", - }, - }, + "type": "ExpressionStatement", }, 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, + "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", }, - "range": Array [ - 98, - 106, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "init": Object { "loc": Object { "end": Object { - "column": 16, - "line": 6, + "column": 11, + "line": 3, }, "start": Object { "column": 10, - "line": 6, + "line": 3, }, }, "range": Array [ - 100, - 106, + 42, + 43, ], - "type": "TSNumberKeyword", - }, - }, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "range": Array [ - 94, - 116, - ], - "static": false, - "type": "TSIndexSignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 17, - "line": 6, - }, - }, - "range": Array [ - 107, - 115, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 6, - }, - "start": Object { - "column": 19, - "line": 6, - }, - }, - "range": Array [ - 109, - 115, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "index": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 5, - "line": 7, + "raw": "1", + "type": "Literal", + "value": 1, }, - }, - "name": "fff", - "optional": true, - "range": Array [ - 122, - 134, - ], - "type": "Identifier", - "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 17, - "line": 7, + "column": 11, + "line": 3, }, "start": Object { - "column": 9, - "line": 7, + "column": 6, + "line": 3, }, }, "range": Array [ - 126, - 134, + 38, + 43, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 7, - }, - "start": Object { - "column": 11, - "line": 7, - }, - }, - "range": Array [ - 128, - 134, - ], - "type": "TSNumberKeyword", - }, + "type": "VariableDeclarator", }, - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 27, - "line": 7, + "column": 12, + "line": 3, }, "start": Object { - "column": 4, - "line": 7, + "column": 2, + "line": 3, }, }, "range": Array [ - 121, - 144, + 34, + 44, ], - "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", - }, - }, + "type": "VariableDeclaration", }, Object { - "computed": false, - "key": Object { + "expression": Object { "loc": Object { "end": Object { - "column": 7, - "line": 8, + "column": 14, + "line": 4, }, "start": Object { - "column": 4, - "line": 8, + "column": 2, + "line": 4, }, }, - "name": "doo", "range": Array [ - 149, - 152, + 47, + 59, ], - "type": "Identifier", + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", }, "loc": Object { "end": Object { - "column": 16, - "line": 8, + "column": 15, + "line": 4, }, "start": Object { - "column": 4, - "line": 8, + "column": 2, + "line": 4, }, }, - "optional": false, - "params": Array [], "range": Array [ - 149, - 161, + 47, + 60, ], - "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", - }, - }, + "type": "ExpressionStatement", }, - 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", - }, - }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, }, - 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": 14, + "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", - }, - }, - "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", - }, - }, - 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, + }, + "range": Array [ + 14, + 62, + ], + "type": "TSModuleBlock", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, }, "start": Object { "column": 10, "line": 1, }, }, - "name": "Foo", + "name": "foo", "range": Array [ 10, 13, @@ -32027,7 +29825,7 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 14, + "line": 5, }, "start": Object { "column": 0, @@ -32036,15 +29834,15 @@ Object { }, "range": Array [ 0, - 295, + 62, ], - "type": "TSInterfaceDeclaration", + "type": "TSModuleDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 16, + "line": 6, }, "start": Object { "column": 0, @@ -32053,7 +29851,7 @@ Object { }, "range": Array [ 0, - 297, + 63, ], "sourceType": "script", "tokens": Array [ @@ -32072,8 +29870,8 @@ Object { 0, 9, ], - "type": "Keyword", - "value": "interface", + "type": "Identifier", + "value": "namespace", }, Object { "loc": Object { @@ -32091,7 +29889,7 @@ Object { 13, ], "type": "Identifier", - "value": "Foo", + "value": "foo", }, Object { "loc": Object { @@ -32114,38 +29912,20 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 20, - 23, - ], - "type": "Identifier", - "value": "baa", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, + "column": 14, "line": 2, }, "start": Object { - "column": 7, + "column": 2, "line": 2, }, }, "range": Array [ - 23, - 24, + 18, + 30, ], - "type": "Punctuator", - "value": ":", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { @@ -32154,31 +29934,13 @@ Object { "line": 2, }, "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 25, - 31, - ], - "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 15, + "column": 14, "line": 2, }, }, "range": Array [ + 30, 31, - 32, ], "type": "Punctuator", "value": ";", @@ -32186,38 +29948,38 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 5, "line": 3, }, "start": Object { - "column": 4, + "column": 2, "line": 3, }, }, "range": Array [ + 34, 37, - 40, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 7, "line": 3, }, "start": Object { - "column": 7, + "column": 6, "line": 3, }, }, "range": Array [ - 40, - 41, + 38, + 39, ], - "type": "Punctuator", - "value": "?", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { @@ -32231,16 +29993,16 @@ Object { }, }, "range": Array [ + 40, 41, - 42, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 11, "line": 3, }, "start": Object { @@ -32249,26 +30011,26 @@ Object { }, }, "range": Array [ + 42, 43, - 49, ], - "type": "Identifier", - "value": "number", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 12, "line": 3, }, "start": Object { - "column": 16, + "column": 11, "line": 3, }, }, "range": Array [ - 49, - 50, + 43, + 44, ], "type": "Punctuator", "value": ";", @@ -32276,47 +30038,29 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 55, - 56, - ], - "type": "Punctuator", - "value": "[", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, + "column": 14, "line": 4, }, "start": Object { - "column": 5, + "column": 2, "line": 4, }, }, "range": Array [ - 56, + 47, 59, ], - "type": "Identifier", - "value": "bax", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 15, "line": 4, }, "start": Object { - "column": 8, + "column": 14, "line": 4, }, }, @@ -32325,724 +30069,1025 @@ Object { 60, ], "type": "Punctuator", - "value": "]", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 4, + "column": 1, + "line": 5, }, "start": Object { - "column": 9, - "line": 4, + "column": 0, + "line": 5, }, }, "range": Array [ - 60, 61, + 62, ], "type": "Punctuator", - "value": ":", + "value": "}", }, + ], + "type": "Program", +} +`; + +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": 17, - "line": 4, + "column": 22, + "line": 1, }, "start": Object { - "column": 11, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 62, - 68, + 0, + 22, ], - "type": "Identifier", - "value": "string", + "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": 18, - "line": 4, + "column": 6, + "line": 1, }, "start": Object { - "column": 17, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 68, - 69, + 0, + 6, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 5, + "column": 9, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 7, + "line": 1, }, }, "range": Array [ - 74, - 75, + 7, + 9, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "as", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 5, + "column": 19, + "line": 1, }, "start": Object { - "column": 5, - "line": 5, + "column": 10, + "line": 1, }, }, "range": Array [ - 75, - 78, + 10, + 19, ], "type": "Identifier", - "value": "baz", + "value": "namespace", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 21, + "line": 1, }, "start": Object { - "column": 8, - "line": 5, + "column": 20, + "line": 1, }, }, "range": Array [ - 78, - 79, + 20, + 21, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 5, + "column": 22, + "line": 1, }, "start": Object { - "column": 9, - "line": 5, + "column": 21, + "line": 1, }, }, "range": Array [ - 79, - 80, + 21, + 22, ], "type": "Punctuator", - "value": "?", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/export-assignment.src 1`] = ` +Object { + "body": Array [ Object { + "expression": 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": 11, - "line": 5, + "column": 13, + "line": 1, }, "start": Object { - "column": 10, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 80, - 81, + 0, + 13, ], - "type": "Punctuator", - "value": ":", + "type": "TSExportAssignment", }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 5, - }, - "start": Object { - "column": 12, - "line": 5, - }, - }, - "range": Array [ - 82, - 88, - ], - "type": "Identifier", - "value": "string", + ], + "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": 19, - "line": 5, + "column": 6, + "line": 1, }, "start": Object { - "column": 18, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 88, - 89, + 0, + 6, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 6, + "column": 8, + "line": 1, }, "start": Object { - "column": 4, - "line": 6, + "column": 7, + "line": 1, }, }, "range": Array [ - 94, - 95, + 7, + 8, ], "type": "Punctuator", - "value": "[", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 6, + "column": 12, + "line": 1, }, "start": Object { - "column": 5, - "line": 6, + "column": 9, + "line": 1, }, }, "range": Array [ - 95, - 98, + 9, + 12, ], "type": "Identifier", - "value": "eee", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 6, + "column": 13, + "line": 1, }, "start": Object { - "column": 8, - "line": 6, + "column": 12, + "line": 1, }, }, "range": Array [ - 98, - 99, + 12, + 13, ], "type": "Punctuator", - "value": ":", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/export-declare-const-named-enum.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 6, + "declaration": Object { + "const": true, + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 26, + 29, + ], + "type": "Identifier", }, - "start": Object { - "column": 10, - "line": 6, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 21, + "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 [ + 36, + 39, + ], + "type": "Identifier", + }, + "initializer": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 42, + 43, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 36, + 43, + ], + "type": "TSEnumMember", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 49, + 52, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 49, + 52, + ], + "type": "TSEnumMember", + }, + ], + "range": Array [ + 21, + 54, + ], + "type": "TSEnumDeclaration", }, - "range": Array [ - 100, - 106, - ], - "type": "Identifier", - "value": "number", - }, - Object { "loc": Object { "end": Object { - "column": 17, - "line": 6, + "column": 1, + "line": 4, }, "start": Object { - "column": 16, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 106, - 107, + 0, + 54, ], - "type": "Punctuator", - "value": "]", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 55, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 18, - "line": 6, + "column": 6, + "line": 1, }, "start": Object { - "column": 17, - "line": 6, + "column": 0, + "line": 1, }, }, "range": Array [ - 107, - 108, + 0, + 6, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 6, + "column": 14, + "line": 1, }, "start": Object { - "column": 19, - "line": 6, + "column": 7, + "line": 1, }, }, "range": Array [ - 109, - 115, + 7, + 14, ], "type": "Identifier", - "value": "string", + "value": "declare", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 6, + "column": 20, + "line": 1, }, "start": Object { - "column": 25, - "line": 6, + "column": 15, + "line": 1, }, }, "range": Array [ - 115, - 116, + 15, + 20, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 7, + "column": 25, + "line": 1, }, "start": Object { - "column": 4, - "line": 7, + "column": 21, + "line": 1, }, }, "range": Array [ - 121, - 122, + 21, + 25, ], - "type": "Punctuator", - "value": "[", + "type": "Keyword", + "value": "enum", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 7, + "column": 29, + "line": 1, }, "start": Object { - "column": 5, - "line": 7, + "column": 26, + "line": 1, }, }, "range": Array [ - 122, - 125, + 26, + 29, ], "type": "Identifier", - "value": "fff", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "range": Array [ - 125, - 126, - ], - "type": "Punctuator", - "value": "?", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 7, + "column": 31, + "line": 1, }, "start": Object { - "column": 9, - "line": 7, + "column": 30, + "line": 1, }, }, "range": Array [ - 126, - 127, + 30, + 31, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 7, + "column": 7, + "line": 2, }, "start": Object { - "column": 11, - "line": 7, + "column": 4, + "line": 2, }, }, "range": Array [ - 128, - 134, + 36, + 39, ], "type": "Identifier", - "value": "number", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 7, - }, - "start": Object { - "column": 17, - "line": 7, - }, - }, - "range": Array [ - 134, - 135, - ], - "type": "Punctuator", - "value": "]", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 7, + "column": 9, + "line": 2, }, "start": Object { - "column": 18, - "line": 7, + "column": 8, + "line": 2, }, }, "range": Array [ - 135, - 136, + 40, + 41, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 7, + "column": 11, + "line": 2, }, "start": Object { - "column": 20, - "line": 7, + "column": 10, + "line": 2, }, }, "range": Array [ - 137, - 143, + 42, + 43, ], - "type": "Identifier", - "value": "string", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 7, + "column": 12, + "line": 2, }, "start": Object { - "column": 26, - "line": 7, + "column": 11, + "line": 2, }, }, "range": Array [ - 143, - 144, + 43, + 44, ], "type": "Punctuator", - "value": ";", + "value": ",", }, Object { "loc": Object { "end": Object { "column": 7, - "line": 8, + "line": 3, }, "start": Object { "column": 4, - "line": 8, + "line": 3, }, }, "range": Array [ - 149, - 152, + 49, + 52, ], "type": "Identifier", - "value": "doo", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 8, + "column": 1, + "line": 4, }, "start": Object { - "column": 7, - "line": 8, + "column": 0, + "line": 4, }, }, "range": Array [ - 152, - 153, + 53, + 54, ], "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 8, - }, - "start": Object { - "column": 8, - "line": 8, - }, - }, - "range": Array [ - 153, - 154, - ], - "type": "Punctuator", - "value": ")", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/export-declare-named-enum.src 1`] = ` +Object { + "body": Array [ Object { + "declaration": Object { + "declare": true, + "id": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "Foo", + "range": Array [ + 20, + 23, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 15, + "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 [ + 30, + 33, + ], + "type": "Identifier", + }, + "initializer": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 30, + 37, + ], + "type": "TSEnumMember", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 43, + 46, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 43, + 46, + ], + "type": "TSEnumMember", + }, + ], + "range": Array [ + 15, + 48, + ], + "type": "TSEnumDeclaration", + }, "loc": Object { "end": Object { - "column": 10, - "line": 8, + "column": 1, + "line": 4, }, "start": Object { - "column": 9, - "line": 8, + "column": 0, + "line": 1, }, }, "range": Array [ - 154, - 155, + 0, + 48, ], - "type": "Punctuator", - "value": ":", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 49, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 15, - "line": 8, + "column": 6, + "line": 1, }, "start": Object { - "column": 11, - "line": 8, + "column": 0, + "line": 1, }, }, "range": Array [ - 156, - 160, + 0, + 6, ], "type": "Keyword", - "value": "void", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 8, + "column": 14, + "line": 1, }, "start": Object { - "column": 15, - "line": 8, + "column": 7, + "line": 1, }, }, "range": Array [ - 160, - 161, + 7, + 14, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "declare", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 9, + "column": 19, + "line": 1, }, "start": Object { - "column": 4, - "line": 9, + "column": 15, + "line": 1, }, }, "range": Array [ - 166, - 169, + 15, + 19, ], - "type": "Identifier", - "value": "doo", + "type": "Keyword", + "value": "enum", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 9, + "column": 23, + "line": 1, }, "start": Object { - "column": 7, - "line": 9, + "column": 20, + "line": 1, }, }, "range": Array [ - 169, - 170, + 20, + 23, ], - "type": "Punctuator", - "value": "?", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 9, + "column": 25, + "line": 1, }, "start": Object { - "column": 8, - "line": 9, + "column": 24, + "line": 1, }, }, "range": Array [ - 170, - 171, + 24, + 25, ], "type": "Punctuator", - "value": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 9, + "column": 7, + "line": 2, }, "start": Object { - "column": 9, - "line": 9, + "column": 4, + "line": 2, }, }, "range": Array [ - 171, - 172, + 30, + 33, ], "type": "Identifier", - "value": "a", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 9, + "column": 9, + "line": 2, }, "start": Object { - "column": 10, - "line": 9, + "column": 8, + "line": 2, }, }, "range": Array [ - 172, - 173, + 34, + 35, ], "type": "Punctuator", - "value": ",", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 9, + "column": 11, + "line": 2, }, "start": Object { - "column": 12, - "line": 9, + "column": 10, + "line": 2, }, }, "range": Array [ - 174, - 175, + 36, + 37, ], - "type": "Identifier", - "value": "b", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 9, + "column": 12, + "line": 2, }, "start": Object { - "column": 13, - "line": 9, + "column": 11, + "line": 2, }, }, "range": Array [ - 175, - 176, + 37, + 38, ], "type": "Punctuator", "value": ",", @@ -33050,377 +31095,552 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, - "line": 9, + "column": 7, + "line": 3, }, "start": Object { - "column": 15, - "line": 9, + "column": 4, + "line": 3, }, }, "range": Array [ - 177, - 178, + 43, + 46, ], "type": "Identifier", - "value": "c", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 9, + "column": 1, + "line": 4, }, "start": Object { - "column": 16, - "line": 9, + "column": 0, + "line": 4, }, }, "range": Array [ - 178, - 179, + 47, + 48, ], "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, + }, + }, + "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": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + "range": Array [ + 21, + 22, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 20, + 23, + ], + "type": "TSTypeParameterDeclaration", + }, + }, "loc": Object { "end": Object { - "column": 18, - "line": 9, + "column": 1, + "line": 3, }, "start": Object { - "column": 17, - "line": 9, + "column": 0, + "line": 1, }, }, "range": Array [ - 179, - 180, + 0, + 28, ], - "type": "Punctuator", - "value": ":", + "type": "ExportDefaultDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 29, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 23, - "line": 9, + "column": 6, + "line": 1, }, "start": Object { - "column": 19, - "line": 9, + "column": 0, + "line": 1, }, }, "range": Array [ - 181, - 185, + 0, + 6, ], "type": "Keyword", - "value": "void", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 9, + "column": 14, + "line": 1, }, "start": Object { - "column": 23, - "line": 9, + "column": 7, + "line": 1, }, }, "range": Array [ - 185, - 186, + 7, + 14, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 10, + "column": 20, + "line": 1, }, "start": Object { - "column": 4, - "line": 10, + "column": 15, + "line": 1, }, }, "range": Array [ - 191, - 192, + 15, + 20, ], - "type": "Punctuator", - "value": "[", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 10, + "column": 21, + "line": 1, }, "start": Object { - "column": 5, - "line": 10, + "column": 20, + "line": 1, }, }, "range": Array [ - 192, - 195, + 20, + 21, ], - "type": "Identifier", - "value": "loo", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 10, + "column": 22, + "line": 1, }, "start": Object { - "column": 8, - "line": 10, + "column": 21, + "line": 1, }, }, "range": Array [ - 195, - 196, + 21, + 22, ], - "type": "Punctuator", - "value": "]", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 10, + "column": 23, + "line": 1, }, "start": Object { - "column": 9, - "line": 10, + "column": 22, + "line": 1, }, }, "range": Array [ - 196, - 197, + 22, + 23, ], "type": "Punctuator", - "value": "?", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 10, + "column": 25, + "line": 1, }, "start": Object { - "column": 10, - "line": 10, + "column": 24, + "line": 1, }, }, "range": Array [ - 197, - 198, + 24, + 25, ], "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 10, - }, - "start": Object { - "column": 11, - "line": 10, - }, - }, - "range": Array [ - 198, - 199, - ], - "type": "Identifier", - "value": "a", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 10, + "column": 1, + "line": 3, }, "start": Object { - "column": 12, - "line": 10, + "column": 0, + "line": 3, }, }, "range": Array [ - 199, - 200, + 27, + 28, ], "type": "Punctuator", - "value": ",", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/export-default-class-with-multiple-generics.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 10, - }, - "start": Object { - "column": 14, - "line": 10, + "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", }, - }, - "range": Array [ - 201, - 202, - ], - "type": "Identifier", - "value": "b", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 10, + "id": null, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 1, + }, }, - "start": Object { - "column": 15, - "line": 10, + "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": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + "range": Array [ + 21, + 22, + ], + "type": "TSTypeParameter", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 24, + 25, + ], + "type": "Identifier", + }, + "range": Array [ + 24, + 25, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 20, + 26, + ], + "type": "TSTypeParameterDeclaration", }, }, - "range": Array [ - 202, - 203, - ], - "type": "Punctuator", - "value": ",", - }, - Object { "loc": Object { "end": Object { - "column": 18, - "line": 10, + "column": 1, + "line": 3, }, "start": Object { - "column": 17, - "line": 10, + "column": 0, + "line": 1, }, }, "range": Array [ - 204, - 205, + 0, + 31, ], - "type": "Identifier", - "value": "c", + "type": "ExportDefaultDeclaration", }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 10, - }, - "start": Object { - "column": 18, - "line": 10, - }, - }, - "range": Array [ - 205, - 206, - ], - "type": "Punctuator", - "value": ")", + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 10, - }, - "start": Object { - "column": 19, - "line": 10, - }, - }, - "range": Array [ - 206, - 207, - ], - "type": "Punctuator", - "value": ":", + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 32, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 25, - "line": 10, + "column": 6, + "line": 1, }, "start": Object { - "column": 21, - "line": 10, + "column": 0, + "line": 1, }, }, "range": Array [ - 208, - 212, + 0, + 6, ], "type": "Keyword", - "value": "void", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 10, + "column": 14, + "line": 1, }, "start": Object { - "column": 25, - "line": 10, + "column": 7, + "line": 1, }, }, "range": Array [ - 212, - 213, + 7, + 14, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "default", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 11, + "column": 20, + "line": 1, }, "start": Object { - "column": 4, - "line": 11, + "column": 15, + "line": 1, }, }, "range": Array [ - 218, - 221, + 15, + 20, ], - "type": "Identifier", - "value": "boo", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 11, + "column": 21, + "line": 1, }, "start": Object { - "column": 7, - "line": 11, + "column": 20, + "line": 1, }, }, "range": Array [ - 221, - 222, + 20, + 21, ], "type": "Punctuator", "value": "<", @@ -33428,467 +31648,734 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, - "line": 11, + "column": 22, + "line": 1, }, "start": Object { - "column": 8, - "line": 11, + "column": 21, + "line": 1, }, }, "range": Array [ - 222, - 223, + 21, + 22, ], "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": "T", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 11, + "column": 23, + "line": 1, }, "start": Object { - "column": 10, - "line": 11, + "column": 22, + "line": 1, }, }, "range": Array [ - 224, - 225, + 22, + 23, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 11, + "column": 25, + "line": 1, }, "start": Object { - "column": 11, - "line": 11, + "column": 24, + "line": 1, }, }, "range": Array [ - 225, - 226, + 24, + 25, ], "type": "Identifier", - "value": "a", + "value": "U", }, 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": ",", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 11, + "column": 28, + "line": 1, }, "start": Object { - "column": 14, - "line": 11, + "column": 27, + "line": 1, }, }, "range": Array [ - 228, - 229, + 27, + 28, ], - "type": "Identifier", - "value": "b", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 11, + "column": 1, + "line": 3, }, "start": Object { - "column": 15, - "line": 11, + "column": 0, + "line": 3, }, }, "range": Array [ - 229, - 230, + 30, + 31, ], "type": "Punctuator", - "value": ",", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/export-named-class-with-generic.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 11, + "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", }, - "start": Object { - "column": 17, - "line": 11, + "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 [ - 231, - 232, - ], - "type": "Identifier", - "value": "c", - }, - Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 7, + "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": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + }, + "range": Array [ + 17, + 18, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 16, + 19, + ], + "type": "TSTypeParameterDeclaration", + }, + }, "loc": Object { "end": Object { - "column": 19, - "line": 11, + "column": 1, + "line": 3, }, "start": Object { - "column": 18, - "line": 11, + "column": 0, + "line": 1, }, }, "range": Array [ - 232, - 233, + 0, + 24, ], - "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, + 25, + ], + "sourceType": "module", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 20, - "line": 11, + "column": 6, + "line": 1, }, "start": Object { - "column": 19, - "line": 11, + "column": 0, + "line": 1, }, }, "range": Array [ - 233, - 234, + 0, + 6, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 11, + "column": 12, + "line": 1, }, "start": Object { - "column": 21, - "line": 11, + "column": 7, + "line": 1, }, }, "range": Array [ - 235, - 239, + 7, + 12, ], "type": "Keyword", - "value": "void", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 11, + "column": 16, + "line": 1, }, "start": Object { - "column": 25, - "line": 11, + "column": 13, + "line": 1, }, }, "range": Array [ - 239, - 240, + 13, + 16, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 12, + "column": 17, + "line": 1, }, "start": Object { - "column": 4, - "line": 12, + "column": 16, + "line": 1, }, }, "range": Array [ - 245, - 248, + 16, + 17, ], - "type": "Keyword", - "value": "new", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 12, + "column": 18, + "line": 1, }, "start": Object { - "column": 8, - "line": 12, + "column": 17, + "line": 1, }, }, "range": Array [ - 249, - 250, + 17, + 18, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 12, + "column": 19, + "line": 1, }, "start": Object { - "column": 9, - "line": 12, + "column": 18, + "line": 1, }, }, "range": Array [ - 250, - 251, + 18, + 19, ], - "type": "Identifier", - "value": "a", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 12, + "column": 21, + "line": 1, }, "start": Object { - "column": 10, - "line": 12, + "column": 20, + "line": 1, }, }, "range": Array [ - 251, - 252, + 20, + 21, ], "type": "Punctuator", - "value": ",", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 12, + "column": 1, + "line": 3, }, "start": Object { - "column": 12, - "line": 12, + "column": 0, + "line": 3, }, }, "range": Array [ - 253, - 254, + 23, + 24, ], - "type": "Identifier", - "value": "b", + "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": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 17, + 18, + ], + "type": "Identifier", + }, + "range": Array [ + 17, + 18, + ], + "type": "TSTypeParameter", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + "range": Array [ + 20, + 21, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 16, + 22, + ], + "type": "TSTypeParameterDeclaration", + }, + }, "loc": Object { "end": Object { - "column": 14, - "line": 12, + "column": 1, + "line": 3, }, "start": Object { - "column": 13, - "line": 12, + "column": 0, + "line": 1, }, }, "range": Array [ - 254, - 255, + 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": 15, - "line": 12, + "column": 6, + "line": 1, }, "start": Object { - "column": 14, - "line": 12, + "column": 0, + "line": 1, }, }, "range": Array [ - 255, - 256, + 0, + 6, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 12, + "column": 12, + "line": 1, }, "start": Object { - "column": 15, - "line": 12, + "column": 7, + "line": 1, }, }, "range": Array [ - 256, - 257, + 7, + 12, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 12, + "column": 16, + "line": 1, }, "start": Object { - "column": 17, - "line": 12, + "column": 13, + "line": 1, }, }, "range": Array [ - 258, - 264, + 13, + 16, ], "type": "Identifier", - "value": "string", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 12, + "column": 17, + "line": 1, }, "start": Object { - "column": 23, - "line": 12, + "column": 16, + "line": 1, }, }, "range": Array [ - 264, - 265, + 16, + 17, ], "type": "Punctuator", - "value": ";", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 13, + "column": 18, + "line": 1, }, "start": Object { - "column": 4, - "line": 13, + "column": 17, + "line": 1, }, }, "range": Array [ - 270, - 273, + 17, + 18, ], - "type": "Keyword", - "value": "new", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 13, + "column": 19, + "line": 1, }, "start": Object { - "column": 8, - "line": 13, + "column": 18, + "line": 1, }, }, "range": Array [ - 274, - 275, + 18, + 19, ], "type": "Punctuator", - "value": "<", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 13, + "column": 21, + "line": 1, }, "start": Object { - "column": 9, - "line": 13, + "column": 20, + "line": 1, }, }, "range": Array [ - 275, - 276, + 20, + 21, ], "type": "Identifier", - "value": "F", + "value": "U", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 13, + "column": 22, + "line": 1, }, "start": Object { - "column": 10, - "line": 13, + "column": 21, + "line": 1, }, }, "range": Array [ - 276, - 277, + 21, + 22, ], "type": "Punctuator", "value": ">", @@ -33896,179 +32383,35 @@ Object { 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": 13, - }, - "start": Object { - "column": 12, - "line": 13, - }, - }, - "range": Array [ - 278, - 279, - ], - "type": "Identifier", - "value": "a", - }, - 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, + "column": 24, + "line": 1, }, "start": Object { - "column": 26, - "line": 13, + "column": 23, + "line": 1, }, }, "range": Array [ - 292, - 293, + 23, + 24, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 14, + "line": 3, }, "start": Object { "column": 0, - "line": 14, + "line": 3, }, }, "range": Array [ - 294, - 295, + 26, + 27, ], "type": "Punctuator", "value": "}", @@ -34078,17 +32421,81 @@ Object { } `; -exports[`typescript fixtures/basics/interface-with-construct-signature-with-parameter-accessibility.src 1`] = ` +exports[`typescript fixtures/basics/export-named-enum.src 1`] = ` Object { "body": Array [ Object { - "abstract": 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 { + "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": 30, + "column": 11, "line": 2, }, "start": Object { @@ -34096,127 +32503,58 @@ Object { "line": 2, }, }, - "params": Array [ - Object { - "accessibility": "public", - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, + "range": Array [ + 22, + 29, + ], + "type": "TSEnumMember", + }, + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, }, - "parameter": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "name": "x", - "range": Array [ - 33, - 34, - ], - "type": "Identifier", + "start": Object { + "column": 4, + "line": 3, }, - "range": Array [ - 26, - 34, - ], - "type": "TSParameterProperty", }, - Object { - "accessibility": "private", - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "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 [ - 36, - 45, - ], - "type": "TSParameterProperty", + "name": "bar", + "range": Array [ + 35, + 38, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 7, + "line": 3, }, - ], + "start": Object { + "column": 4, + "line": 3, + }, + }, "range": Array [ - 21, - 47, + 35, + 38, ], - "type": "TSConstructSignature", - "typeAnnotation": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 1, + "type": "TSEnumMember", }, - }, - "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, + 7, + 40, ], - "type": "Identifier", + "type": "TSEnumDeclaration", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 4, }, "start": Object { "column": 0, @@ -34225,14 +32563,16 @@ Object { }, "range": Array [ 0, - 49, + 40, ], - "type": "TSInterfaceDeclaration", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, + "column": 1, "line": 4, }, "start": Object { @@ -34242,14 +32582,14 @@ Object { }, "range": Array [ 0, - 50, + 40, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { @@ -34259,43 +32599,61 @@ Object { }, "range": Array [ 0, - 9, + 6, ], "type": "Keyword", - "value": "interface", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 11, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ - 10, - 14, + 7, + 11, ], - "type": "Identifier", - "value": "Test", + "type": "Keyword", + "value": "enum", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 15, "line": 1, }, "start": Object { - "column": 15, + "column": 12, "line": 1, }, }, "range": Array [ + 12, 15, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ 16, + 17, ], "type": "Punctuator", "value": "{", @@ -34312,11 +32670,11 @@ Object { }, }, "range": Array [ - 21, - 24, + 22, + 25, ], - "type": "Keyword", - "value": "new", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { @@ -34330,152 +32688,80 @@ Object { }, }, "range": Array [ - 25, 26, + 27, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 11, "line": 2, }, "start": Object { - "column": 9, + "column": 10, "line": 2, }, }, "range": Array [ - 26, - 32, + 28, + 29, ], - "type": "Keyword", - "value": "public", + "type": "Numeric", + "value": "1", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 12, "line": 2, }, "start": Object { - "column": 16, + "column": 11, "line": 2, }, }, "range": Array [ - 33, - 34, + 29, + 30, ], - "type": "Identifier", - "value": "x", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 17, - "line": 2, + "column": 4, + "line": 3, }, }, "range": Array [ - 34, 35, + 38, ], - "type": "Punctuator", - "value": ",", + "type": "Identifier", + "value": "bar", }, 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, + "column": 1, + "line": 4, }, "start": Object { "column": 0, - "line": 3, + "line": 4, }, }, "range": Array [ - 48, - 49, + 39, + 40, ], "type": "Punctuator", "value": "}", @@ -34485,142 +32771,102 @@ Object { } `; -exports[`typescript fixtures/basics/interface-with-extends-type-parameters.src 1`] = ` +exports[`typescript fixtures/basics/export-type-alias-declaration.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, - "body": Object { - "body": Array [], + "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": 1, - "line": 3, + "column": 40, + "line": 1, }, "start": Object { - "column": 32, + "column": 7, "line": 1, }, }, "range": Array [ - 32, - 36, + 7, + 40, ], - "type": "TSInterfaceBody", - }, - "heritage": Array [ - Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "name": "Bar", - "range": Array [ - 25, - 28, - ], - "type": "Identifier", - }, + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 28, + "column": 39, "line": 1, }, "start": Object { - "column": 25, + "column": 24, "line": 1, }, }, "range": Array [ - 25, - 28, + 24, + 39, ], - "type": "TSInterfaceHeritage", - "typeParameters": Object { - "loc": Object { - "end": Object { - "column": 31, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, + "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", }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 30, - "line": 1, - }, - "start": Object { - "column": 29, - "line": 1, - }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "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", + "start": Object { + "column": 33, + "line": 1, }, }, - ], - "range": Array [ - 28, - 31, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - ], - "id": Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, + "range": Array [ + 33, + 39, + ], + "type": "TSNumberKeyword", + }, + ], }, - "name": "Foo", - "range": Array [ - 10, - 13, - ], - "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 40, + "line": 1, }, "start": Object { "column": 0, @@ -34629,52 +32875,17 @@ Object { }, "range": Array [ 0, - 36, + 40, ], - "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", - }, + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 4, + "column": 40, + "line": 1, }, "start": Object { "column": 0, @@ -34683,14 +32894,14 @@ Object { }, "range": Array [ 0, - 37, + 40, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { @@ -34700,136 +32911,64 @@ Object { }, "range": Array [ 0, - 9, + 6, ], "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": "<", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 11, "line": 1, }, "start": Object { - "column": 14, + "column": 7, "line": 1, }, }, "range": Array [ - 14, - 15, + 7, + 11, ], "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", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 21, "line": 1, }, "start": Object { - "column": 25, + "column": 12, "line": 1, }, }, "range": Array [ - 25, - 28, + 12, + 21, ], "type": "Identifier", - "value": "Bar", + "value": "TestAlias", }, 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 { @@ -34838,175 +32977,226 @@ Object { "line": 1, }, "start": Object { - "column": 29, + "column": 24, "line": 1, }, }, "range": Array [ - 29, + 24, 30, ], "type": "Identifier", - "value": "J", + "value": "string", }, 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": 33, + "column": 39, "line": 1, }, "start": Object { - "column": 32, + "column": 33, "line": 1, }, }, "range": Array [ - 32, 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 [ - 35, - 36, + 39, + 40, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/interface-with-generic.src 1`] = ` +exports[`typescript fixtures/basics/export-type-class-declaration.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 1, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 1, + "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", }, - "range": Array [ - 18, - 21, - ], - "type": "TSInterfaceBody", - }, - "heritage": Array [], - "id": Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 2, + "line": 3, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, - "name": "Test", "range": Array [ - 10, - 14, + 7, + 51, ], - "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, - }, - }, - "params": Array [ - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, + "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", }, - "start": Object { - "column": 15, - "line": 1, + "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", + }, }, }, - "name": "T", - "range": Array [ - 15, - 16, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 14, - 17, - ], - "type": "TSTypeParameterDeclaration", + ], + "range": Array [ + 29, + 50, + ], + "type": "TSTypeLiteral", + }, + }, + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, }, + "range": Array [ + 0, + 51, + ], + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, + "column": 2, "line": 3, }, "start": Object { @@ -35016,14 +33206,14 @@ Object { }, "range": Array [ 0, - 22, + 51, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { @@ -35033,230 +33223,326 @@ Object { }, "range": Array [ 0, - 9, + 6, ], "type": "Keyword", - "value": "interface", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 11, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ - 10, - 14, + 7, + 11, ], "type": "Identifier", - "value": "Test", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 26, "line": 1, }, "start": Object { - "column": 14, + "column": 12, "line": 1, }, }, "range": Array [ - 14, - 15, + 12, + 26, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "TestClassProps", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 28, "line": 1, }, "start": Object { - "column": 15, + "column": 27, "line": 1, }, }, "range": Array [ - 15, - 16, + 27, + 28, ], - "type": "Identifier", - "value": "T", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 30, "line": 1, }, "start": Object { - "column": 16, + "column": 29, "line": 1, }, }, "range": Array [ - 16, - 17, + 29, + 30, ], "type": "Punctuator", - "value": ">", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 9, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 4, + "line": 2, }, }, "range": Array [ - 18, - 19, + 35, + 40, + ], + "type": "Identifier", + "value": "count", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 40, + 41, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 17, "line": 2, }, "start": Object { - "column": 0, + "column": 11, "line": 2, }, }, "range": Array [ - 20, - 21, + 42, + 48, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, ], "type": "Punctuator", "value": "}", }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 1, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": ";", + }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/interface-with-jsdoc.src 1`] = ` +exports[`typescript fixtures/basics/export-type-function-declaration.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, - "body": Object { - "body": Array [ - Object { - "computed": false, - "key": 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": 47, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 47, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 7, - "line": 6, + "column": 37, + "line": 1, }, "start": Object { - "column": 4, - "line": 6, + "column": 28, + "line": 1, }, }, - "name": "foo", + "name": "a", "range": Array [ - 76, - 79, + 28, + 37, ], "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 6, - }, - "start": Object { - "column": 4, - "line": 6, - }, - }, - "optional": false, - "params": Array [ - Object { + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 11, - "line": 6, + "column": 37, + "line": 1, }, "start": Object { - "column": 8, - "line": 6, + "column": 29, + "line": 1, }, }, - "name": "bar", "range": Array [ - 80, - 83, + 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 [ + 27, + 46, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, "range": Array [ - 76, - 85, + 39, + 46, ], - "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, + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 46, + ], + "type": "TSVoidKeyword", + }, }, + "type": "TSFunctionType", }, - "name": "Test", - "range": Array [ - 10, - 14, - ], - "type": "Identifier", }, "loc": Object { "end": Object { - "column": 1, - "line": 7, + "column": 47, + "line": 1, }, "start": Object { "column": 0, @@ -35265,15 +33551,17 @@ Object { }, "range": Array [ 0, - 87, + 47, ], - "type": "TSInterfaceDeclaration", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 8, + "column": 47, + "line": 1, }, "start": Object { "column": 0, @@ -35282,14 +33570,14 @@ Object { }, "range": Array [ 0, - 88, + 47, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { @@ -35299,79 +33587,79 @@ Object { }, "range": Array [ 0, - 9, + 6, ], "type": "Keyword", - "value": "interface", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 11, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ - 10, - 14, + 7, + 11, ], "type": "Identifier", - "value": "Test", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 24, "line": 1, }, "start": Object { - "column": 15, + "column": 12, "line": 1, }, }, "range": Array [ - 15, - 16, + 12, + 24, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "TestCallback", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 6, + "column": 26, + "line": 1, }, "start": Object { - "column": 4, - "line": 6, + "column": 25, + "line": 1, }, }, "range": Array [ - 76, - 79, + 25, + 26, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 6, + "column": 28, + "line": 1, }, "start": Object { - "column": 7, - "line": 6, + "column": 27, + "line": 1, }, }, "range": Array [ - 79, - 80, + 27, + 28, ], "type": "Punctuator", "value": "(", @@ -35379,35 +33667,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, - "line": 6, + "column": 29, + "line": 1, }, "start": Object { - "column": 8, - "line": 6, + "column": 28, + "line": 1, }, }, "range": Array [ - 80, - 83, + 28, + 29, ], "type": "Identifier", - "value": "bar", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 6, + "column": 30, + "line": 1, }, "start": Object { - "column": 11, - "line": 6, + "column": 29, + "line": 1, }, }, "range": Array [ - 83, - 84, + 29, + 30, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 38, ], "type": "Punctuator", "value": ")", @@ -35415,325 +33739,607 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, - "line": 6, + "column": 41, + "line": 1, }, "start": Object { - "column": 12, - "line": 6, + "column": 39, + "line": 1, }, }, "range": Array [ - 84, - 85, + 39, + 41, ], "type": "Punctuator", - "value": ";", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 7, + "column": 46, + "line": 1, }, "start": Object { - "column": 0, - "line": 7, + "column": 42, + "line": 1, }, }, "range": Array [ - 86, - 87, + 42, + 46, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 47, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/interface-with-optional-properties.src 1`] = ` +exports[`typescript fixtures/basics/function-overloads.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, - "body": Object { - "body": Array [ + "declaration": Object { + "async": false, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ Object { - "computed": false, - "key": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 18, + 27, + ], + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 19, + "line": 1, }, }, - "name": "foo", "range": Array [ - 21, - 24, + 19, + 27, ], - "type": "Identifier", + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 27, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 7, + 37, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, }, + }, + "range": Array [ + 28, + 36, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 36, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 30, + "line": 1, }, }, - "optional": true, "range": Array [ - 21, - 26, + 30, + 36, ], - "type": "TSPropertySignature", + "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 [ - 31, - 34, - ], - "type": "Identifier", + }, + "type": "TSDeclareFunction", + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + Object { + "declaration": Object { + "async": false, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, }, + }, + "name": "f", + "range": Array [ + 54, + 55, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 17, - "line": 3, + "column": 27, + "line": 2, }, "start": Object { - "column": 4, - "line": 3, + "column": 18, + "line": 2, }, }, - "optional": true, + "name": "x", "range": Array [ - 31, - 44, + 56, + 65, ], - "type": "TSPropertySignature", + "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 27, + "line": 2, }, "start": Object { - "column": 8, - "line": 3, + "column": 19, + "line": 2, }, }, "range": Array [ - 35, - 43, + 57, + 65, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 27, + "line": 2, }, "start": Object { - "column": 10, - "line": 3, + "column": 21, + "line": 2, }, }, "range": Array [ - 37, - 43, + 59, + 65, ], "type": "TSStringKeyword", }, }, }, - Object { - "computed": false, - "key": Object { + ], + "range": Array [ + 45, + 75, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 66, + 74, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 68, + 74, + ], + "type": "TSStringKeyword", + }, + }, + "type": "TSDeclareFunction", + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 38, + 75, + ], + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", + }, + Object { + "declaration": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "name": "x", + "range": Array [ + 142, + 143, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 7, + "column": 11, "line": 4, }, "start": Object { - "column": 4, + "column": 2, "line": 4, }, }, - "name": "baz", "range": Array [ - 49, - 52, + 135, + 144, ], - "type": "Identifier", + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 55, + "line": 3, + }, + }, + "range": Array [ + 131, + 146, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, }, + }, + "name": "f", + "range": Array [ + 92, + 93, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 7, + "line": 3, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 34, - "line": 4, + "column": 36, + "line": 3, }, "start": Object { - "column": 4, - "line": 4, + "column": 18, + "line": 3, }, }, - "optional": true, - "params": Array [ - Object { + "name": "x", + "range": Array [ + 94, + 112, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 95, + 112, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 12, - "line": 4, + "column": 36, + "line": 3, }, "start": Object { - "column": 9, - "line": 4, + "column": 21, + "line": 3, }, }, - "name": "foo", "range": Array [ - 54, - 57, - ], - "type": "Identifier", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 14, - "line": 4, - }, - }, - "name": "bar", - "optional": true, - "range": Array [ - 59, - 71, + 97, + 112, ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 4, - }, - "start": Object { - "column": 18, - "line": 4, + "type": "TSUnionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, }, + "range": Array [ + 97, + 103, + ], + "type": "TSStringKeyword", }, - "range": Array [ - 63, - 71, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + Object { "loc": Object { "end": Object { - "column": 26, - "line": 4, + "column": 36, + "line": 3, }, "start": Object { - "column": 20, - "line": 4, + "column": 30, + "line": 3, }, }, "range": Array [ - 65, - 71, + 106, + 112, ], - "type": "TSStringKeyword", + "type": "TSNumberKeyword", + }, + ], + }, + }, + }, + ], + "range": Array [ + 83, + 146, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 3, + }, + "start": Object { + "column": 37, + "line": 3, + }, + }, + "range": Array [ + 113, + 130, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 3, + }, + "start": Object { + "column": 39, + "line": 3, + }, + }, + "range": Array [ + 115, + 130, + ], + "type": "TSUnionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 3, + }, + "start": Object { + "column": 39, + "line": 3, }, }, + "range": Array [ + 115, + 121, + ], + "type": "TSStringKeyword", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 4, + "column": 54, + "line": 3, }, "start": Object { - "column": 28, - "line": 4, + "column": 48, + "line": 3, }, }, - "name": "baz", - "optional": true, "range": Array [ - 73, - 76, + 124, + 130, ], - "type": "Identifier", + "type": "TSNumberKeyword", }, ], - "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", + "type": "FunctionDeclaration", }, "loc": Object { "end": Object { @@ -35742,14 +34348,16 @@ Object { }, "start": Object { "column": 0, - "line": 1, + "line": 3, }, }, "range": Array [ - 0, - 81, + 76, + 146, ], - "type": "TSInterfaceDeclaration", + "source": null, + "specifiers": Array [], + "type": "ExportNamedDeclaration", }, ], "loc": Object { @@ -35764,14 +34372,14 @@ Object { }, "range": Array [ 0, - 82, + 147, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 6, "line": 1, }, "start": Object { @@ -35781,151 +34389,151 @@ Object { }, "range": Array [ 0, - 9, + 6, ], "type": "Keyword", - "value": "interface", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 15, "line": 1, }, "start": Object { - "column": 10, + "column": 7, "line": 1, }, }, "range": Array [ - 10, - 14, + 7, + 15, ], - "type": "Identifier", - "value": "test", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 17, "line": 1, }, "start": Object { - "column": 15, + "column": 16, "line": 1, }, }, "range": Array [ - 15, 16, + 17, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "f", }, 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 [ - 21, - 24, + 17, + 18, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "(", }, 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 [ - 24, - 25, + 18, + 19, ], - "type": "Punctuator", - "value": "?", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ - 25, - 26, + 19, + 20, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 27, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 21, + "line": 1, }, }, "range": Array [ - 31, - 34, + 21, + 27, ], "type": "Identifier", - "value": "bar", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 27, + "line": 1, }, }, "range": Array [ - 34, - 35, + 27, + 28, ], "type": "Punctuator", - "value": "?", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 29, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 28, + "line": 1, }, }, "range": Array [ - 35, - 36, + 28, + 29, ], "type": "Punctuator", "value": ":", @@ -35933,35 +34541,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 36, + "line": 1, }, "start": Object { - "column": 10, - "line": 3, + "column": 30, + "line": 1, }, }, "range": Array [ - 37, - 43, + 30, + 36, ], "type": "Identifier", - "value": "string", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 3, + "column": 37, + "line": 1, }, "start": Object { - "column": 16, - "line": 3, + "column": 36, + "line": 1, }, }, "range": Array [ - 43, - 44, + 36, + 37, ], "type": "Punctuator", "value": ";", @@ -35969,53 +34577,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, - "line": 4, + "column": 6, + "line": 2, }, "start": Object { - "column": 4, - "line": 4, + "column": 0, + "line": 2, }, }, "range": Array [ - 49, - 52, + 38, + 44, ], - "type": "Identifier", - "value": "baz", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 4, + "column": 15, + "line": 2, }, "start": Object { "column": 7, - "line": 4, + "line": 2, }, }, "range": Array [ - 52, + 45, 53, ], - "type": "Punctuator", - "value": "?", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 4, + "column": 17, + "line": 2, }, "start": Object { - "column": 8, - "line": 4, + "column": 16, + "line": 2, }, }, "range": Array [ - 53, 54, + 55, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 55, + 56, ], "type": "Punctuator", "value": "(", @@ -36023,30 +34649,30 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, - "line": 4, + "column": 19, + "line": 2, }, "start": Object { - "column": 9, - "line": 4, + "column": 18, + "line": 2, }, }, "range": Array [ - 54, + 56, 57, ], "type": "Identifier", - "value": "foo", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 20, + "line": 2, }, "start": Object { - "column": 12, - "line": 4, + "column": 19, + "line": 2, }, }, "range": Array [ @@ -36054,58 +34680,58 @@ Object { 58, ], "type": "Punctuator", - "value": ",", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 4, + "column": 27, + "line": 2, }, "start": Object { - "column": 14, - "line": 4, + "column": 21, + "line": 2, }, }, "range": Array [ 59, - 62, + 65, ], "type": "Identifier", - "value": "bar", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 4, + "column": 28, + "line": 2, }, "start": Object { - "column": 17, - "line": 4, + "column": 27, + "line": 2, }, }, "range": Array [ - 62, - 63, + 65, + 66, ], "type": "Punctuator", - "value": "?", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 4, + "column": 29, + "line": 2, }, "start": Object { - "column": 18, - "line": 4, + "column": 28, + "line": 2, }, }, "range": Array [ - 63, - 64, + 66, + 67, ], "type": "Punctuator", "value": ":", @@ -36113,17 +34739,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 26, - "line": 4, + "column": 36, + "line": 2, }, "start": Object { - "column": 20, - "line": 4, + "column": 30, + "line": 2, }, }, "range": Array [ - 65, - 71, + 68, + 74, ], "type": "Identifier", "value": "string", @@ -36131,89 +34757,341 @@ Object { Object { "loc": Object { "end": Object { - "column": 27, - "line": 4, + "column": 37, + "line": 2, }, "start": Object { - "column": 26, - "line": 4, + "column": 36, + "line": 2, }, }, "range": Array [ - 71, - 72, + 74, + 75, ], "type": "Punctuator", - "value": ",", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 4, + "column": 6, + "line": 3, }, "start": Object { - "column": 28, - "line": 4, + "column": 0, + "line": 3, }, }, "range": Array [ - 73, 76, + 82, ], - "type": "Identifier", - "value": "baz", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 4, + "column": 15, + "line": 3, }, "start": Object { - "column": 31, - "line": 4, + "column": 7, + "line": 3, }, }, "range": Array [ - 76, - 77, + 83, + 91, ], - "type": "Punctuator", - "value": "?", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 4, + "column": 17, + "line": 3, }, "start": Object { - "column": 32, - "line": 4, + "column": 16, + "line": 3, }, }, "range": Array [ - 77, - 78, + 92, + 93, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "f", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 4, + "column": 18, + "line": 3, }, "start": Object { - "column": 33, - "line": 4, - }, + "column": 17, + "line": 3, + }, }, "range": Array [ - 78, - 79, + 93, + 94, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 94, + 95, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 95, + 96, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 97, + 103, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 3, + }, + }, + "range": Array [ + 104, + 105, + ], + "type": "Punctuator", + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 3, + }, + }, + "range": Array [ + 106, + 112, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 3, + }, + "start": Object { + "column": 36, + "line": 3, + }, + }, + "range": Array [ + 112, + 113, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 3, + }, + "start": Object { + "column": 37, + "line": 3, + }, + }, + "range": Array [ + 113, + 114, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 3, + }, + "start": Object { + "column": 39, + "line": 3, + }, + }, + "range": Array [ + 115, + 121, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 3, + }, + "start": Object { + "column": 46, + "line": 3, + }, + }, + "range": Array [ + 122, + 123, + ], + "type": "Punctuator", + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 3, + }, + "start": Object { + "column": 48, + "line": 3, + }, + }, + "range": Array [ + 124, + 130, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 3, + }, + "start": Object { + "column": 55, + "line": 3, + }, + }, + "range": Array [ + 131, + 132, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 2, + "line": 4, + }, + }, + "range": Array [ + 135, + 141, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "range": Array [ + 142, + 143, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 4, + }, + "start": Object { + "column": 10, + "line": 4, + }, + }, + "range": Array [ + 143, + 144, ], "type": "Punctuator", "value": ";", @@ -36230,8 +35108,8 @@ Object { }, }, "range": Array [ - 80, - 81, + 145, + 146, ], "type": "Punctuator", "value": "}", @@ -36241,19 +35119,36 @@ Object { } `; -exports[`typescript fixtures/basics/interface-without-type-annotation.src 1`] = ` +exports[`typescript fixtures/basics/function-with-await.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, + "async": true, "body": Object { "body": Array [ Object { - "computed": false, - "key": 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": 7, + "column": 16, "line": 2, }, "start": Object { @@ -36261,16 +35156,15 @@ Object { "line": 2, }, }, - "name": "foo", "range": Array [ - 21, - 24, + 34, + 46, ], - "type": "Identifier", + "type": "AwaitExpression", }, "loc": Object { "end": Object { - "column": 8, + "column": 17, "line": 2, }, "start": Object { @@ -36279,10 +35173,10 @@ Object { }, }, "range": Array [ - 21, - 25, + 34, + 47, ], - "type": "TSPropertySignature", + "type": "ExpressionStatement", }, ], "loc": Object { @@ -36291,32 +35185,33 @@ Object { "line": 3, }, "start": Object { - "column": 15, + "column": 28, "line": 1, }, }, "range": Array [ - 15, - 27, + 28, + 49, ], - "type": "TSInterfaceBody", + "type": "BlockStatement", }, - "heritage": Array [], + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 14, + "column": 19, "line": 1, }, "start": Object { - "column": 10, + "column": 15, "line": 1, }, }, - "name": "test", + "name": "hope", "range": Array [ - 10, - 14, + 15, + 19, ], "type": "Identifier", }, @@ -36330,11 +35225,31 @@ Object { "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, - 27, + 49, ], - "type": "TSInterfaceDeclaration", + "type": "FunctionDeclaration", }, ], "loc": Object { @@ -36349,14 +35264,14 @@ Object { }, "range": Array [ 0, - 28, + 50, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 1, }, "start": Object { @@ -36366,10 +35281,10 @@ Object { }, "range": Array [ 0, - 9, + 5, ], - "type": "Keyword", - "value": "interface", + "type": "Identifier", + "value": "async", }, Object { "loc": Object { @@ -36378,21 +35293,21 @@ Object { "line": 1, }, "start": Object { - "column": 10, + "column": 6, "line": 1, }, }, "range": Array [ - 10, + 6, 14, ], - "type": "Identifier", - "value": "test", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 19, "line": 1, }, "start": Object { @@ -36402,7 +35317,79 @@ Object { }, "range": Array [ 15, - 16, + 19, + ], + "type": "Identifier", + "value": "hope", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 26, + ], + "type": "Identifier", + "value": "future", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 29, ], "type": "Punctuator", "value": "{", @@ -36410,7 +35397,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 2, }, "start": Object { @@ -36419,26 +35406,44 @@ Object { }, }, "range": Array [ - 21, - 24, + 34, + 39, ], "type": "Identifier", - "value": "foo", + "value": "await", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 16, "line": 2, }, "start": Object { - "column": 7, + "column": 10, "line": 2, }, }, "range": Array [ - 24, - 25, + 40, + 46, + ], + "type": "Identifier", + "value": "future", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, ], "type": "Punctuator", "value": ";", @@ -36455,8 +35460,8 @@ Object { }, }, "range": Array [ - 26, - 27, + 48, + 49, ], "type": "Punctuator", "value": "}", @@ -36466,122 +35471,349 @@ Object { } `; -exports[`typescript fixtures/basics/keyof-operator.src 1`] = ` +exports[`typescript fixtures/basics/function-with-object-type-with-optional-properties.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", + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, }, - "init": Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 1, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 51, + ], + "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": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 13, + "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", }, - "start": Object { - "column": 9, - "line": 1, + "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", }, }, - "operator": "keyof", - "range": Array [ - 9, - 18, - ], - "type": "TSTypeOperator", - "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": 18, + "column": 22, "line": 1, }, "start": Object { - "column": 15, + "column": 19, "line": 1, }, }, + "method": false, "range": Array [ - 15, - 18, + 19, + 22, ], - "type": "TSTypeReference", - "typeName": Object { + "shorthand": true, + "type": "Property", + "value": Object { "loc": Object { "end": Object { - "column": 18, + "column": 22, "line": 1, }, "start": Object { - "column": 15, + "column": 19, "line": 1, }, }, - "name": "foo", + "name": "baz", "range": Array [ - 15, - 18, + 19, + 22, ], "type": "Identifier", }, }, - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 1, + ], + "range": Array [ + 13, + 45, + ], + "type": "ObjectPattern", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, }, - "start": Object { - "column": 5, - "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", }, }, - "range": Array [ - 5, - 19, - ], - "type": "VariableDeclarator", }, ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, "range": Array [ 0, - 19, + 51, ], - "type": "VariableDeclaration", + "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 2, + "line": 4, }, "start": Object { "column": 0, @@ -36590,14 +35822,14 @@ Object { }, "range": Array [ 0, - 20, + 52, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, + "column": 8, "line": 1, }, "start": Object { @@ -36607,46 +35839,46 @@ 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": "x", + "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 { @@ -36655,16 +35887,34 @@ Object { "line": 1, }, "start": Object { - "column": 9, + "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 [ - 9, 14, + 17, ], "type": "Identifier", - "value": "keyof", + "value": "bar", }, Object { "loc": Object { @@ -36673,828 +35923,633 @@ Object { "line": 1, }, "start": Object { - "column": 15, + "column": 17, "line": 1, }, }, "range": Array [ - 15, + 17, 18, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 22, "line": 1, }, "start": Object { - "column": 18, + "column": 19, "line": 1, }, }, "range": Array [ - 18, 19, + 22, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, ], "type": "Punctuator", - "value": ";", + "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, + "column": 24, "line": 1, }, "start": Object { - "column": 0, + "column": 23, "line": 1, }, }, "range": Array [ - 0, - 44, + 23, + 24, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 44, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ":", }, - }, - "range": Array [ - 0, - 44, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 26, "line": 1, }, "start": Object { - "column": 0, + "column": 25, "line": 1, }, }, "range": Array [ - 0, - 3, + 25, + 26, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 29, "line": 1, }, "start": Object { - "column": 4, + "column": 26, "line": 1, }, }, "range": Array [ - 4, - 15, + 26, + 29, ], "type": "Identifier", - "value": "nestedArray", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 30, "line": 1, }, "start": Object { - "column": 15, + "column": 29, "line": 1, }, }, "range": Array [ - 15, - 16, + 29, + 30, ], "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 22, - ], - "type": "Identifier", - "value": "Array", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 31, "line": 1, }, "start": Object { - "column": 22, + "column": 30, "line": 1, }, }, "range": Array [ - 22, - 23, + 30, + 31, ], "type": "Punctuator", - "value": "<", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 38, "line": 1, }, "start": Object { - "column": 23, + "column": 32, "line": 1, }, }, "range": Array [ - 23, - 28, + 32, + 38, ], "type": "Identifier", - "value": "Array", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 39, "line": 1, }, "start": Object { - "column": 28, + "column": 38, "line": 1, }, }, "range": Array [ - 28, - 29, + 38, + 39, ], "type": "Punctuator", - "value": "<", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 43, "line": 1, }, "start": Object { - "column": 29, + "column": 40, "line": 1, }, }, "range": Array [ - 29, - 34, + 40, + 43, ], "type": "Identifier", - "value": "Array", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 44, "line": 1, }, "start": Object { - "column": 34, + "column": 43, "line": 1, }, }, "range": Array [ - 34, - 35, + 43, + 44, ], "type": "Punctuator", - "value": "<", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 41, + "column": 45, "line": 1, }, "start": Object { - "column": 35, + "column": 44, "line": 1, }, }, "range": Array [ - 35, - 41, + 44, + 45, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 42, + "column": 46, "line": 1, }, "start": Object { - "column": 41, + "column": 45, "line": 1, }, }, "range": Array [ - 41, - 42, + 45, + 46, ], "type": "Punctuator", - "value": ">", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 43, + "column": 48, "line": 1, }, "start": Object { - "column": 42, + "column": 47, "line": 1, }, }, "range": Array [ - 42, - 43, + 47, + 48, ], "type": "Punctuator", - "value": ">", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 44, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 43, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 43, - 44, + 50, + 51, ], "type": "Punctuator", - "value": ">", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/never-type-param.src 1`] = ` +exports[`typescript fixtures/basics/function-with-object-type-without-annotation.src 1`] = ` Object { "body": Array [ Object { - "declarations": Array [ + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 49, + ], + "type": "BlockStatement", + }, + "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": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "params": Array [ Object { - "id": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, + "loc": Object { + "end": Object { + "column": 43, + "line": 1, }, - "name": "x", - "range": Array [ - 6, - 17, - ], - "type": "Identifier", - "typeAnnotation": Object { + "start": Object { + "column": 13, + "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": 7, + "column": 14, "line": 1, }, }, + "method": false, "range": Array [ - 7, + 14, 17, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "shorthand": true, + "type": "Property", + "value": Object { "loc": Object { "end": Object { "column": 17, "line": 1, }, "start": Object { - "column": 9, + "column": 14, "line": 1, }, }, + "name": "bar", "range": Array [ - 9, + 14, 17, ], - "type": "TSTypeReference", - "typeName": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, + "type": "Identifier", + }, + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 22, + "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, - }, + "start": Object { + "column": 19, + "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", }, + "name": "baz", + "range": Array [ + 19, + 22, + ], + "type": "Identifier", }, - }, - }, - "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, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 18, - ], - "type": "VariableDeclaration", - }, - 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, + "kind": "init", + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, }, - "start": Object { - "column": 0, - "line": 2, + "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", }, }, - "name": "Observable", - "range": Array [ - 19, - 29, - ], - "type": "Identifier", - }, - "property": Object { + ], + "range": Array [ + 13, + 43, + ], + "type": "ObjectPattern", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 43, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 23, + "line": 1, }, }, - "name": "empty", "range": Array [ - 30, - 35, + 23, + 43, ], - "type": "Identifier", - }, - "range": Array [ - 19, - 35, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "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 { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 43, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "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 [ - 36, - 41, + 25, + 43, ], - "type": "TSNeverKeyword", + "type": "TSTypeLiteral", }, - ], - "range": Array [ - 35, - 42, - ], - "type": "TSTypeParameterInstantiation", - }, - }, - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, + }, }, - }, + ], "range": Array [ - 19, - 45, + 0, + 49, ], - "type": "ExpressionStatement", + "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 3, + "line": 4, }, "start": Object { "column": 0, @@ -37503,14 +36558,14 @@ Object { }, "range": Array [ 0, - 46, + 50, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -37520,305 +36575,341 @@ Object { }, "range": Array [ 0, - 5, + 8, ], "type": "Keyword", - "value": "const", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 12, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, "range": Array [ - 6, - 7, + 9, + 12, ], "type": "Identifier", - "value": "x", + "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": 10, + "column": 14, "line": 1, }, "start": Object { - "column": 9, + "column": 13, "line": 1, }, }, "range": Array [ - 9, - 10, + 13, + 14, ], - "type": "Identifier", - "value": "X", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 17, "line": 1, }, "start": Object { - "column": 10, + "column": 14, "line": 1, }, }, "range": Array [ - 10, - 11, + 14, + 17, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 18, "line": 1, }, "start": Object { - "column": 11, + "column": 17, "line": 1, }, }, "range": Array [ - 11, - 16, + 17, + 18, ], - "type": "Identifier", - "value": "never", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 22, "line": 1, }, "start": Object { - "column": 16, + "column": 19, "line": 1, }, }, "range": Array [ - 16, - 17, + 19, + 22, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "baz", }, 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": 10, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 19, - 29, + 23, + 24, ], - "type": "Identifier", - "value": "Observable", + "type": "Punctuator", + "value": ":", }, 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 [ - 29, - 30, + 25, + 26, ], "type": "Punctuator", - "value": ".", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 30, - 35, + 26, + 29, ], "type": "Identifier", - "value": "empty", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 29, + "line": 1, }, }, "range": Array [ - 35, - 36, + 29, + 30, ], "type": "Punctuator", - "value": "<", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 37, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 31, + "line": 1, }, }, "range": Array [ - 36, - 41, + 31, + 37, ], "type": "Identifier", - "value": "never", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 38, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 37, + "line": 1, }, }, "range": Array [ - 41, - 42, + 37, + 38, ], "type": "Punctuator", - "value": ">", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 42, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 39, + "line": 1, }, }, "range": Array [ + 39, 42, - 43, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 43, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 42, + "line": 1, }, }, "range": Array [ + 42, 43, - 44, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 44, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 43, + "line": 1, }, }, "range": Array [ + 43, 44, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ 45, + 46, ], "type": "Punctuator", - "value": ";", + "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/non-null-assertion-operator.src 1`] = ` +exports[`typescript fixtures/basics/function-with-type-parameters.src 1`] = ` Object { "body": Array [ Object { @@ -37826,64 +36917,27 @@ Object { "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", - }, + "argument": Object { "loc": Object { "end": Object { - "column": 21, + "column": 12, "line": 2, }, "start": Object { - "column": 4, + "column": 11, "line": 2, }, }, + "name": "b", "range": Array [ - 41, - 58, + 36, + 37, ], - "type": "CallExpression", + "type": "Identifier", }, "loc": Object { "end": Object { - "column": 22, + "column": 13, "line": 2, }, "start": Object { @@ -37892,151 +36946,25 @@ Object { }, }, "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, + 29, + 38, ], - "type": "VariableDeclaration", + "type": "ReturnStatement", }, ], "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { - "column": 35, + "column": 23, "line": 1, }, }, "range": Array [ - 35, - 82, + 23, + 40, ], "type": "BlockStatement", }, @@ -38045,7 +36973,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 22, + "column": 10, "line": 1, }, "start": Object { @@ -38053,17 +36981,17 @@ Object { "line": 1, }, }, - "name": "processEntity", + "name": "a", "range": Array [ 9, - 22, + 10, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { "column": 0, @@ -38074,68 +37002,67 @@ Object { Object { "loc": Object { "end": Object { - "column": 33, + "column": 18, "line": 1, }, "start": Object { - "column": 23, + "column": 14, "line": 1, }, }, - "name": "e", - "optional": true, + "name": "b", "range": Array [ - 23, - 33, + 14, + 18, ], "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 33, + "column": 18, "line": 1, }, "start": Object { - "column": 25, + "column": 15, "line": 1, }, }, "range": Array [ - 25, - 33, + 15, + 18, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 33, + "column": 18, "line": 1, }, "start": Object { - "column": 27, + "column": 17, "line": 1, }, }, "range": Array [ - 27, - 33, + 17, + 18, ], "type": "TSTypeReference", "typeName": Object { "loc": Object { "end": Object { - "column": 33, + "column": 18, "line": 1, }, "start": Object { - "column": 27, + "column": 17, "line": 1, }, }, - "name": "Entity", + "name": "X", "range": Array [ - 27, - 33, + 17, + 18, ], "type": "Identifier", }, @@ -38145,14 +37072,120 @@ Object { ], "range": Array [ 0, - 82, + 40, ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 22, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "TSTypeReference", + "typeName": Object { + "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": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "X", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "range": Array [ + 11, + 12, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 10, + 13, + ], + "type": "TSTypeParameterDeclaration", + }, }, ], "loc": Object { "end": Object { - "column": 1, + "column": 0, "line": 4, }, "start": Object { @@ -38162,7 +37195,7 @@ Object { }, "range": Array [ 0, - 82, + 41, ], "sourceType": "script", "tokens": Array [ @@ -38187,7 +37220,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 10, "line": 1, }, "start": Object { @@ -38197,367 +37230,259 @@ Object { }, "range": Array [ 9, - 22, + 10, ], "type": "Identifier", - "value": "processEntity", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 11, "line": 1, }, "start": Object { - "column": 22, + "column": 10, "line": 1, }, }, "range": Array [ - 22, - 23, + 10, + 11, ], "type": "Punctuator", - "value": "(", + "value": "<", }, 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": "Identifier", - "value": "e", + "value": "X", }, 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": ">", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 14, "line": 1, }, "start": Object { - "column": 25, + "column": 13, "line": 1, }, }, "range": Array [ - 25, - 26, + 13, + 14, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 33, + "column": 15, "line": 1, }, "start": Object { - "column": 27, + "column": 14, "line": 1, }, }, "range": Array [ - 27, - 33, + 14, + 15, ], "type": "Identifier", - "value": "Entity", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 16, "line": 1, }, "start": Object { - "column": 33, + "column": 15, "line": 1, }, }, "range": Array [ - 33, - 34, + 15, + 16, ], "type": "Punctuator", - "value": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 18, "line": 1, }, "start": Object { - "column": 35, + "column": 17, "line": 1, }, }, "range": Array [ - 35, - 36, + 17, + 18, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 19, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 41, - 55, + 18, + 19, ], - "type": "Identifier", - "value": "validateEntity", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 19, + "line": 1, }, }, "range": Array [ - 55, - 56, + 19, + 20, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 56, - 57, + 21, + 22, ], "type": "Identifier", - "value": "e", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 57, - 58, + 23, + 24, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, - }, - "start": Object { - "column": 21, + "column": 10, "line": 2, }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, "start": Object { "column": 4, - "line": 3, + "line": 2, }, }, "range": Array [ - 64, - 67, + 29, + 35, ], "type": "Keyword", - "value": "let", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 12, + "line": 2, }, "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 68, - 69, - ], - "type": "Identifier", - "value": "s", - }, - Object { - "loc": Object { - "end": Object { "column": 11, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 3, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, + "line": 2, }, }, "range": Array [ - 72, - 73, + 36, + 37, ], "type": "Identifier", - "value": "e", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { "column": 13, - "line": 3, - }, - }, - "range": Array [ - 73, - 74, - ], - "type": "Punctuator", - "value": "!", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, - }, - "range": Array [ - 75, - 79, - ], - "type": "Identifier", - "value": "name", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 3, + "line": 2, }, "start": Object { - "column": 19, - "line": 3, + "column": 12, + "line": 2, }, }, "range": Array [ - 79, - 80, + 37, + 38, ], "type": "Punctuator", "value": ";", @@ -38566,16 +37491,16 @@ Object { "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { "column": 0, - "line": 4, + "line": 3, }, }, "range": Array [ - 81, - 82, + 39, + 40, ], "type": "Punctuator", "value": "}", @@ -38585,86 +37510,52 @@ Object { } `; -exports[`typescript fixtures/basics/null-and-undefined-type-annotations.src 1`] = ` +exports[`typescript fixtures/basics/function-with-type-parameters-that-have-comments.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 [ - 4, - 11, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 11, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 11, - ], - "type": "TSNullKeyword", - }, - }, + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 35, + "line": 1, }, - "init": null, - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, + "start": Object { + "column": 33, + "line": 1, }, - "range": Array [ - 4, - 11, - ], - "type": "VariableDeclarator", }, - ], - "kind": "let", + "range": Array [ + 33, + 35, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "compare", + "range": Array [ + 9, + 16, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 12, + "column": 35, "line": 1, }, "start": Object { @@ -38672,107 +37563,72 @@ Object { "line": 1, }, }, + "params": Array [], "range": Array [ 0, - 12, + 35, ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "id": Object { + "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": 16, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 28, + "line": 1, }, }, - "name": "y", - "range": Array [ - 17, - 29, - ], - "type": "Identifier", - "typeAnnotation": Object { + "name": Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 28, + "line": 1, }, }, + "name": "T", "range": Array [ - 18, + 28, 29, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 20, - 29, - ], - "type": "TSUndefinedKeyword", - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, + "type": "Identifier", }, + "range": Array [ + 28, + 29, + ], + "type": "TSTypeParameter", }, - "range": Array [ - 17, - 29, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "let", - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, + ], + "range": Array [ + 16, + 30, + ], + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 13, - 30, - ], - "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 35, + "line": 1, }, "start": Object { "column": 0, @@ -38781,14 +37637,14 @@ Object { }, "range": Array [ 0, - 30, + 35, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 8, "line": 1, }, "start": Object { @@ -38798,604 +37654,456 @@ Object { }, "range": Array [ 0, - 3, + 8, ], "type": "Keyword", - "value": "let", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 16, "line": 1, }, "start": Object { - "column": 4, + "column": 9, "line": 1, }, }, "range": Array [ - 4, - 5, + 9, + 16, ], "type": "Identifier", - "value": "x", + "value": "compare", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 17, "line": 1, }, "start": Object { - "column": 5, + "column": 16, "line": 1, }, }, "range": Array [ - 5, - 6, + 16, + 17, ], "type": "Punctuator", - "value": ":", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 29, "line": 1, }, "start": Object { - "column": 7, + "column": 28, "line": 1, }, }, "range": Array [ - 7, - 11, + 28, + 29, ], - "type": "Keyword", - "value": "null", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 30, "line": 1, }, "start": Object { - "column": 11, + "column": 29, "line": 1, }, }, "range": Array [ - 11, - 12, + 29, + 30, ], "type": "Punctuator", - "value": ";", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 2, + "column": 31, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 30, + "line": 1, }, }, "range": Array [ - 13, - 16, + 30, + 31, ], - "type": "Keyword", - "value": "let", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 32, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 31, + "line": 1, }, }, "range": Array [ - 17, - 18, + 31, + 32, ], - "type": "Identifier", - "value": "y", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 34, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 33, + "line": 1, }, }, "range": Array [ - 18, - 19, + 33, + 34, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 35, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 34, + "line": 1, }, }, "range": Array [ - 20, - 29, + 34, + 35, ], - "type": "Identifier", - "value": "undefined", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 29, - 30, - ], - "type": "Punctuator", - "value": ";", + "type": "Punctuator", + "value": "}", }, ], "type": "Program", } `; -exports[`typescript fixtures/basics/object-with-escaped-properties.src 1`] = ` +exports[`typescript fixtures/basics/function-with-type-parameters-with-constraint.src 1`] = ` Object { "body": Array [ Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 1, - "line": 1, - }, - }, - "properties": Array [ + "async": false, + "body": Object { + "body": Array [ Object { - "computed": false, - "key": Object { + "argument": Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 12, + "line": 2, }, "start": Object { - "column": 3, - "line": 1, + "column": 11, + "line": 2, }, }, + "name": "b", "range": Array [ - 3, - 7, + 47, + 48, ], - "raw": "'__'", - "type": "Literal", - "value": "__", + "type": "Identifier", }, - "kind": "init", "loc": Object { "end": Object { "column": 13, - "line": 1, + "line": 2, }, "start": Object { - "column": 3, - "line": 1, + "column": 4, + "line": 2, }, }, - "method": false, "range": Array [ - 3, - 13, + 40, + 49, ], - "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, - }, + "type": "ReturnStatement", }, ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, "range": Array [ - 1, - 15, + 34, + 51, ], - "type": "ObjectExpression", + "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": 17, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, "line": 1, }, }, - "range": Array [ - 0, - 17, - ], - "type": "ExpressionStatement", - }, - Object { - "expression": Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "properties": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 3, - "line": 3, - }, - }, - "range": Array [ - 22, - 26, - ], - "raw": "'__'", - "type": "Literal", - "value": "__", + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, }, - "kind": "init", + "start": Object { + "column": 25, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 25, + 29, + ], + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 12, - "line": 3, + "column": 29, + "line": 1, }, "start": Object { - "column": 3, - "line": 3, + "column": 26, + "line": 1, }, }, - "method": true, "range": Array [ - 22, - 31, + 26, + 29, ], - "shorthand": false, - "type": "Property", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "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": 12, - "line": 3, + "column": 29, + "line": 1, }, "start": Object { - "column": 10, - "line": 3, + "column": 28, + "line": 1, }, }, + "name": "X", "range": Array [ + 28, 29, - 31, ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 7, - "line": 3, - }, + "type": "Identifier", }, - "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, + 0, + 51, ], - "type": "ExpressionStatement", - }, - Object { - "expression": Object { + "returnType": Object { "loc": Object { "end": Object { - "column": 17, - "line": 5, + "column": 33, + "line": 1, }, "start": Object { - "column": 1, - "line": 5, + "column": 30, + "line": 1, }, }, - "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": "__", + "range": Array [ + 30, + 33, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, }, - "kind": "init", + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 15, - "line": 5, + "column": 33, + "line": 1, }, "start": Object { - "column": 3, - "line": 5, + "column": 32, + "line": 1, }, }, - "method": false, + "name": "X", "range": Array [ - 40, - 52, + 32, + 33, ], - "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, - }, + "type": "Identifier", }, - ], - "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 [ + "type": "FunctionDeclaration", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "params": Array [ Object { - "computed": false, - "key": Object { + "constraint": Object { "loc": Object { "end": Object { - "column": 14, - "line": 7, + "column": 23, + "line": 1, }, "start": Object { - "column": 10, - "line": 7, + "column": 21, + "line": 1, }, }, + "members": Array [], "range": Array [ - 68, - 72, + 21, + 23, ], - "raw": "'__'", - "type": "Literal", - "value": "__", + "type": "TSTypeLiteral", }, "loc": Object { "end": Object { - "column": 21, - "line": 7, + "column": 23, + "line": 1, }, "start": Object { - "column": 10, - "line": 7, + "column": 11, + "line": 1, }, }, - "range": Array [ - 68, - 79, - ], - "static": false, - "type": "ClassProperty", - "value": Object { + "name": Object { "loc": Object { "end": Object { - "column": 21, - "line": 7, + "column": 12, + "line": 1, }, "start": Object { - "column": 17, - "line": 7, + "column": 11, + "line": 1, }, }, + "name": "X", "range": Array [ - 75, - 79, + 11, + 12, ], - "raw": "null", - "type": "Literal", - "value": null, + "type": "Identifier", }, + "range": Array [ + 11, + 23, + ], + "type": "TSTypeParameter", }, ], - "loc": Object { - "end": Object { - "column": 23, - "line": 7, - }, - "start": Object { - "column": 8, - "line": 7, - }, - }, - "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, + 10, + 24, ], - "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, @@ -39404,14 +38112,14 @@ Object { }, "range": Array [ 0, - 82, + 52, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 8, "line": 1, }, "start": Object { @@ -39421,151 +38129,151 @@ Object { }, "range": Array [ 0, - 1, + 8, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 2, + "column": 10, "line": 1, }, "start": Object { - "column": 1, + "column": 9, "line": 1, }, }, "range": Array [ - 1, - 2, + 9, + 10, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 11, "line": 1, }, "start": Object { - "column": 3, + "column": 10, "line": 1, }, }, "range": Array [ - 3, - 7, + 10, + 11, ], - "type": "String", - "value": "'__'", + "type": "Punctuator", + "value": "<", }, 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": ":", + "type": "Identifier", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 20, "line": 1, }, "start": Object { - "column": 9, + "column": 13, "line": 1, }, }, "range": Array [ - 9, 13, + 20, ], "type": "Keyword", - "value": "null", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 22, "line": 1, }, "start": Object { - "column": 14, + "column": 21, "line": 1, }, }, "range": Array [ - 14, - 15, + 21, + 22, ], "type": "Punctuator", - "value": "}", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 23, "line": 1, }, "start": Object { - "column": 15, + "column": 22, "line": 1, }, }, "range": Array [ - 15, - 16, + 22, + 23, ], "type": "Punctuator", - "value": ")", + "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": ";", + "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 [ - 19, - 20, + 24, + 25, ], "type": "Punctuator", "value": "(", @@ -39573,48 +38281,30 @@ Object { Object { "loc": Object { "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 1, - "line": 3, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, + "column": 26, + "line": 1, }, "start": Object { - "column": 3, - "line": 3, + "column": 25, + "line": 1, }, }, "range": Array [ - 22, + 25, 26, ], - "type": "String", - "value": "'__'", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 27, + "line": 1, }, "start": Object { - "column": 7, - "line": 3, + "column": 26, + "line": 1, }, }, "range": Array [ @@ -39622,35 +38312,35 @@ Object { 27, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 29, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 28, + "line": 1, }, }, "range": Array [ - 27, 28, + 29, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 30, + "line": 1, }, "start": Object { - "column": 10, - "line": 3, + "column": 29, + "line": 1, }, }, "range": Array [ @@ -39658,17 +38348,17 @@ Object { 30, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 3, + "column": 31, + "line": 1, }, "start": Object { - "column": 11, - "line": 3, + "column": 30, + "line": 1, }, }, "range": Array [ @@ -39676,292 +38366,497 @@ Object { 31, ], "type": "Punctuator", - "value": "}", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 33, + "line": 1, }, "start": Object { - "column": 13, - "line": 3, + "column": 32, + "line": 1, }, }, "range": Array [ 32, 33, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 35, + "line": 1, }, "start": Object { - "column": 14, - "line": 3, + "column": 34, + "line": 1, }, }, "range": Array [ - 33, 34, + 35, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 10, + "line": 2, }, "start": Object { - "column": 15, - "line": 3, + "column": 4, + "line": 2, }, }, "range": Array [ - 34, - 35, + 40, + 46, ], - "type": "Punctuator", - "value": ";", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 12, + "line": 2, }, "start": Object { - "column": 0, - "line": 5, + "column": 11, + "line": 2, }, }, "range": Array [ - 37, - 38, + 47, + 48, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 5, + "column": 13, + "line": 2, }, "start": Object { - "column": 1, - "line": 5, + "column": 12, + "line": 2, }, }, "range": Array [ - 38, - 39, + 48, + 49, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 5, + "column": 1, + "line": 3, }, "start": Object { - "column": 3, - "line": 5, + "column": 0, + "line": 3, }, }, "range": Array [ - 40, - 41, + 50, + 51, ], "type": "Punctuator", - "value": "[", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/function-with-types.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 5, + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "name", + "range": Array [ + 50, + 54, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 43, + 55, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 37, + "line": 1, + }, }, - "start": Object { - "column": 4, - "line": 5, + "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", }, - "range": Array [ - 41, - 45, - ], - "type": "String", - "value": "'__'", - }, - Object { "loc": Object { "end": Object { - "column": 9, - "line": 5, + "column": 1, + "line": 3, }, "start": Object { - "column": 8, - "line": 5, + "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": 28, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], "range": Array [ - 45, - 46, + 0, + 57, ], - "type": "Punctuator", - "value": "]", + "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": 10, - "line": 5, + "column": 8, + "line": 1, }, "start": Object { - "column": 9, - "line": 5, + "column": 0, + "line": 1, }, }, "range": Array [ - 46, - 47, + 0, + 8, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 5, + "column": 16, + "line": 1, }, "start": Object { - "column": 11, - "line": 5, + "column": 9, + "line": 1, }, }, "range": Array [ - 48, - 52, + 9, + 16, ], - "type": "Keyword", - "value": "null", + "type": "Identifier", + "value": "message", }, Object { "loc": Object { "end": Object { "column": 17, - "line": 5, + "line": 1, }, "start": Object { "column": 16, - "line": 5, + "line": 1, }, }, "range": Array [ - 53, - 54, + 16, + 17, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 5, + "column": 21, + "line": 1, }, "start": Object { "column": 17, - "line": 5, + "line": 1, }, }, "range": Array [ - 54, - 55, + 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": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 5, + "column": 28, + "line": 1, }, "start": Object { - "column": 18, - "line": 5, + "column": 22, + "line": 1, }, }, "range": Array [ - 55, - 56, + 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": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 7, + "column": 30, + "line": 1, }, "start": Object { - "column": 0, - "line": 7, + "column": 29, + "line": 1, }, }, "range": Array [ - 58, - 63, + 29, + 30, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 7, + "column": 36, + "line": 1, }, "start": Object { - "column": 6, - "line": 7, + "column": 30, + "line": 1, }, }, "range": Array [ - 64, - 65, + 30, + 36, ], "type": "Identifier", - "value": "X", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 7, + "column": 38, + "line": 1, }, "start": Object { - "column": 8, - "line": 7, + "column": 37, + "line": 1, }, }, "range": Array [ - 66, - 67, + 37, + 38, ], "type": "Punctuator", "value": "{", @@ -39969,71 +38864,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, - "line": 7, + "column": 10, + "line": 2, }, "start": Object { - "column": 10, - "line": 7, + "column": 4, + "line": 2, }, }, "range": Array [ - 68, - 72, + 43, + 49, ], - "type": "String", - "value": "'__'", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 7, + "column": 15, + "line": 2, }, "start": Object { - "column": 15, - "line": 7, + "column": 11, + "line": 2, }, }, "range": Array [ - 73, - 74, + 50, + 54, ], - "type": "Punctuator", - "value": "=", + "type": "Identifier", + "value": "name", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 7, + "column": 16, + "line": 2, }, "start": Object { - "column": 17, - "line": 7, + "column": 15, + "line": 2, }, }, "range": Array [ - 75, - 79, + 54, + 55, ], - "type": "Keyword", - "value": "null", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 7, + "column": 1, + "line": 3, }, "start": Object { - "column": 22, - "line": 7, + "column": 0, + "line": 3, }, }, "range": Array [ - 80, - 81, + 56, + 57, ], "type": "Punctuator", "value": "}", @@ -40043,26 +38938,62 @@ Object { } `; -exports[`typescript fixtures/basics/symbol-type-param.src 1`] = ` +exports[`typescript fixtures/basics/function-with-types-assignation.src 1`] = ` Object { "body": Array [ Object { "async": false, "body": Object { - "body": Array [], + "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", + }, + ], "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 40, + "column": 78, "line": 1, }, }, "range": Array [ - 40, - 42, + 78, + 96, ], "type": "BlockStatement", }, @@ -40071,7 +39002,7 @@ Object { "id": Object { "loc": Object { "end": Object { - "column": 13, + "column": 16, "line": 1, }, "start": Object { @@ -40079,17 +39010,17 @@ Object { "line": 1, }, }, - "name": "test", + "name": "message", "range": Array [ 9, - 13, + 16, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -40100,78 +39031,235 @@ Object { Object { "loc": Object { "end": Object { - "column": 38, + "column": 28, "line": 1, }, "start": Object { - "column": 14, + "column": 17, "line": 1, }, }, - "name": "abc", + "name": "name", "range": Array [ - 14, - 38, + 17, + 28, ], "type": "Identifier", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 38, + "column": 28, "line": 1, }, "start": Object { - "column": 17, + "column": 21, "line": 1, }, }, "range": Array [ - 17, - 38, + 21, + 28, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 38, + "column": 28, "line": 1, }, "start": Object { - "column": 19, + "column": 22, "line": 1, }, }, "range": Array [ - 19, - 38, + 22, + 28, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "name": "age", + "range": Array [ + 30, + 40, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 40, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "TSNumberKeyword", + }, + }, + }, + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 46, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "range": Array [ + 43, + 46, + ], + "raw": "100", + "type": "Literal", + "value": 100, + }, + "type": "AssignmentPattern", + }, + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 1, + }, + "start": Object { + "column": 51, + "line": 1, + }, + }, + "name": "args", + "range": Array [ + 51, + 55, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 69, + "line": 1, + }, + "start": Object { + "column": 48, + "line": 1, + }, + }, + "range": Array [ + 48, + 69, + ], + "type": "RestElement", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 69, + "line": 1, + }, + "start": Object { + "column": 55, + "line": 1, + }, + }, + "range": Array [ + 55, + 69, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 69, + "line": 1, + }, + "start": Object { + "column": 56, + "line": 1, + }, + }, + "range": Array [ + 56, + 69, ], "type": "TSTypeReference", "typeName": Object { "loc": Object { "end": Object { - "column": 22, + "column": 61, "line": 1, }, "start": Object { - "column": 19, + "column": 56, "line": 1, }, }, - "name": "Map", + "name": "Array", "range": Array [ - 19, - 22, + 56, + 61, ], "type": "Identifier", }, "typeParameters": Object { "loc": Object { "end": Object { - "column": 38, + "column": 69, "line": 1, }, "start": Object { - "column": 22, + "column": 61, "line": 1, }, }, @@ -40179,41 +39267,24 @@ Object { 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, + "column": 68, "line": 1, }, "start": Object { - "column": 31, + "column": 62, "line": 1, }, }, "range": Array [ - 31, - 37, + 62, + 68, ], "type": "TSStringKeyword", }, ], "range": Array [ - 22, - 38, + 61, + 69, ], "type": "TSTypeParameterInstantiation", }, @@ -40223,15 +39294,49 @@ Object { ], "range": Array [ 0, - 42, + 96, ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 77, + "line": 1, + }, + "start": Object { + "column": 70, + "line": 1, + }, + }, + "range": Array [ + 70, + 77, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 77, + "line": 1, + }, + "start": Object { + "column": 71, + "line": 1, + }, + }, + "range": Array [ + 71, + 77, + ], + "type": "TSStringKeyword", + }, + }, "type": "FunctionDeclaration", }, ], "loc": Object { "end": Object { - "column": 42, - "line": 1, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -40240,7 +39345,7 @@ Object { }, "range": Array [ 0, - 42, + 97, ], "sourceType": "script", "tokens": Array [ @@ -40265,7 +39370,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 16, "line": 1, }, "start": Object { @@ -40275,25 +39380,25 @@ Object { }, "range": Array [ 9, - 13, + 16, ], "type": "Identifier", - "value": "test", + "value": "message", }, 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": "(", @@ -40301,35 +39406,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, + "column": 21, "line": 1, }, "start": Object { - "column": 14, + "column": 17, "line": 1, }, }, "range": Array [ - 14, 17, + 21, ], "type": "Identifier", - "value": "abc", + "value": "name", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 22, "line": 1, }, "start": Object { - "column": 17, + "column": 21, "line": 1, }, }, "range": Array [ - 17, - 18, + 21, + 22, ], "type": "Punctuator", "value": ":", @@ -40337,475 +39442,233 @@ Object { Object { "loc": Object { "end": Object { - "column": 22, + "column": 28, "line": 1, }, "start": Object { - "column": 19, + "column": 22, "line": 1, }, }, "range": Array [ - 19, 22, + 28, ], "type": "Identifier", - "value": "Map", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 29, "line": 1, }, "start": Object { - "column": 22, + "column": 28, "line": 1, }, }, "range": Array [ - 22, - 23, + 28, + 29, ], "type": "Punctuator", - "value": "<", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 33, "line": 1, }, "start": Object { - "column": 23, + "column": 30, "line": 1, }, }, "range": Array [ - 23, - 29, + 30, + 33, ], "type": "Identifier", - "value": "symbol", + "value": "age", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 34, "line": 1, }, "start": Object { - "column": 29, + "column": 33, "line": 1, }, }, "range": Array [ - 29, - 30, + 33, + 34, ], "type": "Punctuator", - "value": ",", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 40, "line": 1, }, "start": Object { - "column": 31, + "column": 34, "line": 1, }, }, "range": Array [ - 31, - 37, + 34, + 40, ], "type": "Identifier", - "value": "string", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 42, "line": 1, }, "start": Object { - "column": 37, + "column": 41, "line": 1, }, }, "range": Array [ - 37, - 38, + 41, + 42, ], "type": "Punctuator", - "value": ">", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 39, + "column": 46, "line": 1, }, "start": Object { - "column": 38, + "column": 43, "line": 1, }, }, "range": Array [ - 38, - 39, + 43, + 46, ], - "type": "Punctuator", - "value": ")", + "type": "Numeric", + "value": "100", }, Object { "loc": Object { "end": Object { - "column": 41, + "column": 47, "line": 1, }, "start": Object { - "column": 40, + "column": 46, "line": 1, }, }, "range": Array [ - 40, - 41, + 46, + 47, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 42, + "column": 51, "line": 1, }, "start": Object { - "column": 41, + "column": 48, "line": 1, }, }, "range": Array [ - 41, - 42, + 48, + 51, ], "type": "Punctuator", - "value": "}", + "value": "...", }, - ], - "type": "Program", -} -`; - -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", - }, - "init": 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", - }, - }, - ], - }, - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 37, - ], - "type": "VariableDeclarator", - "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", - }, - }, - ], - "kind": "type", "loc": Object { "end": Object { - "column": 37, + "column": 55, "line": 1, }, "start": Object { - "column": 0, + "column": 51, "line": 1, }, }, "range": Array [ - 0, - 37, + 51, + 55, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 37, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "args", }, - }, - "range": Array [ - 0, - 37, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, + "column": 56, "line": 1, }, "start": Object { - "column": 0, + "column": 55, "line": 1, }, }, "range": Array [ - 0, - 4, + 55, + 56, ], - "type": "Identifier", - "value": "type", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 61, "line": 1, }, "start": Object { - "column": 5, + "column": 56, "line": 1, }, }, "range": Array [ - 5, - 11, + 56, + 61, ], "type": "Identifier", - "value": "Result", + "value": "Array", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 62, "line": 1, }, "start": Object { - "column": 11, + "column": 61, "line": 1, }, }, "range": Array [ - 11, - 12, + 61, + 62, ], "type": "Punctuator", "value": "<", @@ -40813,35 +39676,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 13, + "column": 68, "line": 1, }, "start": Object { - "column": 12, + "column": 62, "line": 1, }, }, "range": Array [ - 12, - 13, + 62, + 68, ], "type": "Identifier", - "value": "T", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 69, "line": 1, }, "start": Object { - "column": 13, + "column": 68, "line": 1, }, }, "range": Array [ - 13, - 14, + 68, + 69, ], "type": "Punctuator", "value": ">", @@ -40849,395 +39712,232 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, + "column": 70, "line": 1, }, "start": Object { - "column": 15, + "column": 69, "line": 1, }, }, "range": Array [ - 15, - 16, + 69, + 70, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 71, "line": 1, }, "start": Object { - "column": 17, + "column": 70, "line": 1, }, }, "range": Array [ - 17, - 24, + 70, + 71, ], - "type": "Identifier", - "value": "Success", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 77, "line": 1, }, "start": Object { - "column": 24, + "column": 71, "line": 1, }, }, "range": Array [ - 24, - 25, + 71, + 77, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 79, "line": 1, }, "start": Object { - "column": 25, + "column": 78, "line": 1, }, }, "range": Array [ - 25, - 26, + 78, + 79, ], - "type": "Identifier", - "value": "T", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 26, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 26, - 27, + 82, + 88, ], - "type": "Punctuator", - "value": ">", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 13, + "line": 2, }, "start": Object { - "column": 28, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ - 28, - 29, + 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": "|", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 30, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 30, - 37, + 95, + 96, ], - "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/import-equal-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": 10, + "line": 1, }, - "init": Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 48, - ], - "type": "TSUnionType", - "types": Array [ - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 28, - "line": 1, - }, - }, - "range": Array [ - 28, - 38, - ], - "type": "TSTypeReference", - "typeName": Object { - "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", - }, - }, - ], + "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": 48, + "column": 26, "line": 1, }, "start": Object { - "column": 5, + "column": 21, "line": 1, }, }, "range": Array [ - 5, - 48, + 21, + 26, ], - "type": "VariableDeclarator", - "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", - }, - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 48, - "line": 1, + "raw": "'bar'", + "type": "Literal", + "value": "bar", }, - "start": Object { - "column": 0, - "line": 1, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, }, + "range": Array [ + 13, + 27, + ], + "type": "TSExternalModuleReference", }, "range": Array [ 0, - 48, + 28, ], - "type": "VariableDeclaration", + "type": "TSImportEqualsDeclaration", }, ], "loc": Object { "end": Object { - "column": 48, - "line": 1, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -41246,14 +39946,14 @@ Object { }, "range": Array [ 0, - 48, + 29, ], - "sourceType": "script", + "sourceType": "module", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 4, + "column": 6, "line": 1, }, "start": Object { @@ -41263,28 +39963,28 @@ Object { }, "range": Array [ 0, - 4, + 6, ], - "type": "Identifier", - "value": "type", + "type": "Keyword", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 10, "line": 1, }, "start": Object { - "column": 5, + "column": 7, "line": 1, }, }, "range": Array [ - 5, - 11, + 7, + 10, ], "type": "Identifier", - "value": "Result", + "value": "foo", }, Object { "loc": Object { @@ -41302,25 +40002,25 @@ Object { 12, ], "type": "Punctuator", - "value": "<", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 20, "line": 1, }, "start": Object { - "column": 12, + "column": 13, "line": 1, }, }, "range": Array [ - 12, 13, + 20, ], "type": "Identifier", - "value": "T", + "value": "require", }, Object { "loc": Object { @@ -41329,390 +40029,595 @@ Object { "line": 1, }, "start": Object { - "column": 14, + "column": 20, "line": 1, }, }, "range": Array [ - 14, + 20, 21, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 26, "line": 1, }, "start": Object { - "column": 22, + "column": 21, "line": 1, }, }, "range": Array [ - 22, - 23, + 21, + 26, ], - "type": "Punctuator", - "value": "{", + "type": "String", + "value": "'bar'", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 27, "line": 1, }, "start": Object { - "column": 23, + "column": 26, "line": 1, }, }, "range": Array [ - 23, - 24, + 26, + 27, ], "type": "Punctuator", - "value": "}", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 28, "line": 1, }, "start": Object { - "column": 24, + "column": 27, "line": 1, }, }, "range": Array [ - 24, - 25, + 27, + 28, ], "type": "Punctuator", - "value": ">", + "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": 27, + "column": 35, "line": 1, }, "start": Object { - "column": 26, + "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 [ - 26, - 27, + 0, + 35, ], - "type": "Punctuator", - "value": "=", + "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": 35, + "column": 6, "line": 1, }, "start": Object { - "column": 28, + "column": 0, "line": 1, }, }, "range": Array [ - 28, - 35, + 0, + 6, ], - "type": "Identifier", - "value": "Success", + "type": "Keyword", + "value": "export", }, Object { "loc": Object { "end": Object { - "column": 36, + "column": 13, "line": 1, }, "start": Object { - "column": 35, + "column": 7, "line": 1, }, }, "range": Array [ - 35, - 36, + 7, + 13, ], - "type": "Punctuator", - "value": "<", + "type": "Keyword", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 17, "line": 1, }, "start": Object { - "column": 36, + "column": 14, "line": 1, }, }, "range": Array [ - 36, - 37, + 14, + 17, ], "type": "Identifier", - "value": "T", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 19, "line": 1, }, "start": Object { - "column": 37, + "column": 18, "line": 1, }, }, "range": Array [ - 37, - 38, + 18, + 19, ], "type": "Punctuator", - "value": ">", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 40, + "column": 27, "line": 1, }, "start": Object { - "column": 39, + "column": 20, "line": 1, }, }, "range": Array [ - 39, - 40, + 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": "|", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 48, + "column": 33, "line": 1, }, "start": Object { - "column": 41, + "column": 28, "line": 1, }, }, "range": Array [ - 41, - 48, + 28, + 33, ], - "type": "Identifier", - "value": "Failure", + "type": "String", + "value": "'bar'", }, - ], - "type": "Program", -} -`; - -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, - }, - }, - "name": "foo", - "range": Array [ - 5, - 8, - ], - "type": "Identifier", + "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 [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, }, - "init": Object { + "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": 29, + "column": 26, "line": 1, }, "start": Object { - "column": 11, + "column": 23, "line": 1, }, }, - "members": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "name": "bar", - "range": Array [ - 12, - 15, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 24, - "line": 1, - }, - "start": Object { - "column": 12, - "line": 1, - }, - }, - "range": Array [ - 12, - 24, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 15, - "line": 1, - }, - }, - "range": Array [ - 15, - 23, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 17, - "line": 1, - }, - }, - "range": Array [ - 17, - 23, - ], - "type": "TSStringKeyword", - }, - }, - }, - Object { - "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": 28, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 28, - ], - "type": "TSPropertySignature", - }, - ], "range": Array [ - 11, - 29, + 23, + 26, ], - "type": "TSTypeLiteral", + "raw": "'A'", + "type": "Literal", + "value": "A", }, "loc": Object { "end": Object { - "column": 30, + "column": 26, "line": 1, }, "start": Object { - "column": 5, + "column": 23, "line": 1, }, }, "range": Array [ - 5, - 30, + 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": 30, - "line": 1, + "column": 26, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, "range": Array [ - 0, - 30, + 29, + 55, ], - "type": "VariableDeclaration", + "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": 2, + "line": 3, }, "start": Object { "column": 0, @@ -41721,7 +40626,7 @@ Object { }, "range": Array [ 0, - 31, + 56, ], "sourceType": "script", "tokens": Array [ @@ -41746,7 +40651,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 8, + "column": 6, "line": 1, }, "start": Object { @@ -41756,25 +40661,25 @@ Object { }, "range": Array [ 5, - 8, + 6, ], "type": "Identifier", - "value": "foo", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 8, "line": 1, }, "start": Object { - "column": 9, + "column": 7, "line": 1, }, }, "range": Array [ - 9, - 10, + 7, + 8, ], "type": "Punctuator", "value": "=", @@ -41782,92 +40687,92 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 15, "line": 1, }, "start": Object { - "column": 11, + "column": 9, "line": 1, }, }, "range": Array [ - 11, - 12, + 9, + 15, ], - "type": "Punctuator", - "value": "{", + "type": "Keyword", + "value": "typeof", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 22, "line": 1, }, "start": Object { - "column": 12, + "column": 16, "line": 1, }, }, "range": Array [ - 12, - 15, + 16, + 22, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 23, "line": 1, }, "start": Object { - "column": 15, + "column": 22, "line": 1, }, }, "range": Array [ - 15, - 16, + 22, + 23, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 26, "line": 1, }, "start": Object { - "column": 17, + "column": 23, "line": 1, }, }, "range": Array [ - 17, 23, + 26, ], - "type": "Identifier", - "value": "string", + "type": "String", + "value": "'A'", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 27, "line": 1, }, "start": Object { - "column": 23, + "column": 26, "line": 1, }, }, "range": Array [ - 23, - 24, + 26, + 27, ], "type": "Punctuator", - "value": ",", + "value": ")", }, Object { "loc": Object { @@ -41876,416 +40781,103 @@ Object { "line": 1, }, "start": Object { - "column": 25, + "column": 27, "line": 1, }, }, "range": Array [ - 25, + 27, 28, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 4, + "line": 2, }, "start": Object { - "column": 28, - "line": 1, + "column": 0, + "line": 2, }, }, "range": Array [ - 28, 29, + 33, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 1, + "column": 6, + "line": 2, }, "start": Object { - "column": 29, - "line": 1, + "column": 5, + "line": 2, }, }, "range": Array [ - 29, - 30, + 34, + 35, + ], + "type": "Identifier", + "value": "B", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, ], "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/type-guard.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", - }, - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "operator": "typeof", - "prefix": true, - "range": Array [ - 52, - 60, - ], - "type": "UnaryExpression", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "operator": "===", - "range": Array [ - 52, - 73, - ], - "right": Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 65, - 73, - ], - "raw": "'string'", - "type": "Literal", - "value": "string", - }, - "type": "BinaryExpression", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 45, - 73, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 75, - ], - "type": "BlockStatement", - }, - "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, - 75, - ], - "returnType": Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 1, - }, - "start": Object { - "column": 25, - "line": 1, - }, - }, - "range": Array [ - 25, - 38, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "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": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 75, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 8, - ], - "type": "Keyword", - "value": "function", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { "column": 9, - "line": 1, + "line": 2, }, }, "range": Array [ - 9, - 17, + 38, + 44, ], - "type": "Identifier", - "value": "isString", + "type": "Keyword", + "value": "import", }, 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 [ - 17, - 18, + 44, + 45, ], "type": "Punctuator", "value": "(", @@ -42294,615 +40886,356 @@ Object { "loc": Object { "end": Object { "column": 19, - "line": 1, + "line": 2, }, "start": Object { - "column": 18, - "line": 1, + "column": 16, + "line": 2, }, }, "range": Array [ - 18, - 19, + 45, + 48, ], - "type": "Identifier", - "value": "x", + "type": "String", + "value": "\\"B\\"", }, Object { "loc": Object { "end": Object { "column": 20, - "line": 1, + "line": 2, }, "start": Object { "column": 19, - "line": 1, + "line": 2, }, }, "range": Array [ - 19, - 20, + 48, + 49, ], "type": "Punctuator", - "value": ":", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 1, + "column": 21, + "line": 2, }, "start": Object { - "column": 21, - "line": 1, + "column": 20, + "line": 2, }, }, "range": Array [ - 21, - 24, + 49, + 50, ], - "type": "Identifier", - "value": "any", + "type": "Punctuator", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 1, + "column": 22, + "line": 2, }, "start": Object { - "column": 24, - "line": 1, + "column": 21, + "line": 2, }, }, "range": Array [ - 24, - 25, + 50, + 51, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 1, + "column": 23, + "line": 2, }, "start": Object { - "column": 25, - "line": 1, + "column": 22, + "line": 2, }, }, "range": Array [ - 25, - 26, + 51, + 52, ], "type": "Punctuator", - "value": ":", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 24, + "line": 2, }, "start": Object { - "column": 27, - "line": 1, + "column": 23, + "line": 2, }, }, "range": Array [ - 27, - 28, + 52, + 53, ], "type": "Identifier", - "value": "x", + "value": "Y", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 29, - "line": 1, + "column": 24, + "line": 2, }, }, "range": Array [ - 29, - 31, + 53, + 54, ], - "type": "Identifier", - "value": "is", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 1, + "column": 26, + "line": 2, }, "start": Object { - "column": 32, - "line": 1, + "column": 25, + "line": 2, }, }, "range": Array [ - 32, - 38, + 54, + 55, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "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": 40, + "column": 30, "line": 1, }, "start": Object { - "column": 39, + "column": 0, "line": 1, }, }, "range": Array [ - 39, - 40, + 0, + 30, ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, }, - }, - "range": Array [ - 45, - 51, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 11, - "line": 2, - }, - }, - "range": Array [ - 52, - 58, - ], - "type": "Keyword", - "value": "typeof", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 59, - 60, - ], - "type": "Identifier", - "value": "x", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 20, - "line": 2, - }, - }, - "range": Array [ - 61, - 64, - ], - "type": "Punctuator", - "value": "===", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, - }, - }, - "range": Array [ - 65, - 73, - ], - "type": "String", - "value": "'string'", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 74, - 75, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/type-parameters-comments.src 1`] = ` -Object { - "body": Array [ - Object { - "expression": Object { - "arguments": Array [], - "callee": Object { + "range": Array [ + 9, + 29, + ], + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 3, + "column": 10, "line": 1, }, "start": Object { - "column": 0, + "column": 9, "line": 1, }, }, - "name": "foo", + "name": "A", "range": Array [ - 0, - 3, + 9, + 10, ], "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, + "column": 29, "line": 1, }, "start": Object { - "column": 3, + "column": 10, "line": 1, }, }, "params": Array [ Object { + "isTypeOf": false, "loc": Object { "end": Object { - "column": 22, + "column": 28, "line": 1, }, "start": Object { - "column": 21, + "column": 11, "line": 1, }, }, - "range": Array [ - 21, - 22, - ], - "type": "TSTypeReference", - "typeName": Object { + "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": 22, + "column": 20, "line": 1, }, "start": Object { - "column": 21, + "column": 18, "line": 1, }, }, - "name": "A", "range": Array [ - 21, - 22, + 18, + 20, ], - "type": "Identifier", - }, - }, - ], - "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 { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 24, - "line": 2, + "type": "TSLiteralType", }, - }, - "name": "A", - "range": Array [ - 68, - 69, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 56, - 81, - ], - "type": "TSTypeParameterDeclaration", - }, - }, - Object { - "async": false, - "body": Object { - "body": Array [], - "loc": Object { - "end": Object { - "column": 49, - "line": 3, - }, - "start": Object { - "column": 46, - "line": 3, - }, - }, - "range": Array [ - 134, - 137, - ], - "type": "BlockStatement", - }, - "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, + "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 [ - 126, - 129, + 11, + 28, ], - "type": "TSTypeReference", - "typeName": Object { + "type": "TSImportType", + "typeParameters": Object { "loc": Object { "end": Object { - "column": 41, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { - "column": 38, - "line": 3, + "column": 23, + "line": 1, }, }, - "name": "Foo", + "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 [ - 126, - 129, + 23, + 28, ], - "type": "Identifier", - }, - }, - "loc": Object { - "end": Object { - "column": 41, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, + "type": "TSTypeParameterInstantiation", }, }, - "name": "A", - "range": Array [ - 112, - 129, - ], - "type": "TSTypeParameter", - }, - ], - "range": Array [ - 100, - 131, - ], - "type": "TSTypeParameterDeclaration", + ], + "range": Array [ + 10, + 29, + ], + "type": "TSTypeParameterInstantiation", + }, }, }, ], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 2, }, "start": Object { "column": 0, @@ -42911,14 +41244,14 @@ Object { }, "range": Array [ 0, - 138, + 31, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, + "column": 4, "line": 1, }, "start": Object { @@ -42928,385 +41261,428 @@ Object { }, "range": Array [ 0, - 3, + 4, ], "type": "Identifier", - "value": "foo", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 6, "line": 1, }, "start": Object { - "column": 3, + "column": 5, "line": 1, }, }, "range": Array [ - 3, - 4, + 5, + 6, ], - "type": "Punctuator", - "value": "<", + "type": "Identifier", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 8, "line": 1, }, "start": Object { - "column": 21, + "column": 7, "line": 1, }, }, "range": Array [ - 21, - 22, + 7, + 8, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 40, + "column": 10, "line": 1, }, "start": Object { - "column": 39, + "column": 9, "line": 1, }, }, "range": Array [ - 39, - 40, + 9, + 10, ], - "type": "Punctuator", - "value": ">", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 41, + "column": 11, "line": 1, }, "start": Object { - "column": 40, + "column": 10, "line": 1, }, }, "range": Array [ - 40, - 41, + 10, + 11, ], "type": "Punctuator", - "value": "(", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 42, + "column": 17, "line": 1, }, "start": Object { - "column": 41, + "column": 11, "line": 1, }, }, "range": Array [ - 41, - 42, + 11, + 17, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "import", }, Object { "loc": Object { "end": Object { - "column": 43, + "column": 18, "line": 1, }, "start": Object { - "column": 42, + "column": 17, "line": 1, }, }, "range": Array [ - 42, - 43, + 17, + 18, ], "type": "Punctuator", - "value": ";", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 20, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 18, + "line": 1, }, }, "range": Array [ - 44, - 52, + 18, + 20, ], - "type": "Keyword", - "value": "function", + "type": "String", + "value": "\\"\\"", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 21, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 20, + "line": 1, }, }, "range": Array [ - 53, - 56, + 20, + 21, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 12, - "line": 2, + "column": 21, + "line": 1, }, }, "range": Array [ - 56, - 57, + 21, + 22, ], "type": "Punctuator", - "value": "<", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 68, - 69, + 22, + 23, ], "type": "Identifier", - "value": "A", + "value": "B", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 36, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 80, - 81, + 23, + 24, ], "type": "Punctuator", - "value": ">", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 38, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 37, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ - 81, - 82, + 24, + 27, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "any", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 38, - "line": 2, + "column": 27, + "line": 1, }, }, "range": Array [ - 82, - 83, + 27, + 28, ], "type": "Punctuator", - "value": ")", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 40, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 84, - 85, + 28, + 29, ], "type": "Punctuator", - "value": "{", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 43, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 42, - "line": 2, + "column": 29, + "line": 1, }, }, "range": Array [ - 86, - 87, + 29, + 30, ], "type": "Punctuator", - "value": "}", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/interface-extends.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 1, + }, }, + "range": Array [ + 26, + 30, + ], + "type": "TSInterfaceBody", }, - "range": Array [ - 88, - 96, - ], - "type": "Keyword", - "value": "function", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, + "extends": Array [ + Object { + "expression": 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", }, - }, - "range": Array [ - 97, - 100, ], - "type": "Identifier", - "value": "baz", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, + "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 [ - 100, - 101, - ], - "type": "Punctuator", - "value": "<", - }, - Object { "loc": Object { "end": Object { - "column": 25, + "column": 1, "line": 3, }, "start": Object { - "column": 24, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 112, - 113, + 0, + 30, ], - "type": "Identifier", - "value": "A", + "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": 37, - "line": 3, + "column": 9, + "line": 1, }, "start": Object { - "column": 36, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 124, - 125, + 0, + 9, ], - "type": "Punctuator", - "value": "=", + "type": "Keyword", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 3, + "column": 13, + "line": 1, }, "start": Object { - "column": 38, - "line": 3, + "column": 10, + "line": 1, }, }, "range": Array [ - 126, - 129, + 10, + 13, ], "type": "Identifier", "value": "Foo", @@ -43314,71 +41690,53 @@ Object { Object { "loc": Object { "end": Object { - "column": 43, - "line": 3, - }, - "start": Object { - "column": 42, - "line": 3, - }, - }, - "range": Array [ - 130, - 131, - ], - "type": "Punctuator", - "value": ">", - }, - Object { - "loc": Object { - "end": Object { - "column": 44, - "line": 3, + "column": 21, + "line": 1, }, "start": Object { - "column": 43, - "line": 3, + "column": 14, + "line": 1, }, }, "range": Array [ - 131, - 132, + 14, + 21, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 45, - "line": 3, + "column": 25, + "line": 1, }, "start": Object { - "column": 44, - "line": 3, + "column": 22, + "line": 1, }, }, "range": Array [ - 132, - 133, + 22, + 25, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 3, + "column": 27, + "line": 1, }, "start": Object { - "column": 46, - "line": 3, + "column": 26, + "line": 1, }, }, "range": Array [ - 134, - 135, + 26, + 27, ], "type": "Punctuator", "value": "{", @@ -43386,17 +41744,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 49, + "column": 1, "line": 3, }, "start": Object { - "column": 48, + "column": 0, "line": 3, }, }, "range": Array [ - 136, - 137, + 29, + 30, ], "type": "Punctuator", "value": "}", @@ -43406,205 +41764,115 @@ Object { } `; -exports[`typescript fixtures/basics/type-reference-comments.src 1`] = ` +exports[`typescript fixtures/basics/interface-extends-multiple.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [ - Object { - "computed": false, - "key": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 2, - }, - "start": Object { - "column": 2, - "line": 2, - }, + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 34, + ], + "type": "TSInterfaceBody", + }, + "extends": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, }, - "name": "mBuffers", - "range": Array [ - 26, - 34, - ], - "type": "Identifier", + "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 { + "expression": Object { "loc": Object { "end": Object { - "column": 51, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 26, + "line": 1, }, }, + "name": "Baz", "range": Array [ 26, - 75, + 29, ], - "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, + "type": "Identifier", }, - "start": Object { - "column": 22, - "line": 1, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, }, + "range": Array [ + 26, + 29, + ], + "type": "TSInterfaceHeritage", }, - "range": Array [ - 22, - 77, - ], - "type": "ClassBody", - }, + ], "id": Object { "loc": Object { "end": Object { - "column": 21, + "column": 13, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, - "name": "AudioBufferList", + "name": "Foo", "range": Array [ - 6, - 21, + 10, + 13, ], "type": "Identifier", }, @@ -43620,10 +41888,9 @@ Object { }, "range": Array [ 0, - 77, + 34, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSInterfaceDeclaration", }, ], "loc": Object { @@ -43638,14 +41905,14 @@ Object { }, "range": Array [ 0, - 78, + 35, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -43655,10 +41922,28 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "class", + "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 { @@ -43667,21 +41952,21 @@ Object { "line": 1, }, "start": Object { - "column": 6, + "column": 14, "line": 1, }, }, "range": Array [ - 6, + 14, 21, ], - "type": "Identifier", - "value": "AudioBufferList", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 25, "line": 1, }, "start": Object { @@ -43691,115 +41976,265 @@ Object { }, "range": Array [ 22, - 23, + 25, + ], + "type": "Identifier", + "value": "Bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 2, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ 26, - 34, + 29, ], "type": "Identifier", - "value": "mBuffers", + "value": "Baz", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 31, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, }, }, "range": Array [ + 33, 34, - 35, ], "type": "Punctuator", - "value": ":", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/interface-type-parameters.src 1`] = ` +Object { + "body": Array [ Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 21, + ], + "type": "TSInterfaceBody", + }, + "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": 19, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { - "column": 12, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 36, - 43, + 0, + 21, ], - "type": "Identifier", - "value": "interop", + "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": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "range": Array [ + 14, + 15, + ], + "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, + 22, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 9, + "line": 1, }, "start": Object { - "column": 19, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 43, - 44, + 0, + 9, ], - "type": "Punctuator", - "value": ".", + "type": "Keyword", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 20, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 44, - 53, + 10, + 13, ], "type": "Identifier", - "value": "Reference", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 29, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 53, - 54, + 13, + 14, ], "type": "Punctuator", "value": "<", @@ -43807,35 +42242,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 30, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 54, - 57, + 14, + 15, ], "type": "Identifier", - "value": "any", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 50, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 49, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 73, - 74, + 15, + 16, ], "type": "Punctuator", "value": ">", @@ -43843,20 +42278,20 @@ Object { Object { "loc": Object { "end": Object { - "column": 51, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 50, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 74, - 75, + 17, + 18, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { @@ -43870,8 +42305,8 @@ Object { }, }, "range": Array [ - 76, - 77, + 20, + 21, ], "type": "Punctuator", "value": "}", @@ -43881,11 +42316,10 @@ Object { } `; -exports[`typescript fixtures/basics/typed-this.src 1`] = ` +exports[`typescript fixtures/basics/interface-with-all-property-types.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, "body": Object { "body": Array [ Object { @@ -43893,1483 +42327,1289 @@ Object { "key": Object { "loc": Object { "end": Object { - "column": 17, + "column": 7, "line": 2, }, "start": Object { - "column": 1, + "column": 4, "line": 2, }, }, - "name": "addClickListener", + "name": "baa", "range": Array [ + 20, 23, - 39, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 65, + "column": 16, "line": 2, }, "start": Object { - "column": 1, + "column": 4, "line": 2, }, }, - "optional": false, - "params": Array [ - Object { + "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": 57, + "column": 15, "line": 2, }, "start": Object { - "column": 18, + "column": 9, "line": 2, }, }, - "name": "onclick", "range": Array [ - 40, - 79, + 25, + 31, ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, + "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, + }, + }, + "range": Array [ + 43, + 49, + ], + "type": "TSNumberKeyword", + }, + }, + }, + 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": 17, + "line": 4, + }, + "start": Object { + "column": 11, + "line": 4, + }, + }, + "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 { + "loc": Object { + "end": Object { + "column": 26, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "parameters": Array [ + 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 [ - 47, - 79, + 98, + 106, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 57, - "line": 2, + "column": 16, + "line": 6, }, "start": Object { - "column": 27, - "line": 2, + "column": 10, + "line": 6, }, }, - "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, + 100, + 106, ], - "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": "TSNumberKeyword", }, }, }, ], "range": Array [ - 23, - 87, + 94, + 116, ], - "static": false, - "type": "TSMethodSignature", + "type": "TSIndexSignature", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 64, - "line": 2, + "column": 25, + "line": 6, }, "start": Object { - "column": 58, - "line": 2, + "column": 17, + "line": 6, }, }, "range": Array [ - 80, - 86, + 107, + 115, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 64, - "line": 2, + "column": 25, + "line": 6, }, "start": Object { - "column": 60, - "line": 2, + "column": 19, + "line": 6, }, }, "range": Array [ - 82, - 86, + 109, + 115, ], - "type": "TSVoidKeyword", + "type": "TSStringKeyword", }, }, }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 89, - ], - "type": "TSInterfaceBody", - }, - "heritage": Array [], - "id": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "name": "UIElement", - "range": Array [ - 10, - 19, - ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 89, - ], - "type": "TSInterfaceDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 90, - ], - "sourceType": "script", - "tokens": Array [ - Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 9, - ], - "type": "Keyword", - "value": "interface", - }, - Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 10, - "line": 1, - }, - }, - "range": Array [ - 10, - 19, - ], - "type": "Identifier", - "value": "UIElement", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, - "range": Array [ - 20, - 21, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 1, - "line": 2, - }, - }, - "range": Array [ - 23, - 39, - ], - "type": "Identifier", - "value": "addClickListener", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, - }, - }, - "range": Array [ - 39, - 40, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 40, - 47, - ], - "type": "Identifier", - "value": "onclick", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 2, - }, - "start": Object { - "column": 25, - "line": 2, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 2, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 32, - "line": 2, - }, - "start": Object { - "column": 28, - "line": 2, - }, - }, - "range": Array [ - 50, - 54, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 2, - }, - "start": Object { - "column": 32, - "line": 2, - }, - }, - "range": Array [ - 54, - 55, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 38, - "line": 2, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 56, - 60, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 38, - "line": 2, - }, - }, - "range": Array [ - 60, - 61, - ], - "type": "Punctuator", - "value": ",", - }, - Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 40, - "line": 2, - }, - }, - "range": Array [ - 62, - 63, - ], - "type": "Identifier", - "value": "e", - }, - Object { - "loc": Object { - "end": Object { - "column": 42, - "line": 2, - }, - "start": Object { - "column": 41, - "line": 2, - }, - }, - "range": Array [ - 63, - 64, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 48, - "line": 2, - }, - "start": Object { - "column": 43, - "line": 2, - }, - }, - "range": Array [ - 65, - 70, - ], - "type": "Identifier", - "value": "Event", - }, - Object { - "loc": Object { - "end": Object { - "column": 49, - "line": 2, - }, - "start": Object { - "column": 48, - "line": 2, - }, - }, - "range": Array [ - 70, - 71, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 52, - "line": 2, - }, - "start": Object { - "column": 50, - "line": 2, - }, - }, - "range": Array [ - 72, - 74, - ], - "type": "Punctuator", - "value": "=>", - }, - Object { - "loc": Object { - "end": Object { - "column": 57, - "line": 2, - }, - "start": Object { - "column": 53, - "line": 2, - }, - }, - "range": Array [ - 75, - 79, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 58, - "line": 2, - }, - "start": Object { - "column": 57, - "line": 2, - }, - }, - "range": Array [ - 79, - 80, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 59, - "line": 2, - }, - "start": Object { - "column": 58, - "line": 2, - }, - }, - "range": Array [ - 80, - 81, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 64, - "line": 2, - }, - "start": Object { - "column": 60, - "line": 2, - }, - }, - "range": Array [ - 82, - 86, - ], - "type": "Keyword", - "value": "void", - }, - Object { - "loc": Object { - "end": Object { - "column": 65, - "line": 2, - }, - "start": Object { - "column": 64, - "line": 2, - }, - }, - "range": Array [ - 86, - 87, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 3, - }, - }, - "range": Array [ - 88, - 89, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/unique-symbol.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { + Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 27, + "line": 7, }, "start": Object { - "column": 5, - "line": 1, + "column": 4, + "line": 7, }, }, - "name": "A", + "parameters": Array [ + 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, + }, + "start": Object { + "column": 9, + "line": 7, + }, + }, + "range": Array [ + 126, + 134, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 7, + }, + "start": Object { + "column": 11, + "line": 7, + }, + }, + "range": Array [ + 128, + 134, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], "range": Array [ - 5, - 6, + 121, + 144, ], - "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", + "type": "TSIndexSignature", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 26, + "line": 7, }, "start": Object { - "column": 16, - "line": 1, + "column": 18, + "line": 7, }, }, "range": Array [ - 16, - 22, + 135, + 143, ], - "type": "TSSymbolKeyword", + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 7, + }, + "start": Object { + "column": 20, + "line": 7, + }, + }, + "range": Array [ + 137, + 143, + ], + "type": "TSStringKeyword", + }, }, }, - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": 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": "doo", + "range": Array [ + 149, + 152, + ], + "type": "Identifier", }, - }, - "range": Array [ - 5, - 23, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "type", - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 0, - "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": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 4, - ], - "type": "Identifier", - "value": "type", - }, - Object { - "loc": Object { - "end": Object { - "column": 6, - "line": 1, - }, - "start": Object { - "column": 5, - "line": 1, - }, - }, - "range": Array [ - 5, - 6, - ], - "type": "Identifier", - "value": "A", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "Identifier", - "value": "unique", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 22, - ], - "type": "Identifier", - "value": "symbol", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 1, - }, - "start": Object { - "column": 22, - "line": 1, - }, - }, - "range": Array [ - 22, - 23, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/unknown-type-annotation.src 1`] = ` -Object { - "body": Array [ - Object { - "declarations": Array [ - Object { - "id": Object { "loc": Object { "end": Object { "column": 16, - "line": 1, + "line": 8, }, "start": Object { "column": 4, - "line": 1, + "line": 8, }, }, - "name": "foo", + "params": Array [], "range": Array [ - 4, - 16, + 149, + 161, ], - "type": "Identifier", - "typeAnnotation": Object { + "returnType": Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 15, + "line": 8, }, "start": Object { - "column": 7, - "line": 1, + "column": 9, + "line": 8, }, }, "range": Array [ - 7, - 16, + 154, + 160, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 15, + "line": 8, }, "start": Object { - "column": 9, - "line": 1, + "column": 11, + "line": 8, }, }, "range": Array [ - 9, - 16, + 156, + 160, ], - "type": "TSUnknownKeyword", + "type": "TSVoidKeyword", }, }, + "type": "TSMethodSignature", }, - "init": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 4, - "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", }, - }, - "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, - ], - "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": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 3, - ], - "type": "Keyword", - "value": "let", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 7, - ], - "type": "Identifier", - "value": "foo", - }, - Object { - "loc": Object { - "end": Object { - "column": 8, - "line": 1, - }, - "start": Object { - "column": 7, - "line": 1, - }, - }, - "range": Array [ - 7, - 8, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 16, - ], - "type": "Identifier", - "value": "unknown", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 1, - }, - "start": Object { - "column": 16, - "line": 1, - }, - }, - "range": Array [ - 16, - 17, - ], - "type": "Punctuator", - "value": ";", - }, - ], - "type": "Program", -} -`; - -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, + "column": 24, + "line": 9, }, "start": Object { - "column": 6, - "line": 1, + "column": 4, + "line": 9, }, }, - "name": "x", - "range": Array [ - 6, - 16, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, + "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", }, - "range": Array [ - 8, - 16, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 13, + "line": 9, }, "start": Object { - "column": 10, - "line": 1, + "column": 12, + "line": 9, }, }, + "name": "b", "range": Array [ - 10, - 16, + 174, + 175, ], - "type": "TSStringKeyword", + "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, + ], + "returnType": 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", }, }, + "type": "TSMethodSignature", }, - "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, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 17, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": true, - "id": Object { + 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": 14, - "line": 2, + "column": 26, + "line": 10, }, "start": Object { "column": 4, - "line": 2, + "line": 10, }, }, - "name": "y", + "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 [ - 22, - 32, + 191, + 213, ], - "type": "Identifier", - "typeAnnotation": Object { + "returnType": Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 25, + "line": 10, }, "start": Object { - "column": 6, - "line": 2, + "column": 19, + "line": 10, }, }, "range": Array [ - 24, - 32, + 206, + 212, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 25, + "line": 10, }, "start": Object { - "column": 8, - "line": 2, + "column": 21, + "line": 10, }, }, "range": Array [ - 26, - 32, + 208, + 212, ], - "type": "TSNumberKeyword", + "type": "TSVoidKeyword", }, }, + "type": "TSMethodSignature", }, - "init": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, + 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", }, - }, - "range": Array [ - 22, - 32, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 2, - }, - }, - "range": Array [ - 18, - 33, - ], - "type": "VariableDeclaration", - }, - Object { - "declarations": Array [ - Object { - "definite": true, - "id": Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 26, + "line": 11, }, "start": Object { "column": 4, - "line": 3, + "line": 11, }, }, - "name": "z", + "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 [ - 38, - 48, + 218, + 240, ], - "type": "Identifier", - "typeAnnotation": Object { + "returnType": Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 25, + "line": 11, }, "start": Object { - "column": 6, - "line": 3, + "column": 19, + "line": 11, }, }, "range": Array [ - 40, - 48, + 233, + 239, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 25, + "line": 11, }, "start": Object { - "column": 8, - "line": 3, + "column": 21, + "line": 11, }, }, "range": Array [ - 42, - 48, + 235, + 239, ], - "type": "TSObjectKeyword", + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", + "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": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 11, + }, + "start": Object { + "column": 8, + "line": 11, + }, + }, + "name": "J", + "range": Array [ + 222, + 223, + ], + "type": "Identifier", + }, + "range": Array [ + 222, + 223, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 221, + 224, + ], + "type": "TSTypeParameterDeclaration", }, }, - "init": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 3, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 12, + }, + "start": Object { + "column": 4, + "line": 12, + }, }, - "start": Object { - "column": 4, - "line": 3, + "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, + ], + "returnType": 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", + }, }, + "type": "TSConstructSignatureDeclaration", }, - "range": Array [ - 38, - 48, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "let", - "loc": Object { - "end": Object { - "column": 15, - "line": 3, - }, - "start": Object { + 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, + ], + "returnType": 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", + }, + }, + "type": "TSConstructSignatureDeclaration", + "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": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 13, + }, + "start": Object { + "column": 9, + "line": 13, + }, + }, + "name": "F", + "range": Array [ + 275, + 276, + ], + "type": "Identifier", + }, + "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", + }, + "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": 3, + "line": 1, }, }, "range": Array [ - 34, - 49, + 0, + 295, ], - "type": "VariableDeclaration", + "type": "TSInterfaceDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 16, }, "start": Object { "column": 0, @@ -45378,14 +43618,14 @@ Object { }, "range": Array [ 0, - 50, + 297, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -45395,169 +43635,169 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "const", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 13, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 7, + 10, + 13, ], "type": "Identifier", - "value": "x", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 8, + "column": 15, "line": 1, }, "start": Object { - "column": 7, + "column": 14, "line": 1, }, }, "range": Array [ - 7, - 8, + 14, + 15, ], "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, + 20, + 23, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "baa", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 8, + "line": 2, }, "start": Object { - "column": 10, - "line": 1, + "column": 7, + "line": 2, }, }, "range": Array [ - 10, - 16, + 23, + 24, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 15, + "line": 2, }, "start": Object { - "column": 16, - "line": 1, + "column": 9, + "line": 2, }, }, "range": Array [ - 16, - 17, + 25, + 31, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 3, + "column": 16, "line": 2, }, "start": Object { - "column": 0, + "column": 15, "line": 2, }, }, "range": Array [ - 18, - 21, + 31, + 32, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { "column": 4, - "line": 2, + "line": 3, }, }, "range": Array [ - 22, - 23, + 37, + 40, ], "type": "Identifier", - "value": "y", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 2, + "column": 8, + "line": 3, }, "start": Object { - "column": 5, - "line": 2, + "column": 7, + "line": 3, }, }, "range": Array [ - 23, - 24, + 40, + 41, ], "type": "Punctuator", - "value": "!", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 2, + "column": 9, + "line": 3, }, "start": Object { - "column": 6, - "line": 2, + "column": 8, + "line": 3, }, }, "range": Array [ - 24, - 25, + 41, + 42, ], "type": "Punctuator", "value": ":", @@ -45565,17 +43805,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 16, + "line": 3, }, "start": Object { - "column": 8, - "line": 2, + "column": 10, + "line": 3, }, }, "range": Array [ - 26, - 32, + 43, + 49, ], "type": "Identifier", "value": "number", @@ -45583,17 +43823,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 17, + "line": 3, }, "start": Object { - "column": 14, - "line": 2, + "column": 16, + "line": 3, }, }, "range": Array [ - 32, - 33, + 49, + 50, ], "type": "Punctuator", "value": ";", @@ -45601,71 +43841,71 @@ Object { Object { "loc": Object { "end": Object { - "column": 3, - "line": 3, + "column": 5, + "line": 4, }, "start": Object { - "column": 0, - "line": 3, + "column": 4, + "line": 4, }, }, "range": Array [ - 34, - 37, + 55, + 56, ], - "type": "Keyword", - "value": "let", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 8, + "line": 4, }, "start": Object { - "column": 4, - "line": 3, + "column": 5, + "line": 4, }, }, "range": Array [ - 38, - 39, + 56, + 59, ], "type": "Identifier", - "value": "z", + "value": "bax", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 3, + "column": 9, + "line": 4, }, "start": Object { - "column": 5, - "line": 3, + "column": 8, + "line": 4, }, }, "range": Array [ - 39, - 40, + 59, + 60, ], "type": "Punctuator", - "value": "!", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 10, + "line": 4, }, "start": Object { - "column": 6, - "line": 3, + "column": 9, + "line": 4, }, }, "range": Array [ - 40, - 41, + 60, + 61, ], "type": "Punctuator", "value": ":", @@ -45673,2574 +43913,1727 @@ Object { Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 17, + "line": 4, }, "start": Object { - "column": 8, - "line": 3, + "column": 11, + "line": 4, }, }, "range": Array [ - 42, - 48, + 62, + 68, ], "type": "Identifier", - "value": "object", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 3, + "column": 18, + "line": 4, }, "start": Object { - "column": 14, - "line": 3, + "column": 17, + "line": 4, }, }, "range": Array [ - 48, - 49, + 68, + 69, ], "type": "Punctuator", "value": ";", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/var-with-dotted-type.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": "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": 14, - "line": 1, - }, - "start": Object { - "column": 9, - "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", - }, - "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", - }, - }, - }, - }, - "init": null, - "loc": Object { - "end": Object { - "column": 14, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 14, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 5, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 5, }, }, "range": Array [ - 0, - 15, + 74, + 75, ], - "type": "VariableDeclaration", - }, - ], - "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, - "line": 1, + "column": 8, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 5, + "line": 5, }, }, "range": Array [ - 0, - 3, + 75, + 78, ], - "type": "Keyword", - "value": "var", + "type": "Identifier", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 9, + "line": 5, }, "start": Object { - "column": 4, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 4, - 7, + 78, + 79, ], - "type": "Identifier", - "value": "foo", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 10, + "line": 5, }, "start": Object { - "column": 7, - "line": 1, + "column": 9, + "line": 5, }, }, "range": Array [ - 7, - 8, + 79, + 80, ], "type": "Punctuator", - "value": ":", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 11, + "line": 5, }, "start": Object { - "column": 9, - "line": 1, + "column": 10, + "line": 5, }, }, "range": Array [ - 9, - 10, + 80, + 81, ], - "type": "Identifier", - "value": "A", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 18, + "line": 5, }, "start": Object { - "column": 10, - "line": 1, + "column": 12, + "line": 5, }, }, "range": Array [ - 10, - 11, + 82, + 88, ], - "type": "Punctuator", - "value": ".", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 19, + "line": 5, }, "start": Object { - "column": 11, - "line": 1, + "column": 18, + "line": 5, }, }, "range": Array [ - 11, - 12, + 88, + 89, ], - "type": "Identifier", - "value": "B", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 5, + "line": 6, }, "start": Object { - "column": 12, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 12, - 13, + 94, + 95, ], "type": "Punctuator", - "value": ".", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 8, + "line": 6, }, "start": Object { - "column": 13, - "line": 1, + "column": 5, + "line": 6, }, }, "range": Array [ - 13, - 14, + 95, + 98, ], "type": "Identifier", - "value": "C", + "value": "eee", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 9, + "line": 6, }, "start": Object { - "column": 14, - "line": 1, + "column": 8, + "line": 6, }, }, "range": Array [ - 14, - 15, + 98, + 99, ], "type": "Punctuator", - "value": ";", + "value": ":", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/basics/var-with-type.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 { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 15, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 1, - }, - "start": Object { - "column": 9, - "line": 1, - }, - }, - "range": Array [ - 9, - 15, - ], - "type": "TSStringKeyword", - }, - }, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 18, - "line": 1, - }, - }, - "range": Array [ - 18, - 28, - ], - "raw": "\\"Nicholas\\"", - "type": "Literal", - "value": "Nicholas", - }, - "loc": Object { - "end": Object { - "column": 28, - "line": 1, - }, - "start": Object { - "column": 4, - "line": 1, - }, - }, - "range": Array [ - 4, - 28, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 16, + "line": 6, }, "start": Object { - "column": 0, - "line": 1, + "column": 10, + "line": 6, }, }, "range": Array [ - 0, - 29, + 100, + 106, ], - "type": "VariableDeclaration", + "type": "Identifier", + "value": "number", }, 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, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 7, - "line": 2, - }, - }, - "range": Array [ - 37, - 45, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 2, - }, - "start": Object { - "column": 9, - "line": 2, - }, - }, - "range": Array [ - 39, - 45, - ], - "type": "TSStringKeyword", - }, - }, - }, - "init": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 18, - "line": 2, - }, - }, - "range": Array [ - 48, - 53, - ], - "raw": "\\"Bar\\"", - "type": "Literal", - "value": "Bar", - }, - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 34, - 53, - ], - "type": "VariableDeclarator", - }, - ], - "kind": "var", "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 17, + "line": 6, }, "start": Object { - "column": 0, - "line": 2, + "column": 16, + "line": 6, }, }, "range": Array [ - 30, - 54, + 106, + 107, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "]", }, - }, - "range": Array [ - 0, - 55, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 18, + "line": 6, }, "start": Object { - "column": 0, - "line": 1, + "column": 17, + "line": 6, }, }, "range": Array [ - 0, - 3, + 107, + 108, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 25, + "line": 6, }, "start": Object { - "column": 4, - "line": 1, + "column": 19, + "line": 6, }, }, "range": Array [ - 4, - 8, + 109, + 115, ], "type": "Identifier", - "value": "name", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 26, + "line": 6, + }, + "start": Object { + "column": 25, + "line": 6, + }, + }, + "range": Array [ + 115, + 116, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 7, + }, + "start": Object { + "column": 4, + "line": 7, + }, + }, + "range": Array [ + 121, + 122, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 7, + }, + "start": Object { + "column": 5, + "line": 7, + }, + }, + "range": Array [ + 122, + 125, + ], + "type": "Identifier", + "value": "fff", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 7, }, "start": Object { "column": 8, - "line": 1, + "line": 7, }, }, "range": Array [ - 8, - 9, + 125, + 126, ], "type": "Punctuator", - "value": ":", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 10, + "line": 7, }, "start": Object { "column": 9, - "line": 1, + "line": 7, }, }, "range": Array [ - 9, - 15, + 126, + 127, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { "column": 17, - "line": 1, + "line": 7, }, "start": Object { - "column": 16, - "line": 1, + "column": 11, + "line": 7, }, }, "range": Array [ - 16, - 17, + 128, + 134, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 7, + }, + "start": Object { + "column": 17, + "line": 7, + }, + }, + "range": Array [ + 134, + 135, ], "type": "Punctuator", - "value": "=", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 1, + "column": 19, + "line": 7, }, "start": Object { "column": 18, - "line": 1, + "line": 7, }, }, "range": Array [ - 18, - 28, + 135, + 136, ], - "type": "String", - "value": "\\"Nicholas\\"", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 1, + "column": 26, + "line": 7, }, "start": Object { - "column": 28, - "line": 1, + "column": 20, + "line": 7, }, }, "range": Array [ - 28, - 29, + 137, + 143, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 2, + "column": 27, + "line": 7, }, "start": Object { - "column": 0, - "line": 2, + "column": 26, + "line": 7, }, }, "range": Array [ - 30, - 33, + 143, + 144, ], - "type": "Keyword", - "value": "var", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 7, - "line": 2, + "line": 8, }, "start": Object { "column": 4, - "line": 2, + "line": 8, }, }, "range": Array [ - 34, - 37, + 149, + 152, ], "type": "Identifier", - "value": "foo", + "value": "doo", }, Object { "loc": Object { "end": Object { "column": 8, - "line": 2, + "line": 8, }, "start": Object { "column": 7, - "line": 2, + "line": 8, }, }, "range": Array [ - 37, - 38, + 152, + 153, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 9, + "line": 8, }, "start": Object { - "column": 9, - "line": 2, + "column": 8, + "line": 8, }, }, "range": Array [ - 39, - 45, + 153, + 154, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 10, + "line": 8, }, "start": Object { - "column": 16, - "line": 2, + "column": 9, + "line": 8, }, }, "range": Array [ - 46, - 47, + 154, + 155, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 15, + "line": 8, }, "start": Object { - "column": 18, - "line": 2, + "column": 11, + "line": 8, }, }, "range": Array [ - 48, - 53, + 156, + 160, ], - "type": "String", - "value": "\\"Bar\\"", + "type": "Keyword", + "value": "void", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 16, + "line": 8, }, "start": Object { - "column": 23, - "line": 2, + "column": 15, + "line": 8, }, }, "range": Array [ - 53, - 54, + 160, + 161, ], "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", + "loc": Object { + "end": Object { + "column": 7, + "line": 9, + }, + "start": Object { + "column": 4, + "line": 9, }, + }, + "range": Array [ + 166, + 169, ], - "kind": "let", + "type": "Identifier", + "value": "doo", + }, + Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 8, + "line": 9, }, "start": Object { - "column": 0, - "line": 1, + "column": 7, + "line": 9, }, }, "range": Array [ - 0, - 22, + 169, + 170, ], - "type": "VariableDeclaration", + "type": "Punctuator", + "value": "?", }, - ], - "loc": Object { - "end": Object { - "column": 22, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 9, + }, + "start": Object { + "column": 8, + "line": 9, + }, + }, + "range": Array [ + 170, + 171, + ], + "type": "Punctuator", + "value": "(", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 9, + }, + "start": Object { + "column": 9, + "line": 9, + }, + }, + "range": Array [ + 171, + 172, + ], + "type": "Identifier", + "value": "a", }, - }, - "range": Array [ - 0, - 22, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 11, + "line": 9, }, "start": Object { - "column": 0, - "line": 1, + "column": 10, + "line": 9, }, }, "range": Array [ - 0, - 3, + 172, + 173, ], - "type": "Keyword", - "value": "let", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 13, + "line": 9, }, "start": Object { - "column": 4, - "line": 1, + "column": 12, + "line": 9, }, }, "range": Array [ - 4, - 5, + 174, + 175, ], "type": "Identifier", - "value": "x", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 14, + "line": 9, }, "start": Object { - "column": 8, - "line": 1, + "column": 13, + "line": 9, }, }, "range": Array [ - 8, - 9, + 175, + 176, ], "type": "Punctuator", - "value": ":", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 16, + "line": 9, }, "start": Object { "column": 15, - "line": 1, + "line": 9, }, }, "range": Array [ - 15, - 21, + 177, + 178, ], "type": "Identifier", - "value": "string", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 1, + "column": 17, + "line": 9, }, "start": Object { - "column": 21, - "line": 1, + "column": 16, + "line": 9, }, }, "range": Array [ - 21, - 22, + 178, + 179, ], "type": "Punctuator", - "value": ";", + "value": ")", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-factory-instance-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": 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, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Point", - "range": Array [ - 6, - 11, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 18, + "line": 9, }, "start": Object { - "column": 0, - "line": 1, + "column": 17, + "line": 9, }, }, "range": Array [ - 0, - 72, + 179, + 180, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": ":", }, - }, - "range": Array [ - 0, - 72, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 23, + "line": 9, }, "start": Object { - "column": 0, - "line": 1, + "column": 19, + "line": 9, }, }, "range": Array [ - 0, - 5, + 181, + 185, ], "type": "Keyword", - "value": "class", + "value": "void", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 24, + "line": 9, }, "start": Object { - "column": 6, - "line": 1, + "column": 23, + "line": 9, }, }, "range": Array [ - 6, - 11, + 185, + 186, ], - "type": "Identifier", - "value": "Point", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 5, + "line": 10, }, "start": Object { - "column": 12, - "line": 1, + "column": 4, + "line": 10, }, }, "range": Array [ - 12, - 13, + 191, + 192, ], "type": "Punctuator", - "value": "{", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 8, + "line": 10, }, "start": Object { - "column": 4, - "line": 2, + "column": 5, + "line": 10, }, }, "range": Array [ - 18, - 19, + 192, + 195, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "loo", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 9, + "line": 10, }, "start": Object { - "column": 5, - "line": 2, + "column": 8, + "line": 10, }, }, "range": Array [ - 19, - 31, + 195, + 196, ], - "type": "Identifier", - "value": "configurable", + "type": "Punctuator", + "value": "]", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 10, + "line": 10, }, "start": Object { - "column": 17, - "line": 2, + "column": 9, + "line": 10, }, }, "range": Array [ - 31, - 32, + 196, + 197, ], "type": "Punctuator", - "value": "(", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 11, + "line": 10, }, "start": Object { - "column": 18, - "line": 2, + "column": 10, + "line": 10, }, }, "range": Array [ - 32, - 37, + 197, + 198, ], - "type": "Boolean", - "value": "false", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 12, + "line": 10, }, "start": Object { - "column": 23, - "line": 2, + "column": 11, + "line": 10, }, }, "range": Array [ - 37, - 38, + 198, + 199, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 3, + "column": 13, + "line": 10, }, "start": Object { - "column": 4, - "line": 3, + "column": 12, + "line": 10, }, }, "range": Array [ - 43, - 46, + 199, + 200, ], - "type": "Identifier", - "value": "get", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 3, + "column": 15, + "line": 10, }, "start": Object { - "column": 8, - "line": 3, + "column": 14, + "line": 10, }, }, "range": Array [ - 47, - 48, + 201, + 202, ], "type": "Identifier", - "value": "x", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 3, + "column": 16, + "line": 10, }, "start": Object { - "column": 9, - "line": 3, + "column": 15, + "line": 10, }, }, "range": Array [ - 48, - 49, + 202, + 203, ], "type": "Punctuator", - "value": "(", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 18, + "line": 10, }, "start": Object { - "column": 10, - "line": 3, + "column": 17, + "line": 10, }, }, "range": Array [ - 49, - 50, + 204, + 205, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 19, + "line": 10, }, "start": Object { - "column": 12, - "line": 3, + "column": 18, + "line": 10, }, }, "range": Array [ - 51, - 52, + 205, + 206, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { "column": 20, - "line": 3, + "line": 10, }, "start": Object { - "column": 14, - "line": 3, + "column": 19, + "line": 10, }, }, "range": Array [ - 53, - 59, + 206, + 207, ], - "type": "Keyword", - "value": "return", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { "column": 25, - "line": 3, + "line": 10, }, "start": Object { "column": 21, - "line": 3, + "line": 10, }, }, "range": Array [ - 60, - 64, + 208, + 212, ], "type": "Keyword", - "value": "this", + "value": "void", }, Object { "loc": Object { "end": Object { "column": 26, - "line": 3, + "line": 10, }, "start": Object { "column": 25, - "line": 3, + "line": 10, }, }, "range": Array [ - 64, - 65, + 212, + 213, ], "type": "Punctuator", - "value": ".", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 3, + "column": 7, + "line": 11, }, "start": Object { - "column": 26, - "line": 3, + "column": 4, + "line": 11, }, }, "range": Array [ - 65, - 67, + 218, + 221, ], "type": "Identifier", - "value": "_x", + "value": "boo", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 3, + "column": 8, + "line": 11, }, "start": Object { - "column": 28, - "line": 3, + "column": 7, + "line": 11, }, }, "range": Array [ - 67, - 68, + 221, + 222, ], "type": "Punctuator", - "value": ";", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 3, + "column": 9, + "line": 11, }, "start": Object { - "column": 30, - "line": 3, + "column": 8, + "line": 11, }, }, "range": Array [ - 69, - 70, + 222, + 223, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "J", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 10, + "line": 11, }, "start": Object { - "column": 0, - "line": 4, + "column": 9, + "line": 11, }, }, "range": Array [ - 71, - 72, + 223, + 224, ], "type": "Punctuator", - "value": "}", + "value": ">", }, - ], - "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, - }, - }, - "range": Array [ - 12, - 82, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "Other", - "range": Array [ - 6, - 11, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 11, + "line": 11, }, "start": Object { - "column": 0, - "line": 1, + "column": 10, + "line": 11, }, }, "range": Array [ - 0, - 82, + 224, + 225, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "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": 5, - "line": 1, + "column": 12, + "line": 11, }, "start": Object { - "column": 0, - "line": 1, + "column": 11, + "line": 11, }, }, "range": Array [ - 0, - 5, + 225, + 226, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 1, + "column": 13, + "line": 11, }, "start": Object { - "column": 6, - "line": 1, + "column": 12, + "line": 11, }, }, "range": Array [ - 6, - 11, + 226, + 227, ], - "type": "Identifier", - "value": "Other", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 15, + "line": 11, }, "start": Object { - "column": 12, - "line": 1, + "column": 14, + "line": 11, }, }, "range": Array [ - 12, - 13, + 228, + 229, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 16, + "line": 11, }, "start": Object { - "column": 4, - "line": 2, + "column": 15, + "line": 11, }, }, "range": Array [ - 18, - 19, + 229, + 230, ], "type": "Punctuator", - "value": "@", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 18, + "line": 11, }, "start": Object { - "column": 5, - "line": 2, + "column": 17, + "line": 11, }, }, "range": Array [ - 19, - 22, + 231, + 232, ], "type": "Identifier", - "value": "foo", + "value": "c", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 19, + "line": 11, }, "start": Object { - "column": 8, - "line": 2, + "column": 18, + "line": 11, }, }, "range": Array [ - 22, - 23, + 232, + 233, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 20, + "line": 11, }, "start": Object { - "column": 9, - "line": 2, + "column": 19, + "line": 11, }, }, "range": Array [ - 23, - 24, + 233, + 234, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 25, + "line": 11, }, "start": Object { - "column": 11, - "line": 2, + "column": 21, + "line": 11, }, }, "range": Array [ - 25, - 28, + 235, + 239, ], - "type": "Identifier", - "value": "baz", + "type": "Keyword", + "value": "void", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 26, + "line": 11, }, "start": Object { - "column": 14, - "line": 2, + "column": 25, + "line": 11, }, }, "range": Array [ - 28, - 29, + 239, + 240, ], "type": "Punctuator", - "value": ":", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 7, + "line": 12, }, "start": Object { - "column": 16, - "line": 2, + "column": 4, + "line": 12, }, }, "range": Array [ - 30, - 34, + 245, + 248, ], - "type": "Boolean", - "value": "true", + "type": "Keyword", + "value": "new", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 9, + "line": 12, }, "start": Object { - "column": 21, - "line": 2, + "column": 8, + "line": 12, }, }, "range": Array [ - 35, - 36, + 249, + 250, ], "type": "Punctuator", - "value": "}", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 10, + "line": 12, }, "start": Object { - "column": 22, - "line": 2, + "column": 9, + "line": 12, }, }, "range": Array [ - 36, - 37, + 250, + 251, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { + "column": 11, + "line": 12, + }, + "start": Object { "column": 10, - "line": 3, + "line": 12, + }, + }, + "range": Array [ + 251, + 252, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 12, }, "start": Object { - "column": 4, - "line": 3, + "column": 12, + "line": 12, }, }, "range": Array [ - 42, - 48, + 253, + 254, ], - "type": "Keyword", - "value": "static", + "type": "Identifier", + "value": "b", }, Object { "loc": Object { "end": Object { "column": 14, - "line": 3, + "line": 12, }, "start": Object { - "column": 11, - "line": 3, + "column": 13, + "line": 12, }, }, "range": Array [ - 49, - 52, + 254, + 255, ], - "type": "Identifier", - "value": "get", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 3, + "column": 15, + "line": 12, + }, + "start": Object { + "column": 14, + "line": 12, + }, + }, + "range": Array [ + 255, + 256, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 12, }, "start": Object { "column": 15, - "line": 3, + "line": 12, }, }, "range": Array [ - 53, - 56, + 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": "bar", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 3, + "column": 24, + "line": 12, }, "start": Object { - "column": 18, - "line": 3, + "column": 23, + "line": 12, }, }, "range": Array [ - 56, - 57, + 264, + 265, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 3, + "column": 7, + "line": 13, }, "start": Object { - "column": 19, - "line": 3, + "column": 4, + "line": 13, }, }, "range": Array [ - 57, - 58, + 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": ")", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 3, + "column": 10, + "line": 13, }, "start": Object { - "column": 21, - "line": 3, + "column": 9, + "line": 13, }, }, "range": Array [ - 59, - 60, + 275, + 276, + ], + "type": "Identifier", + "value": "F", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 13, + }, + "start": Object { + "column": 10, + "line": 13, + }, + }, + "range": Array [ + 276, + 277, ], "type": "Punctuator", - "value": "{", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 3, + "column": 12, + "line": 13, }, "start": Object { - "column": 23, - "line": 3, + "column": 11, + "line": 13, }, }, "range": Array [ - 61, - 67, + 277, + 278, ], - "type": "Keyword", - "value": "return", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 3, + "column": 13, + "line": 13, }, "start": Object { - "column": 30, - "line": 3, + "column": 12, + "line": 13, }, }, "range": Array [ - 68, - 72, + 278, + 279, ], - "type": "Keyword", - "value": "this", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 3, + "column": 14, + "line": 13, }, "start": Object { - "column": 34, - "line": 3, + "column": 13, + "line": 13, }, }, "range": Array [ - 72, - 73, + 279, + 280, ], "type": "Punctuator", - "value": ".", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 3, + "column": 16, + "line": 13, }, "start": Object { - "column": 35, - "line": 3, + "column": 15, + "line": 13, }, }, "range": Array [ - 73, - 77, + 281, + 282, ], "type": "Identifier", - "value": "_bar", + "value": "b", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 3, + "column": 17, + "line": 13, }, "start": Object { - "column": 39, - "line": 3, + "column": 16, + "line": 13, }, }, "range": Array [ - 77, - 78, + 282, + 283, ], "type": "Punctuator", - "value": ";", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 3, + "column": 18, + "line": 13, }, "start": Object { - "column": 41, - "line": 3, + "column": 17, + "line": 13, }, }, "range": Array [ - 79, - 80, + 283, + 284, ], "type": "Punctuator", - "value": "}", + "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": 4, + "line": 14, }, "start": Object { "column": 0, - "line": 4, + "line": 14, }, }, "range": Array [ - 81, - 82, + 294, + 295, ], "type": "Punctuator", "value": "}", @@ -48250,237 +45643,142 @@ Object { } `; -exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-instance-member.src 1`] = ` +exports[`typescript fixtures/basics/interface-with-construct-signature-with-parameter-accessibility.src 1`] = ` Object { "body": Array [ Object { "body": Object { "body": Array [ Object { - "computed": false, - "decorators": Array [ + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "params": Array [ Object { - "expression": Object { + "accessibility": "public", + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "parameter": Object { "loc": Object { "end": Object { - "column": 11, + "column": 17, "line": 2, }, "start": Object { - "column": 5, + "column": 16, "line": 2, }, }, - "name": "hidden", + "name": "x", "range": Array [ - 15, - 21, + 33, + 34, ], "type": "Identifier", }, + "range": Array [ + 26, + 34, + ], + "type": "TSParameterProperty", + }, + Object { + "accessibility": "private", "loc": Object { "end": Object { - "column": 11, + "column": 28, "line": 2, }, "start": Object { - "column": 4, + "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 [ - 14, - 21, + 36, + 45, ], - "type": "Decorator", + "type": "TSParameterProperty", }, ], - "key": Object { - "loc": Object { - "end": Object { - "column": 9, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "name": "z", - "range": Array [ - 30, - 31, - ], - "type": "Identifier", - }, - "kind": "get", - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, "range": Array [ - 14, - 53, + 21, + 47, ], - "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 [ - 43, - 47, - ], - "type": "ThisExpression", - }, - "property": Object { - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "name": "_z", - "range": Array [ - 48, - 50, - ], - "type": "Identifier", - }, - "range": Array [ - 43, - 50, - ], - "type": "MemberExpression", - }, - "loc": Object { - "end": Object { - "column": 29, - "line": 3, - }, - "start": Object { - "column": 14, - "line": 3, - }, - }, - "range": Array [ - 36, - 51, - ], - "type": "ReturnStatement", - }, - ], - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 12, - "line": 3, - }, - }, - "range": Array [ - 34, - 53, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 31, - "line": 3, - }, - "start": Object { - "column": 9, - "line": 3, - }, - }, - "params": Array [], - "range": Array [ - 31, - 53, - ], - "type": "FunctionExpression", - }, + "type": "TSConstructSignatureDeclaration", }, ], "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, "range": Array [ - 8, - 55, + 15, + 49, ], - "type": "ClassBody", + "type": "TSInterfaceBody", }, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, - "name": "P", + "name": "Test", "range": Array [ - 6, - 7, + 10, + 14, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { "column": 0, @@ -48489,15 +45787,14 @@ Object { }, "range": Array [ 0, - 55, + 49, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSInterfaceDeclaration", }, ], "loc": Object { "end": Object { - "column": 1, + "column": 0, "line": 4, }, "start": Object { @@ -48507,14 +45804,14 @@ Object { }, "range": Array [ 0, - 55, + 50, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -48524,43 +45821,43 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "class", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 7, + 10, + 14, ], "type": "Identifier", - "value": "P", + "value": "Test", }, 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": "{", @@ -48568,7 +45865,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 2, }, "start": Object { @@ -48577,111 +45874,75 @@ Object { }, }, "range": Array [ - 14, - 15, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, - }, - "range": Array [ - 15, 21, + 24, ], - "type": "Identifier", - "value": "hidden", - }, - Object { - "loc": Object { - "end": Object { - "column": 7, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 26, - 29, - ], - "type": "Identifier", - "value": "get", + "type": "Keyword", + "value": "new", }, Object { "loc": Object { "end": Object { "column": 9, - "line": 3, + "line": 2, }, "start": Object { "column": 8, - "line": 3, + "line": 2, }, }, "range": Array [ - 30, - 31, + 25, + 26, ], - "type": "Identifier", - "value": "z", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 3, + "column": 15, + "line": 2, }, "start": Object { "column": 9, - "line": 3, + "line": 2, }, }, "range": Array [ - 31, + 26, 32, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 17, + "line": 2, }, "start": Object { - "column": 10, - "line": 3, + "column": 16, + "line": 2, }, }, "range": Array [ - 32, 33, + 34, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 18, + "line": 2, }, "start": Object { - "column": 12, - "line": 3, + "column": 17, + "line": 2, }, }, "range": Array [ @@ -48689,130 +45950,94 @@ Object { 35, ], "type": "Punctuator", - "value": "{", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 3, + "column": 26, + "line": 2, }, "start": Object { - "column": 14, - "line": 3, + "column": 19, + "line": 2, }, }, "range": Array [ 36, - 42, - ], - "type": "Keyword", - "value": "return", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ 43, - 47, ], "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 26, - "line": 3, - }, - "start": Object { - "column": 25, - "line": 3, - }, - }, - "range": Array [ - 47, - 48, - ], - "type": "Punctuator", - "value": ".", + "value": "private", }, Object { "loc": Object { "end": Object { "column": 28, - "line": 3, + "line": 2, }, "start": Object { - "column": 26, - "line": 3, + "column": 27, + "line": 2, }, }, "range": Array [ - 48, - 50, + 44, + 45, ], "type": "Identifier", - "value": "_z", + "value": "y", }, Object { "loc": Object { "end": Object { "column": 29, - "line": 3, + "line": 2, }, "start": Object { "column": 28, - "line": 3, + "line": 2, }, }, "range": Array [ - 50, - 51, + 45, + 46, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 3, + "column": 30, + "line": 2, }, "start": Object { - "column": 30, - "line": 3, + "column": 29, + "line": 2, }, }, "range": Array [ - 52, - 53, + 46, + 47, ], "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 [ - 54, - 55, + 48, + 49, ], "type": "Punctuator", "value": "}", @@ -48822,310 +46047,212 @@ Object { } `; -exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-static-member.src 1`] = ` +exports[`typescript fixtures/basics/interface-with-extends-type-parameters.src 1`] = ` Object { "body": Array [ Object { "body": Object { - "body": Array [ - Object { - "computed": false, - "decorators": Array [ + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 36, + ], + "type": "TSInterfaceBody", + }, + "extends": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "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, + }, + }, + "params": Array [ Object { - "expression": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 30, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 29, + "line": 1, }, }, - "name": "adminonly", + "name": "J", "range": Array [ - 18, - 27, + 29, + 30, ], "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 14, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 27, - ], - "type": "Decorator", }, ], - "key": Object { + "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, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 15, + "line": 1, }, "start": Object { - "column": 15, - "line": 3, + "column": 14, + "line": 1, }, }, - "name": "y", + "name": "T", "range": Array [ - 43, - 44, + 14, + 15, ], "type": "Identifier", }, - "kind": "set", - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, "range": Array [ - 17, - 76, + 14, + 15, ], - "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", - }, - ], - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 3, - }, - }, - "range": Array [ - 48, - 76, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 16, - "line": 3, - }, - }, - "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, + "type": "TSTypeParameter", }, - }, - "range": Array [ - 11, - 78, ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "User", "range": Array [ - 6, - 10, + 13, + 16, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 78, - ], - "superClass": null, - "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -49134,14 +46261,14 @@ Object { }, "range": Array [ 0, - 78, + 37, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -49151,205 +46278,187 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "class", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 13, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, 10, + 13, ], "type": "Identifier", - "value": "User", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 14, "line": 1, }, "start": Object { - "column": 11, + "column": 13, "line": 1, }, }, "range": Array [ - 11, - 12, + 13, + 14, ], "type": "Punctuator", - "value": "{", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 18, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { "column": 14, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, + "line": 1, }, }, "range": Array [ - 18, - 27, + 14, + 15, ], "type": "Identifier", - "value": "adminonly", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 3, + "column": 16, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 15, + "line": 1, }, }, "range": Array [ - 32, - 38, + 15, + 16, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 3, + "column": 24, + "line": 1, }, "start": Object { - "column": 11, - "line": 3, + "column": 17, + "line": 1, }, }, "range": Array [ - 39, - 42, + 17, + 24, ], - "type": "Identifier", - "value": "set", + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 3, + "column": 28, + "line": 1, }, "start": Object { - "column": 15, - "line": 3, + "column": 25, + "line": 1, }, }, "range": Array [ - 43, - 44, + 25, + 28, ], "type": "Identifier", - "value": "y", + "value": "Bar", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 3, + "column": 29, + "line": 1, }, "start": Object { - "column": 16, - "line": 3, + "column": 28, + "line": 1, }, }, "range": Array [ - 44, - 45, + 28, + 29, ], "type": "Punctuator", - "value": "(", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 3, + "column": 30, + "line": 1, }, "start": Object { - "column": 17, - "line": 3, + "column": 29, + "line": 1, }, }, "range": Array [ - 45, - 46, + 29, + 30, ], "type": "Identifier", - "value": "a", + "value": "J", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 3, + "column": 31, + "line": 1, }, "start": Object { - "column": 18, - "line": 3, + "column": 30, + "line": 1, }, }, "range": Array [ - 46, - 47, + 30, + 31, ], "type": "Punctuator", - "value": ")", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 3, + "column": 33, + "line": 1, }, "start": Object { - "column": 20, - "line": 3, + "column": 32, + "line": 1, }, }, "range": Array [ - 48, - 49, + 32, + 33, ], "type": "Punctuator", "value": "{", @@ -49357,251 +46466,141 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, - "line": 4, - }, - "start": Object { - "column": 8, - "line": 4, - }, - }, - "range": Array [ - 58, - 62, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 4, + "column": 1, + "line": 3, }, "start": Object { - "column": 12, - "line": 4, + "column": 0, + "line": 3, }, }, "range": Array [ - 62, - 63, + 35, + 36, ], "type": "Punctuator", - "value": ".", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/interface-with-generic.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 15, - "line": 4, - }, - "start": Object { - "column": 13, - "line": 4, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 1, + }, }, + "range": Array [ + 18, + 21, + ], + "type": "TSInterfaceBody", }, - "range": Array [ - 63, - 65, - ], - "type": "Identifier", - "value": "_y", - }, - Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 4, - }, - "start": Object { - "column": 16, - "line": 4, + "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 [ - 66, - 67, - ], - "type": "Punctuator", - "value": "=", - }, - Object { "loc": Object { "end": Object { - "column": 19, - "line": 4, + "column": 1, + "line": 2, }, "start": Object { - "column": 18, - "line": 4, + "column": 0, + "line": 1, }, }, "range": Array [ - 68, - 69, - ], - "type": "Identifier", - "value": "a", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 5, - }, - "start": Object { - "column": 4, - "line": 5, - }, - }, - "range": Array [ - 75, - 76, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 6, - }, - }, - "range": Array [ - 77, - 78, + 0, + 21, ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/class-decorators/class-decorator.src 1`] = ` -Object { - "body": Array [ - Object { - "body": Object { - "body": Array [], + "type": "TSInterfaceDeclaration", + "typeParameters": Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 14, + "line": 1, }, }, - "range": Array [ - 18, - 20, - ], - "type": "ClassBody", - }, - "decorators": Array [ - Object { - "expression": Object { + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 7, + "column": 16, "line": 1, }, "start": Object { - "column": 1, + "column": 15, "line": 1, }, }, - "name": "sealed", + "name": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, "range": Array [ - 1, - 7, + 15, + 16, ], - "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, + "type": "TSTypeParameter", }, - }, - "name": "Qux", + ], "range": Array [ 14, 17, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 20, - ], - "superClass": null, - "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 0, + "line": 3, }, "start": Object { "column": 0, @@ -49610,14 +46609,14 @@ Object { }, "range": Array [ 0, - 20, + 22, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 9, "line": 1, }, "start": Object { @@ -49627,74 +46626,92 @@ Object { }, "range": Array [ 0, - 1, + 9, ], - "type": "Punctuator", - "value": "@", + "type": "Keyword", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 1, }, "start": Object { - "column": 1, + "column": 10, "line": 1, }, }, "range": Array [ - 1, - 7, + 10, + 14, ], "type": "Identifier", - "value": "sealed", + "value": "Test", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 0, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 8, - 13, + 14, + 15, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 6, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 14, - 17, + 15, + 16, ], "type": "Identifier", - "value": "Qux", + "value": "T", }, 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 [ + 16, + 17, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, }, }, "range": Array [ @@ -49707,17 +46724,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, + "column": 1, "line": 2, }, "start": Object { - "column": 11, + "column": 0, "line": 2, }, }, "range": Array [ - 19, 20, + 21, ], "type": "Punctuator", "value": "}", @@ -49727,183 +46744,107 @@ Object { } `; -exports[`typescript fixtures/decorators/class-decorators/class-decorator-factory.src 1`] = ` +exports[`typescript fixtures/basics/interface-with-jsdoc.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 { + "body": Array [ + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 10, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 1, - "line": 1, + "column": 4, + "line": 6, }, }, - "name": "Component", + "name": "foo", "range": Array [ - 1, - 10, + 76, + 79, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 2, - "line": 3, + "column": 13, + "line": 6, }, "start": Object { - "column": 1, - "line": 1, + "column": 4, + "line": 6, }, }, + "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 [ - 1, - 36, + 76, + 85, ], - "type": "CallExpression", + "type": "TSMethodSignature", }, - "loc": Object { - "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { - "column": 0, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 7, + }, + "start": Object { + "column": 15, + "line": 1, }, - "range": Array [ - 0, - 36, - ], - "type": "Decorator", }, - ], + "range": Array [ + 15, + 87, + ], + "type": "TSInterfaceBody", + }, "id": Object { "loc": Object { "end": Object { - "column": 18, - "line": 4, + "column": 14, + "line": 1, }, "start": Object { - "column": 6, - "line": 4, + "column": 10, + "line": 1, }, }, - "name": "FooComponent", + "name": "Test", "range": Array [ - 43, - 55, + 10, + 14, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 21, - "line": 4, + "column": 1, + "line": 7, }, "start": Object { "column": 0, @@ -49912,16 +46853,15 @@ Object { }, "range": Array [ 0, - 58, + 87, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSInterfaceDeclaration", }, ], "loc": Object { "end": Object { - "column": 21, - "line": 4, + "column": 0, + "line": 8, }, "start": Object { "column": 0, @@ -49930,14 +46870,14 @@ Object { }, "range": Array [ 0, - 58, + 88, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 9, "line": 1, }, "start": Object { @@ -49947,241 +46887,151 @@ Object { }, "range": Array [ 0, - 1, + 9, ], - "type": "Punctuator", - "value": "@", + "type": "Keyword", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 14, "line": 1, }, "start": Object { - "column": 1, + "column": 10, "line": 1, }, }, "range": Array [ - 1, 10, + 14, ], "type": "Identifier", - "value": "Component", + "value": "Test", }, 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": "(", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 1, + "column": 7, + "line": 6, }, "start": Object { - "column": 11, - "line": 1, + "column": 4, + "line": 6, }, }, "range": Array [ - 11, - 12, + 76, + 79, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, - }, - "range": Array [ - 17, - 25, - ], - "type": "Identifier", - "value": "selector", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 2, + "column": 8, + "line": 6, }, "start": Object { - "column": 12, - "line": 2, + "column": 7, + "line": 6, }, }, "range": Array [ - 25, - 26, + 79, + 80, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 2, + "column": 11, + "line": 6, }, "start": Object { - "column": 14, - "line": 2, + "column": 8, + "line": 6, }, }, "range": Array [ - 27, - 32, + 80, + 83, ], - "type": "String", - "value": "'foo'", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 2, + "column": 12, + "line": 6, }, "start": Object { - "column": 19, - "line": 2, + "column": 11, + "line": 6, }, }, "range": Array [ - 32, - 33, + 83, + 84, ], "type": "Punctuator", - "value": ",", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 13, + "line": 6, }, "start": Object { - "column": 0, - "line": 3, + "column": 12, + "line": 6, }, }, "range": Array [ - 34, - 35, + 84, + 85, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 2, - "line": 3, - }, - "start": Object { "column": 1, - "line": 3, - }, - }, - "range": Array [ - 35, - 36, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, + "line": 7, }, "start": Object { "column": 0, - "line": 4, - }, - }, - "range": Array [ - 37, - 42, - ], - "type": "Keyword", - "value": "class", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 4, - }, - "start": Object { - "column": 6, - "line": 4, - }, - }, - "range": Array [ - 43, - 55, - ], - "type": "Identifier", - "value": "FooComponent", - }, - Object { - "loc": Object { - "end": Object { - "column": 20, - "line": 4, - }, - "start": Object { - "column": 19, - "line": 4, - }, - }, - "range": Array [ - 56, - 57, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 4, - }, - "start": Object { - "column": 20, - "line": 4, + "line": 7, }, }, "range": Array [ - 57, - 58, + 86, + 87, ], "type": "Punctuator", "value": "}", @@ -50191,7 +47041,7 @@ Object { } `; -exports[`typescript fixtures/decorators/method-decorators/method-decorator-factory-instance-member.src 1`] = ` +exports[`typescript fixtures/basics/interface-with-method.src 1`] = ` Object { "body": Array [ Object { @@ -50199,155 +47049,340 @@ Object { "body": Array [ Object { "computed": false, - "decorators": Array [ + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "h", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "params": 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, + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 21, + 32, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, }, + }, + "range": Array [ + 24, + 32, ], - "callee": Object { + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 2, }, "start": Object { - "column": 5, + "column": 9, "line": 2, }, }, - "name": "onlyRead", "range": Array [ - 15, - 23, + 26, + 32, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 20, - "line": 2, - }, - "start": Object { - "column": 5, - "line": 2, - }, + "type": "TSStringKeyword", }, - "range": Array [ - 15, - 30, - ], - "type": "CallExpression", }, + }, + ], + "range": Array [ + 19, + 40, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 33, + 39, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 20, + "column": 22, "line": 2, }, "start": Object { - "column": 4, + "column": 18, "line": 2, }, }, "range": Array [ - 14, - 30, + 35, + 39, ], - "type": "Decorator", + "type": "TSVoidKeyword", }, - ], + }, + "type": "TSMethodSignature", + }, + Object { + "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 18, + "column": 3, "line": 3, }, "start": Object { - "column": 4, + "column": 2, "line": 3, }, }, - "name": "instanceMethod", + "name": "g", "range": Array [ - 35, - 49, + 43, + 44, ], "type": "Identifier", }, - "kind": "method", "loc": Object { "end": Object { - "column": 23, + "column": 18, "line": 3, }, "start": Object { - "column": 4, - "line": 2, + "column": 2, + "line": 3, }, }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 48, + 54, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 51, + 54, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "name": "T", + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + }, + }, + }, + }, + ], "range": Array [ - 14, - 54, + 43, + 59, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 55, + 58, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 23, + "column": 17, "line": 3, }, "start": Object { - "column": 21, + "column": 16, "line": 3, }, }, "range": Array [ - 52, - 54, + 57, + 58, ], - "type": "BlockStatement", + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "name": "T", + "range": Array [ + 57, + 58, + ], + "type": "Identifier", + }, }, - "expression": false, - "generator": false, - "id": null, + }, + "type": "TSMethodSignature", + "typeParameters": Object { "loc": Object { "end": Object { - "column": 23, + "column": 6, "line": 3, }, "start": Object { - "column": 18, + "column": 3, "line": 3, }, }, - "params": Array [], + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "T", + "range": Array [ + 45, + 46, + ], + "type": "Identifier", + }, + "range": Array [ + 45, + 46, + ], + "type": "TSTypeParameter", + }, + ], "range": Array [ - 49, - 54, + 44, + 47, ], - "type": "FunctionExpression", + "type": "TSTypeParameterDeclaration", }, }, ], @@ -50357,31 +47392,31 @@ Object { "line": 4, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, "range": Array [ - 8, - 56, + 15, + 61, ], - "type": "ClassBody", + "type": "TSInterfaceBody", }, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, - "name": "B", + "name": "test", "range": Array [ - 6, - 7, + 10, + 14, ], "type": "Identifier", }, @@ -50397,10 +47432,9 @@ Object { }, "range": Array [ 0, - 56, + 61, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSInterfaceDeclaration", }, ], "loc": Object { @@ -50415,14 +47449,14 @@ Object { }, "range": Array [ 0, - 57, + 62, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -50432,43 +47466,43 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "class", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 7, + 10, + 14, ], "type": "Identifier", - "value": "B", + "value": "test", }, 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": "{", @@ -50476,685 +47510,380 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "range": Array [ - 14, - 15, + 19, + 20, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "h", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 4, "line": 2, }, "start": Object { - "column": 5, + "column": 3, "line": 2, }, }, "range": Array [ - 15, - 23, + 20, + 21, ], - "type": "Identifier", - "value": "onlyRead", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 7, "line": 2, }, "start": Object { - "column": 13, + "column": 4, "line": 2, }, }, "range": Array [ - 23, + 21, 24, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 8, "line": 2, }, "start": Object { - "column": 14, + "column": 7, "line": 2, }, }, "range": Array [ 24, - 29, + 25, ], - "type": "Boolean", - "value": "false", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 15, "line": 2, }, "start": Object { - "column": 19, + "column": 9, "line": 2, }, }, "range": Array [ - 29, - 30, + 26, + 32, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 3, + "column": 16, + "line": 2, }, "start": Object { - "column": 4, - "line": 3, + "column": 15, + "line": 2, }, }, "range": Array [ - 35, - 49, + 32, + 33, ], - "type": "Identifier", - "value": "instanceMethod", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 3, + "column": 17, + "line": 2, }, "start": Object { - "column": 18, - "line": 3, + "column": 16, + "line": 2, }, }, "range": Array [ - 49, - 50, + 33, + 34, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 3, + "column": 22, + "line": 2, }, "start": Object { - "column": 19, - "line": 3, + "column": 18, + "line": 2, }, }, "range": Array [ - 50, - 51, + 35, + 39, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "void", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 3, + "column": 23, + "line": 2, }, "start": Object { - "column": 21, - "line": 3, + "column": 22, + "line": 2, }, }, "range": Array [ - 52, - 53, + 39, + 40, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 3, "line": 3, }, "start": Object { - "column": 22, + "column": 2, "line": 3, }, }, "range": Array [ - 53, - 54, + 43, + 44, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "g", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 4, + "line": 3, }, "start": Object { - "column": 0, - "line": 4, + "column": 3, + "line": 3, }, }, "range": Array [ - 55, - 56, + 44, + 45, ], "type": "Punctuator", - "value": "}", + "value": "<", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/method-decorators/method-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": 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", - }, - ], - "key": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "name": "staticMethod", - "range": Array [ - 37, - 49, - ], - "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 [], - "loc": Object { - "end": Object { - "column": 28, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 52, - 54, - ], - "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 [ - 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, - }, - }, - "name": "C", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 5, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 4, + "line": 3, }, }, "range": Array [ - 0, - 56, + 45, + 46, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "T", }, - }, - "range": Array [ - 0, - 57, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 6, + "line": 3, }, "start": Object { - "column": 0, - "line": 1, + "column": 5, + "line": 3, }, }, "range": Array [ - 0, - 5, + 46, + 47, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { "column": 7, - "line": 1, + "line": 3, }, "start": Object { "column": 6, - "line": 1, + "line": 3, }, }, "range": Array [ - 6, - 7, + 47, + 48, ], - "type": "Identifier", - "value": "C", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 10, + "line": 3, }, "start": Object { - "column": 8, - "line": 1, + "column": 7, + "line": 3, }, }, "range": Array [ - 8, - 9, + 48, + 51, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 11, + "line": 3, }, "start": Object { - "column": 4, - "line": 2, + "column": 10, + "line": 3, }, }, "range": Array [ - 14, - 15, + 51, + 52, ], "type": "Punctuator", - "value": "@", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 13, + "line": 3, }, "start": Object { - "column": 5, - "line": 2, + "column": 12, + "line": 3, }, }, "range": Array [ - 15, - 18, + 53, + 54, ], "type": "Identifier", - "value": "Foo", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 14, + "line": 3, }, "start": Object { - "column": 8, - "line": 2, + "column": 13, + "line": 3, }, }, "range": Array [ - 18, - 19, + 54, + 55, ], "type": "Punctuator", - "value": "(", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 15, + "line": 3, }, "start": Object { - "column": 9, - "line": 2, + "column": 14, + "line": 3, }, }, "range": Array [ - 19, - 24, + 55, + 56, ], - "type": "Boolean", - "value": "false", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 17, + "line": 3, }, "start": Object { - "column": 14, - "line": 2, + "column": 16, + "line": 3, }, }, "range": Array [ - 24, - 25, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 10, - "line": 3, - }, - "start": Object { - "column": 4, - "line": 3, - }, - }, - "range": Array [ - 30, - 36, - ], - "type": "Keyword", - "value": "static", - }, - Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, - }, - }, - "range": Array [ - 37, - 49, + 57, + 58, ], "type": "Identifier", - "value": "staticMethod", - }, - Object { - "loc": Object { - "end": Object { - "column": 24, - "line": 3, - }, - "start": Object { - "column": 23, - "line": 3, - }, - }, - "range": Array [ - 49, - 50, - ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, - }, - "start": Object { - "column": 24, - "line": 3, - }, - }, - "range": Array [ - 50, - 51, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 26, - "line": 3, - }, - }, - "range": Array [ - 52, - 53, - ], - "type": "Punctuator", - "value": "{", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 18, "line": 3, }, "start": Object { - "column": 27, + "column": 17, "line": 3, }, }, "range": Array [ - 53, - 54, + 58, + 59, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { @@ -51168,8 +47897,8 @@ Object { }, }, "range": Array [ - 55, - 56, + 60, + 61, ], "type": "Punctuator", "value": "}", @@ -51179,7 +47908,7 @@ Object { } `; -exports[`typescript fixtures/decorators/method-decorators/method-decorator-instance-member.src 1`] = ` +exports[`typescript fixtures/basics/interface-with-optional-properties.src 1`] = ` Object { "body": Array [ Object { @@ -51187,47 +47916,47 @@ 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", + "key": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, }, - "loc": Object { - "end": Object { - "column": 13, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, - }, + "start": Object { + "column": 4, + "line": 2, }, - "range": Array [ - 14, - 23, - ], - "type": "Decorator", }, + "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": 18, + "column": 7, "line": 3, }, "start": Object { @@ -51235,110 +47964,232 @@ Object { "line": 3, }, }, - "name": "instanceMethod", + "name": "bar", "range": Array [ - 28, - 42, + 31, + 34, ], "type": "Identifier", }, - "kind": "method", "loc": Object { "end": Object { - "column": 23, + "column": 17, "line": 3, }, "start": Object { "column": 4, - "line": 2, + "line": 3, }, }, + "optional": true, "range": Array [ - 14, - 47, + 31, + 44, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 35, + 43, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 23, + "column": 16, "line": 3, }, "start": Object { - "column": 21, + "column": 10, "line": 3, }, }, "range": Array [ - 45, - 47, + 37, + 43, ], - "type": "BlockStatement", + "type": "TSStringKeyword", }, - "expression": false, - "generator": false, - "id": null, + }, + }, + Object { + "computed": false, + "key": Object { "loc": Object { "end": Object { - "column": 23, - "line": 3, + "column": 7, + "line": 4, }, "start": Object { - "column": 18, - "line": 3, + "column": 4, + "line": 4, }, }, - "params": Array [], + "name": "baz", "range": Array [ - 42, - 47, + 49, + 52, ], - "type": "FunctionExpression", + "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", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "name": "bar", + "optional": true, + "range": Array [ + 59, + 71, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 4, + }, + "start": Object { + "column": 18, + "line": 4, + }, + }, + "range": Array [ + 63, + 71, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 4, + }, + "start": Object { + "column": 20, + "line": 4, + }, + }, + "range": Array [ + 65, + 71, + ], + "type": "TSStringKeyword", + }, + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 28, + "line": 4, + }, + }, + "name": "baz", + "optional": true, + "range": Array [ + 73, + 76, + ], + "type": "Identifier", + }, + ], + "range": Array [ + 49, + 79, + ], + "type": "TSMethodSignature", }, ], "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 5, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, "range": Array [ - 8, - 49, + 15, + 81, ], - "type": "ClassBody", + "type": "TSInterfaceBody", }, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, - "name": "A", + "name": "test", "range": Array [ - 6, - 7, + 10, + 14, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 5, }, "start": Object { "column": 0, @@ -51347,16 +48198,15 @@ Object { }, "range": Array [ 0, - 49, + 81, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSInterfaceDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 6, }, "start": Object { "column": 0, @@ -51365,14 +48215,14 @@ Object { }, "range": Array [ 0, - 50, + 82, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -51382,43 +48232,43 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "class", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 7, + 10, + 14, ], "type": "Identifier", - "value": "A", + "value": "test", }, 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": "{", @@ -51426,7 +48276,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 2, }, "start": Object { @@ -51435,34 +48285,52 @@ Object { }, }, "range": Array [ - 14, - 15, + 21, + 24, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 24, + 25, ], "type": "Punctuator", - "value": "@", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 9, "line": 2, }, "start": Object { - "column": 5, + "column": 8, "line": 2, }, }, "range": Array [ - 15, - 23, + 25, + 26, ], - "type": "Identifier", - "value": "onlyRead", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 18, + "column": 7, "line": 3, }, "start": Object { @@ -51471,100 +48339,352 @@ Object { }, }, "range": Array [ - 28, - 42, + 31, + 34, ], "type": "Identifier", - "value": "instanceMethod", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 8, "line": 3, }, "start": Object { - "column": 18, + "column": 7, "line": 3, }, }, "range": Array [ - 42, - 43, + 34, + 35, ], "type": "Punctuator", - "value": "(", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 9, "line": 3, }, "start": Object { - "column": 19, + "column": 8, "line": 3, }, }, "range": Array [ - 43, - 44, + 35, + 36, ], "type": "Punctuator", - "value": ")", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 16, "line": 3, }, "start": Object { - "column": 21, + "column": 10, "line": 3, }, }, "range": Array [ - 45, - 46, + 37, + 43, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 17, "line": 3, }, "start": Object { - "column": 22, + "column": 16, "line": 3, }, }, "range": Array [ - 46, - 47, + 43, + 44, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 7, "line": 4, }, "start": Object { - "column": 0, + "column": 4, "line": 4, }, }, "range": Array [ - 48, 49, + 52, ], - "type": "Punctuator", + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 4, + }, + "start": Object { + "column": 7, + "line": 4, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 4, + }, + }, + "range": Array [ + 54, + 57, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 12, + "line": 4, + }, + }, + "range": Array [ + 57, + 58, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 14, + "line": 4, + }, + }, + "range": Array [ + 59, + 62, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 4, + }, + "start": Object { + "column": 17, + "line": 4, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 4, + }, + "start": Object { + "column": 18, + "line": 4, + }, + }, + "range": Array [ + 63, + 64, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 4, + }, + "start": Object { + "column": 20, + "line": 4, + }, + }, + "range": Array [ + 65, + 71, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 4, + }, + "start": Object { + "column": 26, + "line": 4, + }, + }, + "range": Array [ + 71, + 72, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 28, + "line": 4, + }, + }, + "range": Array [ + 73, + 76, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 4, + }, + "start": Object { + "column": 31, + "line": 4, + }, + }, + "range": Array [ + 76, + 77, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 4, + }, + "start": Object { + "column": 32, + "line": 4, + }, + }, + "range": Array [ + 77, + 78, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 4, + }, + "start": Object { + "column": 33, + "line": 4, + }, + }, + "range": Array [ + 78, + 79, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 80, + 81, + ], + "type": "Punctuator", "value": "}", }, ], @@ -51572,7 +48692,7 @@ Object { } `; -exports[`typescript fixtures/decorators/method-decorators/method-decorator-static-member.src 1`] = ` +exports[`typescript fixtures/basics/interface-without-type-annotation.src 1`] = ` Object { "body": Array [ Object { @@ -51580,66 +48700,28 @@ 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, + "column": 7, + "line": 2, }, "start": Object { - "column": 11, - "line": 3, + "column": 4, + "line": 2, }, }, - "name": "staticMethod", + "name": "foo", "range": Array [ - 30, - 42, + 21, + 24, ], "type": "Identifier", }, - "kind": "method", "loc": Object { "end": Object { - "column": 28, - "line": 3, + "column": 8, + "line": 2, }, "start": Object { "column": 4, @@ -51647,91 +48729,50 @@ Object { }, }, "range": Array [ - 14, - 47, + 21, + 25, ], - "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", - }, + "type": "TSPropertySignature", }, ], "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { - "column": 8, + "column": 15, "line": 1, }, }, "range": Array [ - 8, - 49, + 15, + 27, ], - "type": "ClassBody", + "type": "TSInterfaceBody", }, "id": Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, - "name": "D", + "name": "test", "range": Array [ - 6, - 7, + 10, + 14, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 4, + "line": 3, }, "start": Object { "column": 0, @@ -51740,16 +48781,15 @@ Object { }, "range": Array [ 0, - 49, + 27, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "TSInterfaceDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 5, + "line": 4, }, "start": Object { "column": 0, @@ -51758,14 +48798,14 @@ Object { }, "range": Array [ 0, - 50, + 28, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -51775,43 +48815,43 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "class", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 7, + 10, + 14, ], "type": "Identifier", - "value": "D", + "value": "test", }, 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": "{", @@ -51819,7 +48859,7 @@ Object { Object { "loc": Object { "end": Object { - "column": 5, + "column": 7, "line": 2, }, "start": Object { @@ -51828,11 +48868,11 @@ Object { }, }, "range": Array [ - 14, - 15, + 21, + 24, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "foo", }, Object { "loc": Object { @@ -51841,559 +48881,504 @@ Object { "line": 2, }, "start": Object { - "column": 5, + "column": 7, "line": 2, }, }, "range": Array [ - 15, - 18, + 24, + 25, ], - "type": "Identifier", - "value": "Foo", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 1, "line": 3, }, "start": Object { - "column": 4, + "column": 0, "line": 3, }, }, "range": Array [ - 23, - 29, + 26, + 27, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/keyof-operator.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 3, - }, - "start": Object { - "column": 11, - "line": 3, + "id": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, }, + "name": "x", + "range": Array [ + 5, + 6, + ], + "type": "Identifier", }, - "range": Array [ - 30, - 42, - ], - "type": "Identifier", - "value": "staticMethod", - }, - Object { "loc": Object { "end": Object { - "column": 24, - "line": 3, + "column": 19, + "line": 1, }, "start": Object { - "column": 23, - "line": 3, + "column": 0, + "line": 1, }, }, "range": Array [ - 42, - 43, + 0, + 19, ], - "type": "Punctuator", - "value": "(", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 3, + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, }, - "start": Object { - "column": 24, - "line": 3, + "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, + }, + }, + "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 [ - 43, - 44, + 0, + 4, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 3, + "column": 6, + "line": 1, }, "start": Object { - "column": 26, - "line": 3, + "column": 5, + "line": 1, }, }, "range": Array [ - 45, - 46, + 5, + 6, ], - "type": "Punctuator", - "value": "{", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 3, + "column": 8, + "line": 1, }, "start": Object { - "column": 27, - "line": 3, + "column": 7, + "line": 1, }, }, "range": Array [ - 46, - 47, + 7, + 8, ], "type": "Punctuator", - "value": "}", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 4, + "column": 14, + "line": 1, }, "start": Object { - "column": 0, - "line": 4, + "column": 9, + "line": 1, }, }, "range": Array [ - 48, - 49, + 9, + 14, + ], + "type": "Identifier", + "value": "keyof", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-constructor.src 1`] = ` +exports[`typescript fixtures/basics/nested-type-arguments.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", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 44, + "line": 1, }, "start": Object { "column": 4, - "line": 2, + "line": 1, }, }, + "name": "nestedArray", "range": Array [ - 20, - 113, + 4, + 44, ], - "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", - }, + "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": 33, - "line": 3, + "column": 43, + "line": 1, }, "start": Object { - "column": 8, - "line": 3, + "column": 23, + "line": 1, }, }, - "operator": "=", "range": Array [ - 81, - 106, + 23, + 43, ], - "right": Object { - "computed": false, + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 33, - "line": 3, + "column": 28, + "line": 1, }, "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, - }, + "column": 23, + "line": 1, }, - "name": "title", - "range": Array [ - 101, - 106, - ], - "type": "Identifier", }, + "name": "Array", "range": Array [ - 94, - 106, + 23, + 28, ], - "type": "MemberExpression", - }, - "type": "AssignmentExpression", - }, - "loc": Object { - "end": Object { - "column": 34, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, + "type": "Identifier", }, - }, - "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 [ + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "params": Array [ Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 42, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 29, + "line": 1, }, }, - "name": "APP_CONFIG", "range": Array [ - 40, - 50, + 29, + 42, ], - "type": "Identifier", - }, - ], - "callee": Object { - "loc": Object { - "end": Object { - "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, + "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", }, }, - "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, + 28, + 43, ], - "type": "CallExpression", - }, - "loc": Object { - "end": Object { - "column": 35, - "line": 2, - }, - "start": Object { - "column": 16, - "line": 2, - }, + "type": "TSTypeParameterInstantiation", }, - "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, + 22, + 44, ], - "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", - }, - }, - }, + "type": "TSTypeParameterInstantiation", }, - ], - "range": Array [ - 31, - 113, - ], - "type": "FunctionExpression", + }, }, }, - ], - "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": 13, - "line": 1, - }, - "start": Object { - "column": 6, - "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": "Service", - "range": Array [ - 6, - 13, - ], - "type": "Identifier", - }, + ], + "kind": "var", "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 44, + "line": 1, }, "start": Object { "column": 0, @@ -52402,16 +49387,15 @@ Object { }, "range": Array [ 0, - 115, + 44, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 6, + "column": 44, + "line": 1, }, "start": Object { "column": 0, @@ -52420,14 +49404,14 @@ Object { }, "range": Array [ 0, - 116, + 44, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -52437,717 +49421,509 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 13, + 4, + 15, ], "type": "Identifier", - "value": "Service", + "value": "nestedArray", }, 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": 15, - "line": 2, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 20, - 31, + 17, + 22, ], "type": "Identifier", - "value": "constructor", + "value": "Array", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 23, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 22, + "line": 1, }, }, "range": Array [ - 31, - 32, + 22, + 23, ], "type": "Punctuator", - "value": "(", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, - }, - }, - "range": Array [ - 32, - 33, - ], - "type": "Punctuator", - "value": "@", - }, - Object { - "loc": Object { - "end": Object { "column": 23, - "line": 2, - }, - "start": Object { - "column": 17, - "line": 2, + "line": 1, }, }, "range": Array [ - 33, - 39, + 23, + 28, ], "type": "Identifier", - "value": "Inject", + "value": "Array", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 39, - 40, + 28, + 29, ], "type": "Punctuator", - "value": "(", + "value": "<", }, Object { "loc": Object { "end": Object { "column": 34, - "line": 2, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 29, + "line": 1, }, }, "range": Array [ - 40, - 50, + 29, + 34, ], "type": "Identifier", - "value": "APP_CONFIG", + "value": "Array", }, Object { "loc": Object { "end": Object { "column": 35, - "line": 2, + "line": 1, }, "start": Object { "column": 34, - "line": 2, + "line": 1, }, }, "range": Array [ - 50, - 51, + 34, + 35, ], "type": "Punctuator", - "value": ")", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 2, + "column": 41, + "line": 1, }, "start": Object { - "column": 36, - "line": 2, + "column": 35, + "line": 1, }, }, "range": Array [ - 52, - 58, + 35, + 41, ], "type": "Identifier", - "value": "config", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 43, - "line": 2, - }, - "start": Object { "column": 42, - "line": 2, - }, - }, - "range": Array [ - 58, - 59, - ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 53, - "line": 2, - }, - "start": Object { - "column": 44, - "line": 2, - }, - }, - "range": Array [ - 60, - 69, - ], - "type": "Identifier", - "value": "AppConfig", - }, - Object { - "loc": Object { - "end": Object { - "column": 54, - "line": 2, - }, - "start": Object { - "column": 53, - "line": 2, - }, - }, - "range": Array [ - 69, - 70, - ], - "type": "Punctuator", - "value": ")", - }, - Object { - "loc": Object { - "end": Object { - "column": 56, - "line": 2, - }, - "start": Object { - "column": 55, - "line": 2, - }, - }, - "range": Array [ - 71, - 72, - ], - "type": "Punctuator", - "value": "{", - }, - Object { - "loc": Object { - "end": Object { - "column": 12, - "line": 3, - }, - "start": Object { - "column": 8, - "line": 3, - }, - }, - "range": Array [ - 81, - 85, - ], - "type": "Keyword", - "value": "this", - }, - Object { - "loc": Object { - "end": Object { - "column": 13, - "line": 3, + "line": 1, }, "start": Object { - "column": 12, - "line": 3, + "column": 41, + "line": 1, }, }, "range": Array [ - 85, - 86, + 41, + 42, ], "type": "Punctuator", - "value": ".", - }, - Object { - "loc": Object { - "end": Object { - "column": 18, - "line": 3, - }, - "start": Object { - "column": 13, - "line": 3, - }, - }, - "range": Array [ - 86, - 91, - ], - "type": "Identifier", - "value": "title", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 3, + "column": 43, + "line": 1, }, "start": Object { - "column": 19, - "line": 3, + "column": 42, + "line": 1, }, }, "range": Array [ - 92, - 93, + 42, + 43, ], "type": "Punctuator", - "value": "=", - }, - Object { - "loc": Object { - "end": Object { - "column": 27, - "line": 3, - }, - "start": Object { - "column": 21, - "line": 3, - }, - }, - "range": Array [ - 94, - 100, - ], - "type": "Identifier", - "value": "config", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 3, + "column": 44, + "line": 1, }, "start": Object { - "column": 27, - "line": 3, + "column": 43, + "line": 1, }, }, "range": Array [ - 100, - 101, + 43, + 44, ], "type": "Punctuator", - "value": ".", + "value": ">", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/never-type-param.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 3, - }, - "start": Object { - "column": 28, - "line": 3, - }, - }, - "range": Array [ - 101, - 106, - ], - "type": "Identifier", - "value": "title", - }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 3, - }, - "start": Object { - "column": 33, - "line": 3, - }, - }, - "range": Array [ - 106, - 107, - ], - "type": "Punctuator", - "value": ";", - }, - Object { - "loc": Object { - "end": Object { - "column": 5, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 4, - }, - }, - "range": Array [ - 112, - 113, - ], - "type": "Punctuator", - "value": "}", - }, - Object { - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 5, - }, - }, - "range": Array [ - 114, - 115, - ], - "type": "Punctuator", - "value": "}", - }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.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": "bar", - "range": Array [ - 16, - 19, - ], - "type": "Identifier", - }, - "kind": "method", + "declarations": Array [ + Object { + "id": Object { "loc": Object { "end": Object { - "column": 38, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 6, + "line": 1, }, }, + "name": "x", "range": Array [ - 16, - 50, + 6, + 17, ], - "static": false, - "type": "MethodDefinition", - "value": Object { - "async": false, - "body": Object { - "body": Array [], + "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": 38, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 36, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 48, - 50, + 9, + 17, ], - "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", - }, - "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", - }, - ], + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 23, - "line": 2, + "column": 9, + "line": 1, }, }, - "name": "baz", + "name": "X", "range": Array [ - 35, - 46, + 9, + 10, ], "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 2, - }, - "start": Object { - "column": 26, - "line": 2, - }, + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, }, - "range": Array [ - 38, - 46, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "start": Object { + "column": 10, + "line": 1, + }, + }, + "params": Array [ + Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 28, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 40, - 46, + 11, + 16, ], - "type": "TSNumberKeyword", + "type": "TSNeverKeyword", }, - }, + ], + "range": Array [ + 10, + 17, + ], + "type": "TSTypeParameterInstantiation", }, - ], - "range": Array [ - 19, - 50, - ], - "type": "FunctionExpression", + }, }, }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 3, - }, - "start": Object { - "column": 10, - "line": 1, + "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, + }, + "start": Object { + "column": 0, + "line": 1, }, - "range": Array [ - 10, - 52, - ], - "type": "ClassBody", }, - "id": Object { + "range": Array [ + 0, + 18, + ], + "type": "VariableDeclaration", + }, + 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": 9, - "line": 1, + "column": 25, + "line": 2, }, "start": Object { - "column": 6, - "line": 1, + "column": 0, + "line": 2, }, }, - "name": "Foo", "range": Array [ - 6, - 9, + 19, + 44, ], - "type": "Identifier", + "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", + }, }, "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 26, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, "range": Array [ - 0, - 52, + 19, + 45, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "ExpressionStatement", }, ], "loc": Object { "end": Object { "column": 0, - "line": 4, + "line": 3, }, "start": Object { "column": 0, @@ -53156,7 +49932,7 @@ Object { }, "range": Array [ 0, - 53, + 46, ], "sourceType": "script", "tokens": Array [ @@ -53176,12 +49952,12 @@ Object { 5, ], "type": "Keyword", - "value": "class", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 7, "line": 1, }, "start": Object { @@ -53191,316 +49967,352 @@ Object { }, "range": Array [ 6, - 9, + 7, ], "type": "Identifier", - "value": "Foo", + "value": "x", }, 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": 7, - "line": 2, + "column": 10, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 16, - 19, + 9, + 10, ], "type": "Identifier", - "value": "bar", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 7, - "line": 2, + "column": 10, + "line": 1, }, }, "range": Array [ - 19, - 20, + 10, + 11, ], "type": "Punctuator", - "value": "(", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 8, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 20, - 21, + 11, + 16, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "never", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 21, - 28, + 16, + 17, ], - "type": "Identifier", - "value": "special", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 18, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 28, - 29, + 17, + 18, ], "type": "Punctuator", - "value": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 10, "line": 2, }, "start": Object { - "column": 17, + "column": 0, "line": 2, }, }, "range": Array [ + 19, 29, - 33, ], - "type": "Boolean", - "value": "true", + "type": "Identifier", + "value": "Observable", }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 11, "line": 2, }, "start": Object { - "column": 21, + "column": 10, "line": 2, }, }, "range": Array [ - 33, - 34, + 29, + 30, ], "type": "Punctuator", - "value": ")", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 26, + "column": 16, "line": 2, }, "start": Object { - "column": 23, + "column": 11, "line": 2, }, }, "range": Array [ + 30, 35, - 38, ], "type": "Identifier", - "value": "baz", + "value": "empty", }, Object { "loc": Object { "end": Object { - "column": 27, + "column": 17, "line": 2, }, "start": Object { - "column": 26, + "column": 16, "line": 2, }, }, "range": Array [ - 38, - 39, + 35, + 36, ], "type": "Punctuator", - "value": ":", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 22, "line": 2, }, "start": Object { - "column": 28, + "column": 17, "line": 2, }, }, "range": Array [ - 40, - 46, + 36, + 41, ], "type": "Identifier", - "value": "number", + "value": "never", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 23, "line": 2, }, "start": Object { - "column": 34, + "column": 22, "line": 2, }, }, "range": Array [ - 46, - 47, + 41, + 42, ], "type": "Punctuator", - "value": ")", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 37, + "column": 24, "line": 2, }, "start": Object { - "column": 36, + "column": 23, "line": 2, }, }, "range": Array [ - 48, - 49, + 42, + 43, ], "type": "Punctuator", - "value": "{", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 38, + "column": 25, "line": 2, }, "start": Object { - "column": 37, + "column": 24, "line": 2, }, }, "range": Array [ - 49, - 50, + 43, + 44, ], "type": "Punctuator", - "value": "}", + "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 [ - 51, - 52, + 44, + 45, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src 1`] = ` +exports[`typescript fixtures/basics/non-null-assertion-operator.src 1`] = ` Object { "body": Array [ Object { + "async": false, "body": Object { "body": Array [ Object { - "computed": false, - "key": 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": 14, + "column": 21, "line": 2, }, "start": Object { - "column": 11, + "column": 4, "line": 2, }, }, - "name": "bar", "range": Array [ - 29, - 32, + 41, + 58, ], - "type": "Identifier", + "type": "CallExpression", }, - "kind": "method", "loc": Object { "end": Object { - "column": 45, + "column": 22, "line": 2, }, "start": Object { @@ -53509,253 +50321,284 @@ Object { }, }, "range": Array [ - 22, - 63, + 41, + 59, ], - "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, + "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", }, - "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", - }, + "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": 29, - "line": 2, + "column": 13, + "line": 3, }, "start": Object { - "column": 15, - "line": 2, + "column": 12, + "line": 3, }, }, + "name": "e", "range": Array [ - 33, - 47, + 72, + 73, ], - "type": "Decorator", - }, - ], - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 30, - "line": 2, + "type": "Identifier", }, - }, - "name": "baz", - "range": Array [ - 48, - 59, - ], - "type": "Identifier", - "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 14, + "line": 3, }, "start": Object { - "column": 33, - "line": 2, + "column": 12, + "line": 3, }, }, "range": Array [ - 51, - 59, + 72, + 74, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 41, - "line": 2, - }, - "start": Object { - "column": 35, - "line": 2, - }, + "type": "TSNonNullExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, }, - "range": Array [ - 53, - 59, - ], - "type": "TSNumberKeyword", }, + "name": "name", + "range": Array [ + 75, + 79, + ], + "type": "Identifier", }, + "range": Array [ + 72, + 79, + ], + "type": "MemberExpression", }, - ], - "range": Array [ - 32, - 63, - ], - "type": "FunctionExpression", + "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": 3, + "line": 4, }, "start": Object { - "column": 16, + "column": 35, "line": 1, }, }, "range": Array [ - 16, - 65, + 35, + 82, ], - "type": "ClassBody", + "type": "BlockStatement", }, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 15, + "column": 22, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, - "name": "StaticFoo", + "name": "processEntity", "range": Array [ - 6, - 15, + 9, + 22, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 4, }, "start": Object { "column": 0, "line": 1, }, }, - "range": Array [ - 0, - 65, - ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 4, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "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, + ], + "type": "FunctionDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, }, "range": Array [ 0, - 66, + 82, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 8, "line": 1, }, "start": Object { @@ -53765,110 +50608,128 @@ Object { }, "range": Array [ 0, - 5, + 8, ], "type": "Keyword", - "value": "class", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 22, "line": 1, }, "start": Object { - "column": 6, + "column": 9, "line": 1, }, }, "range": Array [ - 6, - 15, + 9, + 22, ], "type": "Identifier", - "value": "StaticFoo", + "value": "processEntity", }, 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": 10, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 23, + "line": 1, }, }, "range": Array [ - 22, - 28, + 23, + 24, ], - "type": "Keyword", - "value": "static", + "type": "Identifier", + "value": "e", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ - 29, - 32, + 24, + 25, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 14, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 32, - 33, + 25, + 26, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 33, + "line": 1, }, "start": Object { - "column": 15, - "line": 2, + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 33, + ], + "type": "Identifier", + "value": "Entity", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, }, }, "range": Array [ @@ -53876,40 +50737,58 @@ Object { 34, ], "type": "Punctuator", - "value": "@", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, "line": 2, }, "start": Object { - "column": 16, + "column": 4, "line": 2, }, }, "range": Array [ - 34, 41, + 55, ], "type": "Identifier", - "value": "special", + "value": "validateEntity", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 19, "line": 2, }, "start": Object { - "column": 23, + "column": 18, "line": 2, }, }, "range": Array [ - 41, - 42, + 55, + 56, ], "type": "Punctuator", "value": "(", @@ -53917,35 +50796,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 28, + "column": 20, "line": 2, }, "start": Object { - "column": 24, + "column": 19, "line": 2, }, }, "range": Array [ - 42, - 46, + 56, + 57, ], - "type": "Boolean", - "value": "true", + "type": "Identifier", + "value": "e", }, Object { "loc": Object { "end": Object { - "column": 29, + "column": 21, "line": 2, }, "start": Object { - "column": 28, + "column": 20, "line": 2, }, }, "range": Array [ - 46, - 47, + 57, + 58, ], "type": "Punctuator", "value": ")", @@ -53953,125 +50832,179 @@ Object { Object { "loc": Object { "end": Object { - "column": 33, + "column": 22, "line": 2, }, "start": Object { - "column": 30, + "column": 21, "line": 2, }, }, "range": Array [ - 48, - 51, + 58, + 59, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 64, + 67, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 68, + 69, ], "type": "Identifier", - "value": "baz", + "value": "s", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 11, + "line": 3, }, "start": Object { - "column": 33, - "line": 2, + "column": 10, + "line": 3, }, }, "range": Array [ - 51, - 52, + 70, + 71, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 41, - "line": 2, + "column": 13, + "line": 3, }, "start": Object { - "column": 35, - "line": 2, + "column": 12, + "line": 3, }, }, "range": Array [ - 53, - 59, + 72, + 73, ], "type": "Identifier", - "value": "number", + "value": "e", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 2, + "column": 14, + "line": 3, }, "start": Object { - "column": 41, - "line": 2, + "column": 13, + "line": 3, }, }, "range": Array [ - 59, - 60, + 73, + 74, ], "type": "Punctuator", - "value": ")", + "value": "!", }, Object { "loc": Object { "end": Object { - "column": 44, - "line": 2, + "column": 15, + "line": 3, }, "start": Object { - "column": 43, - "line": 2, + "column": 14, + "line": 3, }, }, "range": Array [ - 61, - 62, + 74, + 75, ], "type": "Punctuator", - "value": "{", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 45, - "line": 2, + "column": 19, + "line": 3, }, "start": Object { - "column": 44, - "line": 2, + "column": 15, + "line": 3, }, }, "range": Array [ - 62, - 63, + 75, + 79, + ], + "type": "Identifier", + "value": "name", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 79, + 80, ], "type": "Punctuator", - "value": "}", + "value": ";", }, Object { "loc": Object { "end": Object { "column": 1, - "line": 3, + "line": 4, }, "start": Object { "column": 0, - "line": 3, + "line": 4, }, }, "range": Array [ - 64, - 65, + 81, + 82, ], "type": "Punctuator", "value": "}", @@ -54081,347 +51014,194 @@ Object { } `; -exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-instance-member.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": 9, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 5, + "line": 1, }, }, - "name": "greet", "range": Array [ - 20, - 25, + 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", + }, }, - "kind": "method", + }, + "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": 5, - "line": 4, + "column": 16, + "line": 2, }, "start": Object { "column": 4, "line": 2, }, }, + "name": "y", "range": Array [ - 20, - 95, + 17, + 29, ], - "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": 5, - "line": 4, - }, - "start": Object { - "column": 34, - "line": 2, - }, - }, - "range": Array [ - 50, - 95, - ], - "type": "BlockStatement", - }, - "expression": false, - "generator": false, - "id": null, + "type": "Identifier", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 16, + "line": 2, }, "start": Object { - "column": 9, + "column": 5, "line": 2, }, }, - "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, - }, + "range": Array [ + 18, + 29, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "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", - }, + "start": Object { + "column": 7, + "line": 2, }, }, - ], - "range": Array [ - 25, - 95, - ], - "type": "FunctionExpression", + "range": Array [ + 20, + 29, + ], + "type": "TSUndefinedKeyword", + }, }, }, - ], - "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, + "init": null, + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, }, + "range": Array [ + 17, + 29, + ], + "type": "VariableDeclarator", }, - "name": "Greeter", - "range": Array [ - 6, - 13, - ], - "type": "Identifier", - }, + ], + "kind": "let", "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 17, + "line": 2, }, "start": Object { "column": 0, - "line": 1, + "line": 2, }, }, "range": Array [ - 0, - 97, + 13, + 30, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { - "column": 0, - "line": 6, + "column": 17, + "line": 2, }, "start": Object { "column": 0, @@ -54430,14 +51210,14 @@ Object { }, "range": Array [ 0, - 98, + 30, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 3, "line": 1, }, "start": Object { @@ -54447,151 +51227,133 @@ Object { }, "range": Array [ 0, - 5, + 3, ], "type": "Keyword", - "value": "class", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 5, "line": 1, }, "start": Object { - "column": 6, + "column": 4, "line": 1, }, }, "range": Array [ - 6, - 13, + 4, + 5, ], "type": "Identifier", - "value": "Greeter", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 6, "line": 1, }, "start": Object { - "column": 14, + "column": 5, "line": 1, }, }, "range": Array [ - 14, - 15, + 5, + 6, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 2, + "column": 11, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 20, - 25, + 7, + 11, ], - "type": "Identifier", - "value": "greet", + "type": "Keyword", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 12, + "line": 1, }, "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, + "line": 1, }, }, "range": Array [ - 26, - 27, + 11, + 12, ], "type": "Punctuator", - "value": "@", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 3, "line": 2, }, "start": Object { - "column": 11, + "column": 0, "line": 2, }, }, "range": Array [ - 27, - 35, + 13, + 16, ], - "type": "Identifier", - "value": "required", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 24, + "column": 5, "line": 2, }, "start": Object { - "column": 20, + "column": 4, "line": 2, }, }, "range": Array [ - 36, - 40, + 17, + 18, ], "type": "Identifier", - "value": "name", + "value": "y", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 6, "line": 2, }, "start": Object { - "column": 24, + "column": 5, "line": 2, }, }, "range": Array [ - 40, - 41, + 18, + 19, ], "type": "Punctuator", "value": ":", @@ -54599,394 +51361,211 @@ Object { Object { "loc": Object { "end": Object { - "column": 32, + "column": 16, "line": 2, }, "start": Object { - "column": 26, + "column": 7, "line": 2, }, }, "range": Array [ - 42, - 48, + 20, + 29, ], "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": ")", + "value": "undefined", }, Object { "loc": Object { "end": Object { - "column": 35, + "column": 17, "line": 2, }, "start": Object { - "column": 34, + "column": 16, "line": 2, }, }, "range": Array [ - 50, - 51, + 29, + 30, ], "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 \\"", + "value": ";", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/object-with-escaped-properties.src 1`] = ` +Object { + "body": Array [ 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, + "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 [ - 94, - 95, - ], - "type": "Punctuator", - "value": "}", - }, - Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 17, + "line": 1, }, "start": Object { "column": 0, - "line": 5, + "line": 1, }, }, "range": Array [ - 96, - 97, + 0, + 17, ], - "type": "Punctuator", - "value": "}", + "type": "ExpressionStatement", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-static-member.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": 16, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 11, - "line": 2, + "column": 3, + "line": 3, }, }, - "name": "greet", "range": Array [ - 33, - 38, + 22, + 26, ], - "type": "Identifier", + "raw": "'__'", + "type": "Literal", + "value": "__", }, - "kind": "method", + "kind": "init", "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 12, + "line": 3, }, "start": Object { - "column": 4, - "line": 2, + "column": 3, + "line": 3, }, }, + "method": true, "range": Array [ - 26, - 108, + 22, + 31, ], - "static": true, - "type": "MethodDefinition", + "shorthand": false, + "type": "Property", "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", - }, - ], + "body": Array [], "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 12, + "line": 3, }, "start": Object { - "column": 41, - "line": 2, + "column": 10, + "line": 3, }, }, "range": Array [ - 63, - 108, + 29, + 31, ], "type": "BlockStatement", }, @@ -54995,169 +51574,257 @@ Object { "id": null, "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 12, + "line": 3, }, "start": Object { - "column": 16, - "line": 2, + "column": 7, + "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, - }, - "start": Object { - "column": 27, - "line": 2, - }, - }, - "name": "name", - "range": Array [ - 49, - 61, - ], - "type": "Identifier", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 31, - "line": 2, - }, - }, - "range": Array [ - 53, - 61, - ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { - "loc": Object { - "end": Object { - "column": 39, - "line": 2, - }, - "start": Object { - "column": 33, - "line": 2, - }, - }, - "range": Array [ - 55, - 61, - ], - "type": "TSStringKeyword", - }, - }, - }, - ], + "params": Array [], "range": Array [ - 38, - 108, + 26, + 31, ], "type": "FunctionExpression", }, }, ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 20, - "line": 1, - }, - }, "range": Array [ 20, - 110, - ], - "type": "ClassBody", - }, - "id": Object { - "loc": Object { - "end": Object { - "column": 19, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, - }, - "name": "StaticGreeter", - "range": Array [ - 6, - 19, + 33, ], - "type": "Identifier", + "type": "ObjectExpression", }, "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 16, + "line": 3, }, "start": Object { "column": 0, - "line": 1, + "line": 3, }, }, "range": Array [ - 0, - 110, + 19, + 35, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 0, - "line": 6, + "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 [ + 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, + }, + "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 [ + 75, + 79, + ], + "raw": "null", + "type": "Literal", + "value": null, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 23, + "line": 7, + }, + "start": Object { + "column": 8, + "line": 7, + }, + }, + "range": Array [ + 66, + 81, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 7, + }, + "start": Object { + "column": 6, + "line": 7, + }, + }, + "name": "X", + "range": Array [ + 64, + 65, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 7, + }, + "start": Object { + "column": 0, + "line": 7, + }, + }, + "range": Array [ + 58, + 81, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 8, }, "start": Object { "column": 0, @@ -55166,14 +51833,14 @@ Object { }, "range": Array [ 0, - 111, + 82, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 1, "line": 1, }, "start": Object { @@ -55183,1064 +51850,1210 @@ Object { }, "range": Array [ 0, - 5, + 1, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 19, + "column": 2, "line": 1, }, "start": Object { - "column": 6, + "column": 1, "line": 1, }, }, "range": Array [ - 6, - 19, + 1, + 2, ], - "type": "Identifier", - "value": "StaticGreeter", + "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": 10, - "line": 2, + "column": 8, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 7, + "line": 1, }, }, "range": Array [ - 26, - 32, + 7, + 8, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 11, - "line": 2, + "column": 9, + "line": 1, }, }, "range": Array [ - 33, - 38, + 9, + 13, ], - "type": "Identifier", - "value": "greet", + "type": "Keyword", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 14, + "line": 1, }, }, "range": Array [ - 38, - 39, + 14, + 15, ], "type": "Punctuator", - "value": "(", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 39, - 40, + 15, + 16, ], "type": "Punctuator", - "value": "@", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 40, - 48, + 16, + 17, ], - "type": "Identifier", - "value": "required", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 2, + "column": 1, + "line": 3, }, "start": Object { - "column": 27, - "line": 2, + "column": 0, + "line": 3, }, }, "range": Array [ - 49, - 53, + 19, + 20, ], - "type": "Identifier", - "value": "name", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 2, + "column": 2, + "line": 3, }, "start": Object { - "column": 31, - "line": 2, + "column": 1, + "line": 3, }, }, "range": Array [ - 53, - 54, + 20, + 21, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 39, - "line": 2, + "column": 7, + "line": 3, }, "start": Object { - "column": 33, - "line": 2, + "column": 3, + "line": 3, }, }, "range": Array [ - 55, - 61, + 22, + 26, ], - "type": "Identifier", - "value": "string", + "type": "String", + "value": "'__'", }, Object { "loc": Object { "end": Object { - "column": 40, - "line": 2, + "column": 8, + "line": 3, }, "start": Object { - "column": 39, - "line": 2, + "column": 7, + "line": 3, }, }, "range": Array [ - 61, - 62, + 26, + 27, ], "type": "Punctuator", - "value": ")", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 42, - "line": 2, + "column": 9, + "line": 3, }, "start": Object { - "column": 41, - "line": 2, + "column": 8, + "line": 3, }, }, "range": Array [ - 63, - 64, + 27, + 28, ], "type": "Punctuator", - "value": "{", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 11, "line": 3, }, "start": Object { - "column": 8, + "column": 10, "line": 3, }, }, "range": Array [ - 73, - 79, + 29, + 30, ], - "type": "Keyword", - "value": "return", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 12, "line": 3, }, "start": Object { - "column": 15, + "column": 11, "line": 3, }, }, "range": Array [ - 80, - 88, + 30, + 31, ], - "type": "String", - "value": "\\"Hello \\"", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 25, + "column": 14, "line": 3, }, "start": Object { - "column": 24, + "column": 13, "line": 3, }, }, "range": Array [ - 89, - 90, + 32, + 33, ], "type": "Punctuator", - "value": "+", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 30, + "column": 15, "line": 3, }, "start": Object { - "column": 26, + "column": 14, "line": 3, }, }, "range": Array [ - 91, - 95, + 33, + 34, ], - "type": "Identifier", - "value": "name", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 16, "line": 3, }, "start": Object { - "column": 31, + "column": 15, "line": 3, }, }, "range": Array [ - 96, - 97, + 34, + 35, ], "type": "Punctuator", - "value": "+", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 36, - "line": 3, + "column": 1, + "line": 5, }, "start": Object { - "column": 33, - "line": 3, + "column": 0, + "line": 5, }, }, "range": Array [ - 98, - 101, + 37, + 38, ], - "type": "String", - "value": "\\"!\\"", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 3, + "column": 2, + "line": 5, }, "start": Object { - "column": 36, - "line": 3, + "column": 1, + "line": 5, }, }, "range": Array [ - 101, - 102, + 38, + 39, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 4, + "line": 5, }, "start": Object { - "column": 4, - "line": 4, + "column": 3, + "line": 5, }, }, "range": Array [ - 107, - 108, + 40, + 41, ], "type": "Punctuator", - "value": "}", + "value": "[", }, Object { "loc": Object { "end": Object { - "column": 1, + "column": 8, "line": 5, }, "start": Object { - "column": 0, + "column": 4, "line": 5, }, }, "range": Array [ - 109, - 110, + 41, + 45, ], - "type": "Punctuator", - "value": "}", + "type": "String", + "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", - }, - ], - "key": Object { - "loc": Object { - "end": Object { - "column": 17, - "line": 2, - }, - "start": Object { - "column": 13, - "line": 2, - }, - }, - "name": "data", - "range": Array [ - 35, - 39, - ], - "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": 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": 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", - }, - }, - ], - "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, + "column": 9, "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 8, + "line": 5, }, }, "range": Array [ - 0, - 88, + 45, + 46, ], - "superClass": null, - "type": "ClassDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "]", }, - }, - "range": Array [ - 0, - 88, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 10, + "line": 5, }, "start": Object { - "column": 0, - "line": 1, + "column": 9, + "line": 5, }, }, "range": Array [ - 0, - 5, + 46, + 47, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 15, + "line": 5, }, "start": Object { - "column": 6, - "line": 1, + "column": 11, + "line": 5, }, }, "range": Array [ - 6, - 19, + 48, + 52, ], - "type": "Identifier", - "value": "SomeComponent", + "type": "Keyword", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 17, + "line": 5, }, "start": Object { - "column": 20, - "line": 1, + "column": 16, + "line": 5, }, }, "range": Array [ - 20, - 21, + 53, + 54, ], "type": "Punctuator", - "value": "{", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 18, + "line": 5, }, "start": Object { - "column": 4, - "line": 2, + "column": 17, + "line": 5, }, }, "range": Array [ - 26, - 27, + 54, + 55, ], "type": "Punctuator", - "value": "@", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 2, + "column": 19, + "line": 5, }, "start": Object { - "column": 5, - "line": 2, + "column": 18, + "line": 5, }, }, "range": Array [ - 27, - 32, + 55, + 56, ], - "type": "Identifier", - "value": "Input", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 5, + "line": 7, }, "start": Object { - "column": 10, - "line": 2, + "column": 0, + "line": 7, }, }, "range": Array [ - 32, - 33, + 58, + 63, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 7, + "line": 7, }, "start": Object { - "column": 11, - "line": 2, + "column": 6, + "line": 7, }, }, "range": Array [ - 33, - 34, + 64, + 65, ], - "type": "Punctuator", - "value": ")", + "type": "Identifier", + "value": "X", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 9, + "line": 7, }, "start": Object { - "column": 13, - "line": 2, + "column": 8, + "line": 7, }, }, "range": Array [ - 35, - 39, + 66, + 67, ], - "type": "Identifier", - "value": "data", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 14, + "line": 7, }, "start": Object { - "column": 17, - "line": 2, + "column": 10, + "line": 7, }, }, "range": Array [ - 39, - 40, + 68, + 72, ], - "type": "Punctuator", - "value": ";", + "type": "String", + "value": "'__'", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 16, + "line": 7, }, "start": Object { - "column": 4, - "line": 3, + "column": 15, + "line": 7, }, }, "range": Array [ - 45, - 46, + 73, + 74, ], "type": "Punctuator", - "value": "@", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 3, + "column": 21, + "line": 7, }, "start": Object { - "column": 5, - "line": 3, + "column": 17, + "line": 7, }, }, "range": Array [ - 46, - 52, + 75, + 79, ], - "type": "Identifier", - "value": "Output", + "type": "Keyword", + "value": "null", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 3, + "column": 23, + "line": 7, }, "start": Object { - "column": 11, - "line": 3, + "column": 22, + "line": 7, }, }, "range": Array [ - 52, - 53, + 80, + 81, ], "type": "Punctuator", - "value": "(", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/parenthesized-use-strict.src 1`] = ` +Object { + "body": Array [ Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 1, + "line": 2, + }, + }, + "range": Array [ + 46, + 58, + ], + "raw": "\\"use strict\\"", + "type": "Literal", + "value": "use strict", + }, "loc": Object { "end": Object { - "column": 13, - "line": 3, + "column": 15, + "line": 2, }, "start": Object { - "column": 12, - "line": 3, + "column": 0, + "line": 2, }, }, "range": Array [ - 53, - 54, - ], + 45, + 60, + ], + "type": "ExpressionStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 45, + 60, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 45, + 46, + ], "type": "Punctuator", - "value": ")", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 4, + "column": 13, + "line": 2, }, "start": Object { - "column": 4, - "line": 4, + "column": 1, + "line": 2, }, }, "range": Array [ - 59, - 64, + 46, + 58, ], - "type": "Identifier", - "value": "click", + "type": "String", + "value": "\\"use strict\\"", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 4, + "column": 14, + "line": 2, }, "start": Object { - "column": 10, - "line": 4, + "column": 13, + "line": 2, }, }, "range": Array [ - 65, - 66, + 58, + 59, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { "column": 15, - "line": 4, + "line": 2, }, "start": Object { - "column": 12, - "line": 4, + "column": 14, + "line": 2, }, }, "range": Array [ - 67, - 70, + 59, + 60, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/symbol-type-param.src 1`] = ` +Object { + "body": Array [ + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "range": Array [ + 40, + 42, + ], + "type": "BlockStatement", + }, + "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, + }, + "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": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 38, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "Map", + "range": Array [ + 19, + 22, + ], + "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", + }, + }, + }, + }, + ], + "range": Array [ + 0, + 42, + ], + "type": "FunctionDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 42, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 8, ], "type": "Keyword", - "value": "new", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 4, + "column": 13, + "line": 1, }, "start": Object { - "column": 16, - "line": 4, + "column": 9, + "line": 1, }, }, "range": Array [ - 71, - 83, + 9, + 13, ], "type": "Identifier", - "value": "EventEmitter", + "value": "test", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 4, + "column": 14, + "line": 1, }, "start": Object { - "column": 28, - "line": 4, + "column": 13, + "line": 1, }, }, "range": Array [ - 83, - 84, + 13, + 14, ], "type": "Punctuator", "value": "(", }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + "value": "abc", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + "value": "Map", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "Identifier", + "value": "symbol", + }, Object { "loc": Object { "end": Object { "column": 30, - "line": 4, + "line": 1, }, "start": Object { "column": 29, - "line": 4, + "line": 1, }, }, "range": Array [ - 84, - 85, + 29, + 30, ], "type": "Punctuator", - "value": ")", + "value": ",", }, Object { "loc": Object { "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { "column": 31, - "line": 4, + "line": 1, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, }, "start": Object { - "column": 30, - "line": 4, + "column": 37, + "line": 1, }, }, "range": Array [ - 85, - 86, + 37, + 38, ], "type": "Punctuator", - "value": ";", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 39, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 38, + "line": 1, }, }, "range": Array [ - 87, - 88, + 38, + 39, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 40, + "line": 1, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 42, ], "type": "Punctuator", "value": "}", @@ -56250,295 +53063,246 @@ Object { } `; -exports[`typescript fixtures/decorators/property-decorators/property-decorator-factory-static-member.src 1`] = ` +exports[`typescript fixtures/basics/type-alias-declaration.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", + "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, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 37, + ], + "type": "TSUnionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 27, ], - "key": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 36, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 31, - "line": 2, + "column": 17, + "line": 1, }, }, - "name": "prop1", + "name": "Success", "range": Array [ - 41, - 46, + 17, + 24, ], "type": "Identifier", }, - "loc": Object { - "end": Object { - "column": 37, - "line": 2, - }, - "start": Object { - "column": 4, - "line": 2, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, }, - }, - "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, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, }, + }, + "range": Array [ + 25, + 26, ], - "callee": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 17, - "line": 4, + "column": 26, + "line": 1, }, "start": Object { - "column": 5, - "line": 4, + "column": 25, + "line": 1, }, }, - "name": "configurable", + "name": "T", "range": Array [ - 54, - 66, + 25, + 26, ], "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", + ], + "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, ], - "key": Object { + "type": "TSTypeReference", + "typeName": Object { "loc": Object { "end": Object { - "column": 16, - "line": 5, + "column": 37, + "line": 1, }, "start": Object { - "column": 11, - "line": 5, + "column": 30, + "line": 1, }, }, - "name": "prop2", + "name": "Failure", "range": Array [ - 85, - 90, + 30, + 37, ], "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 { + "typeParameters": Object { "loc": Object { "end": Object { - "column": 7, + "column": 14, "line": 1, }, "start": Object { - "column": 6, + "column": 11, "line": 1, }, }, - "name": "A", + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "range": Array [ + 12, + 13, + ], + "type": "TSTypeParameter", + }, + ], "range": Array [ - 6, - 7, + 11, + 14, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 6, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "TSTypeParameterDeclaration", }, - "range": Array [ - 0, - 93, - ], - "superClass": null, - "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 37, + "line": 1, }, "start": Object { "column": 0, @@ -56547,14 +53311,14 @@ Object { }, "range": Array [ 0, - 93, + 37, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 4, "line": 1, }, "start": Object { @@ -56564,571 +53328,927 @@ Object { }, "range": Array [ 0, - 5, + 4, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 11, "line": 1, }, "start": Object { - "column": 6, + "column": 5, "line": 1, }, }, "range": Array [ - 6, - 7, + 5, + 11, ], "type": "Identifier", - "value": "A", + "value": "Result", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 12, "line": 1, }, "start": Object { - "column": 8, + "column": 11, "line": 1, }, }, "range": Array [ - 8, - 9, + 11, + 12, ], "type": "Punctuator", - "value": "{", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 14, - 15, + 12, + 13, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 14, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 15, - 27, + 13, + 14, ], - "type": "Identifier", - "value": "configurable", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 27, - 28, + 15, + 16, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 17, + "line": 1, }, }, "range": Array [ - 28, - 32, + 17, + 24, ], - "type": "Boolean", - "value": "true", + "type": "Identifier", + "value": "Success", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 2, + "column": 25, + "line": 1, }, "start": Object { - "column": 22, - "line": 2, + "column": 24, + "line": 1, }, }, "range": Array [ - 32, - 33, + 24, + 25, ], "type": "Punctuator", - "value": ")", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 30, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 25, + "line": 1, }, }, "range": Array [ - 34, - 40, + 25, + 26, ], - "type": "Keyword", - "value": "static", + "type": "Identifier", + "value": "T", }, Object { "loc": Object { "end": Object { - "column": 36, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 31, - "line": 2, + "column": 26, + "line": 1, }, }, "range": Array [ - 41, - 46, + 26, + 27, ], - "type": "Identifier", - "value": "prop1", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 37, - "line": 2, + "column": 29, + "line": 1, }, "start": Object { - "column": 36, - "line": 2, + "column": 28, + "line": 1, }, }, "range": Array [ - 46, - 47, + 28, + 29, ], "type": "Punctuator", - "value": ";", + "value": "|", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 37, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 37, + ], + "type": "Identifier", + "value": "Failure", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/type-alias-declaration-with-constrained-type-parameter.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": 48, + "line": 1, }, "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 48, + ], + "type": "TSUnionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 38, + ], + "type": "TSTypeReference", + "typeName": Object { + "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", + }, + }, + ], + }, + "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": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "range": Array [ + 12, + 24, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 11, + 25, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { "column": 4, - "line": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, }, }, "range": Array [ - 53, - 54, + 0, + 4, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "type", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 4, + "column": 11, + "line": 1, }, "start": Object { "column": 5, - "line": 4, + "line": 1, }, }, "range": Array [ - 54, - 66, + 5, + 11, ], "type": "Identifier", - "value": "configurable", + "value": "Result", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 4, + "column": 12, + "line": 1, }, "start": Object { - "column": 17, - "line": 4, + "column": 11, + "line": 1, }, }, "range": Array [ - 66, - 67, + 11, + 12, ], "type": "Punctuator", - "value": "(", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 21, + ], + "type": "Keyword", + "value": "extends", }, Object { "loc": Object { "end": Object { "column": 23, - "line": 4, + "line": 1, }, "start": Object { - "column": 18, - "line": 4, + "column": 22, + "line": 1, }, }, "range": Array [ - 67, - 72, + 22, + 23, ], - "type": "Boolean", - "value": "false", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 24, - "line": 4, + "line": 1, }, "start": Object { "column": 23, - "line": 4, + "line": 1, }, }, "range": Array [ - 72, - 73, + 23, + 24, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 5, + "column": 25, + "line": 1, }, "start": Object { - "column": 4, - "line": 5, + "column": 24, + "line": 1, }, }, "range": Array [ - 78, - 84, + 24, + 25, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 5, + "column": 27, + "line": 1, }, "start": Object { - "column": 11, - "line": 5, + "column": 26, + "line": 1, }, }, "range": Array [ - 85, - 90, + 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": "prop2", + "value": "Success", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 5, + "column": 36, + "line": 1, }, "start": Object { - "column": 16, - "line": 5, + "column": 35, + "line": 1, }, }, "range": Array [ - 90, - 91, + 35, + 36, ], "type": "Punctuator", - "value": ";", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 6, + "column": 37, + "line": 1, }, "start": Object { - "column": 0, - "line": 6, + "column": 36, + "line": 1, }, }, "range": Array [ - 92, - 93, + 36, + 37, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "T", }, - ], - "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", - }, - ], + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 48, + ], + "type": "Identifier", + "value": "Failure", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/type-alias-object-without-annotation.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": 10, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 12, + "line": 1, }, }, - "name": "x", + "name": "bar", "range": Array [ - 19, - 20, + 12, + 15, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 24, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 14, - 21, + 12, + 24, ], - "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", + "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": 8, - "line": 3, + "column": 23, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 17, + "line": 1, }, }, "range": Array [ - 26, - 30, + 17, + 23, ], - "type": "Decorator", + "type": "TSStringKeyword", }, - ], + }, + }, + Object { + "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 28, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 25, + "line": 1, }, }, - "name": "y", + "name": "baz", "range": Array [ - 35, - 36, + 25, + 28, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 6, - "line": 4, + "column": 28, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 25, + "line": 1, }, }, "range": Array [ - 26, - 37, + 25, + 28, ], - "static": false, - "type": "ClassProperty", - "value": null, - }, - ], - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 8, - "line": 1, + "type": "TSPropertySignature", }, - }, - "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, + 11, + 29, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 1, - "line": 5, - }, - "start": Object { - "column": 0, - "line": 1, - }, + "type": "TSTypeLiteral", }, - "range": Array [ - 0, - 39, - ], - "superClass": null, - "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 0, + "line": 2, }, "start": Object { "column": 0, @@ -57137,14 +54257,14 @@ Object { }, "range": Array [ 0, - 39, + 31, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 4, "line": 1, }, "start": Object { @@ -57154,409 +54274,295 @@ Object { }, "range": Array [ 0, - 5, + 4, ], - "type": "Keyword", - "value": "class", + "type": "Identifier", + "value": "type", }, 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": "Identifier", - "value": "B", + "value": "foo", }, 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": "Punctuator", - "value": "{", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 2, + "column": 12, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 11, + "line": 1, }, }, "range": Array [ - 14, - 15, + 11, + 12, ], "type": "Punctuator", - "value": "@", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 15, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ + 12, 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", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 10, - "line": 2, + "column": 15, + "line": 1, }, }, "range": Array [ - 20, - 21, + 15, + 16, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 3, + "column": 23, + "line": 1, }, "start": Object { - "column": 4, - "line": 3, + "column": 17, + "line": 1, }, }, "range": Array [ - 26, - 27, + 17, + 23, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 3, + "column": 24, + "line": 1, }, "start": Object { - "column": 5, - "line": 3, + "column": 23, + "line": 1, }, }, "range": Array [ - 27, - 30, + 23, + 24, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ",", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 4, + "column": 28, + "line": 1, }, "start": Object { - "column": 4, - "line": 4, + "column": 25, + "line": 1, }, }, "range": Array [ - 35, - 36, + 25, + 28, ], "type": "Identifier", - "value": "y", + "value": "baz", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 4, + "column": 29, + "line": 1, }, "start": Object { - "column": 5, - "line": 4, + "column": 28, + "line": 1, }, }, "range": Array [ - 36, - 37, + 28, + 29, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 30, + "line": 1, }, "start": Object { - "column": 0, - "line": 5, + "column": 29, + "line": 1, }, }, "range": Array [ - 38, - 39, + 29, + 30, ], "type": "Punctuator", - "value": "}", + "value": ";", }, ], "type": "Program", } `; -exports[`typescript fixtures/decorators/property-decorators/property-decorator-static-member.src 1`] = ` +exports[`typescript fixtures/basics/type-assertion.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", + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, }, - ], - "key": Object { + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "foo", + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + }, + "init": Object { + "expression": Object { "loc": Object { "end": Object { - "column": 17, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 16, - "line": 2, + "column": 26, + "line": 1, }, }, - "name": "a", "range": Array [ 26, 27, ], - "type": "Identifier", + "raw": "2", + "type": "Literal", + "value": 2, }, "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 27, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 12, + "line": 1, }, }, "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", - }, + 12, + 27, ], - "key": Object { + "type": "TSTypeAssertion", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 12, - "line": 4, + "column": 16, + "line": 1, }, "start": Object { - "column": 11, - "line": 4, + "column": 13, + "line": 1, }, }, - "name": "b", "range": Array [ - 49, - 50, + 13, + 16, ], - "type": "Identifier", - }, - "loc": Object { - "end": Object { - "column": 13, - "line": 4, - }, - "start": Object { - "column": 4, - "line": 3, - }, + "type": "TSAnyKeyword", }, - "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, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "range": Array [ + 6, + 27, + ], + "type": "VariableDeclarator", }, - "name": "C", - "range": Array [ - 6, - 7, - ], - "type": "Identifier", - }, + ], + "kind": "const", "loc": Object { "end": Object { - "column": 1, - "line": 5, + "column": 28, + "line": 1, }, "start": Object { "column": 0, @@ -57565,16 +54571,15 @@ Object { }, "range": Array [ 0, - 53, + 28, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 6, + "line": 2, }, "start": Object { "column": 0, @@ -57583,7 +54588,7 @@ Object { }, "range": Array [ 0, - 54, + 29, ], "sourceType": "script", "tokens": Array [ @@ -57603,12 +54608,12 @@ Object { 5, ], "type": "Keyword", - "value": "class", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 9, "line": 1, }, "start": Object { @@ -57618,110 +54623,110 @@ Object { }, "range": Array [ 6, - 7, + 9, ], "type": "Identifier", - "value": "C", + "value": "foo", }, 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": 5, - "line": 2, + "column": 13, + "line": 1, }, "start": Object { - "column": 4, - "line": 2, + "column": 12, + "line": 1, }, }, "range": Array [ - 14, - 15, + 12, + 13, ], "type": "Punctuator", - "value": "@", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 2, + "column": 16, + "line": 1, }, "start": Object { - "column": 5, - "line": 2, + "column": 13, + "line": 1, }, }, "range": Array [ - 15, - 18, + 13, + 16, ], "type": "Identifier", - "value": "baz", + "value": "any", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 17, + "line": 1, }, "start": Object { - "column": 9, - "line": 2, + "column": 16, + "line": 1, }, }, "range": Array [ - 19, - 25, + 16, + 17, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": ">", }, 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 [ 26, 27, ], - "type": "Identifier", - "value": "a", + "type": "Numeric", + "value": "2", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 2, + "column": 28, + "line": 1, }, "start": Object { - "column": 17, - "line": 2, + "column": 27, + "line": 1, }, }, "range": Array [ @@ -57731,365 +54736,324 @@ Object { "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`] = ` +exports[`typescript fixtures/basics/type-guard-in-arrow-function.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, + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "isString", + "range": Array [ + 6, + 14, + ], + "type": "Identifier", }, - }, - "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 { + "init": 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 [ + 62, + 63, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "operator": "typeof", + "prefix": true, + "range": Array [ + 55, + 63, + ], + "type": "UnaryExpression", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "operator": "===", + "range": Array [ + 55, + 76, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 68, + 76, + ], + "raw": "'string'", + "type": "Literal", + "value": "string", + }, + "type": "BinaryExpression", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 48, + 76, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 78, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 29, + "column": 17, "line": 1, }, }, - "name": "Bar", + "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 [ - 29, - 32, + 17, + 78, ], - "type": "Identifier", + "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": "ArrowFunctionExpression", }, "loc": Object { "end": Object { - "column": 32, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 29, + "column": 6, "line": 1, }, }, "range": Array [ - 29, - 32, + 6, + 78, ], - "type": "ClassImplements", + "type": "VariableDeclarator", }, ], + "kind": "const", "loc": Object { "end": Object { "column": 1, @@ -58102,10 +55066,9 @@ Object { }, "range": Array [ 0, - 37, + 78, ], - "superClass": null, - "type": "ClassDeclaration", + "type": "VariableDeclaration", }, ], "loc": Object { @@ -58120,7 +55083,7 @@ Object { }, "range": Array [ 0, - 38, + 79, ], "sourceType": "script", "tokens": Array [ @@ -58140,12 +55103,12 @@ Object { 5, ], "type": "Keyword", - "value": "class", + "value": "const", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 14, "line": 1, }, "start": Object { @@ -58155,306 +55118,317 @@ Object { }, "range": Array [ 6, - 9, + 14, ], "type": "Identifier", - "value": "Foo", + "value": "isString", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 16, "line": 1, }, "start": Object { - "column": 10, + "column": 15, "line": 1, }, }, "range": Array [ - 10, - 17, + 15, + 16, ], - "type": "Keyword", - "value": "extends", + "type": "Punctuator", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 28, + "column": 18, "line": 1, }, "start": Object { - "column": 18, + "column": 17, "line": 1, }, }, "range": Array [ + 17, 18, - 28, ], - "type": "Keyword", - "value": "implements", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 19, "line": 1, }, "start": Object { - "column": 29, + "column": 18, "line": 1, }, }, "range": Array [ - 29, - 32, + 18, + 19, ], "type": "Identifier", - "value": "Bar", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 20, "line": 1, }, "start": Object { - "column": 33, + "column": 19, "line": 1, }, }, "range": Array [ - 33, - 34, + 19, + 20, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 1, - "line": 3, + "column": 24, + "line": 1, }, "start": Object { - "column": 0, - "line": 3, + "column": 21, + "line": 1, }, }, "range": Array [ - 36, - 37, + 21, + 24, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "any", }, - ], - "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, + "column": 25, + "line": 1, }, "start": Object { - "column": 0, + "column": 24, "line": 1, }, }, "range": Array [ - 0, - 37, + 24, + 25, ], - "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, + "type": "Punctuator", + "value": ")", }, - }, - "range": Array [ - 0, - 38, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 26, "line": 1, }, "start": Object { - "column": 0, + "column": 25, "line": 1, }, }, "range": Array [ - 0, - 5, + 25, + 26, ], - "type": "Keyword", - "value": "class", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 28, "line": 1, }, "start": Object { - "column": 6, + "column": 27, "line": 1, }, }, "range": Array [ - 6, - 9, + 27, + 28, ], "type": "Identifier", - "value": "Foo", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 31, "line": 1, }, "start": Object { - "column": 10, + "column": 29, "line": 1, }, }, "range": Array [ - 10, - 17, + 29, + 31, ], - "type": "Keyword", - "value": "extends", + "type": "Identifier", + "value": "is", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 38, "line": 1, }, "start": Object { - "column": 18, + "column": 32, "line": 1, }, }, "range": Array [ - 18, - 21, + 32, + 38, ], "type": "Identifier", - "value": "Bar", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 32, + "column": 41, "line": 1, }, "start": Object { - "column": 22, + "column": 39, "line": 1, }, }, "range": Array [ - 22, - 32, + 39, + 41, ], - "type": "Keyword", - "value": "implements", + "type": "Punctuator", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 34, + "column": 43, "line": 1, }, "start": Object { - "column": 33, + "column": 42, "line": 1, }, }, "range": Array [ - 33, - 34, + 42, + 43, ], "type": "Punctuator", "value": "{", }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 48, + 54, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 55, + 61, + ], + "type": "Keyword", + "value": "typeof", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 64, + 67, + ], + "type": "Punctuator", + "value": "===", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 68, + 76, + ], + "type": "String", + "value": "'string'", + }, Object { "loc": Object { "end": Object { @@ -58467,8 +55441,8 @@ Object { }, }, "range": Array [ - 36, - 37, + 77, + 78, ], "type": "Punctuator", "value": "}", @@ -58478,87 +55452,302 @@ Object { } `; -exports[`typescript fixtures/errorRecovery/decorator-on-enum-declaration.src 1`] = ` +exports[`typescript fixtures/basics/type-guard-in-function.src 1`] = ` Object { "body": Array [ Object { - "decorators": Array [ - Object { - "expression": 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", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "operator": "typeof", + "prefix": true, + "range": Array [ + 52, + 60, + ], + "type": "UnaryExpression", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "operator": "===", + "range": Array [ + 52, + 73, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 65, + 73, + ], + "raw": "'string'", + "type": "Literal", + "value": "string", + }, + "type": "BinaryExpression", + }, "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 32, + "line": 2, }, "start": Object { - "column": 1, - "line": 1, + "column": 4, + "line": 2, }, }, - "name": "dec", "range": Array [ - 1, - 4, + 45, + 73, ], - "type": "Identifier", + "type": "ReturnStatement", }, - "loc": Object { - "end": Object { - "column": 4, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 39, + "line": 1, }, - "range": Array [ - 0, - 4, - ], - "type": "Decorator", }, - ], + "range": Array [ + 39, + 75, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, "id": Object { "loc": Object { "end": Object { - "column": 11, + "column": 17, "line": 1, }, "start": Object { - "column": 10, + "column": 9, "line": 1, }, }, - "name": "E", + "name": "isString", "range": Array [ - 10, - 11, + 9, + 17, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, "line": 1, }, }, - "members": Array [], + "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, - 14, + 75, ], - "type": "TSEnumDeclaration", + "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": 14, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -58567,14 +55756,14 @@ Object { }, "range": Array [ 0, - 14, + 75, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 1, + "column": 8, "line": 1, }, "start": Object { @@ -58584,376 +55773,313 @@ Object { }, "range": Array [ 0, - 1, + 8, ], - "type": "Punctuator", - "value": "@", + "type": "Keyword", + "value": "function", }, Object { "loc": Object { "end": Object { - "column": 4, + "column": 17, "line": 1, }, "start": Object { - "column": 1, + "column": 9, "line": 1, }, }, "range": Array [ - 1, - 4, + 9, + 17, ], "type": "Identifier", - "value": "dec", + "value": "isString", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 18, "line": 1, }, "start": Object { - "column": 5, + "column": 17, "line": 1, }, }, "range": Array [ - 5, - 9, + 17, + 18, ], - "type": "Keyword", - "value": "enum", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 11, + "column": 19, "line": 1, }, "start": Object { - "column": 10, + "column": 18, "line": 1, }, }, "range": Array [ - 10, - 11, + 18, + 19, ], "type": "Identifier", - "value": "E", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 20, "line": 1, }, "start": Object { - "column": 12, + "column": 19, "line": 1, }, }, "range": Array [ - 12, - 13, + 19, + 20, ], "type": "Punctuator", - "value": "{", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 24, "line": 1, }, "start": Object { - "column": 13, + "column": 21, "line": 1, }, }, "range": Array [ - 13, - 14, + 21, + 24, ], - "type": "Punctuator", - "value": "}", + "type": "Identifier", + "value": "any", }, - ], - "type": "Program", -} -`; - -exports[`typescript fixtures/errorRecovery/decorator-on-interface-declaration.src 1`] = ` -Object { - "body": Array [ Object { - "abstract": false, - "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", + "loc": Object { + "end": Object { + "column": 25, + "line": 1, }, - ], - "heritage": Array [], - "id": Object { - "loc": Object { - "end": Object { - "column": 11, - "line": 2, - }, - "start": Object { - "column": 10, - "line": 2, - }, + "start": Object { + "column": 24, + "line": 1, }, - "name": "M", - "range": Array [ - 18, - 19, - ], - "type": "Identifier", }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ")", + }, + Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 26, + "line": 1, }, "start": Object { - "column": 0, + "column": 25, "line": 1, }, }, "range": Array [ - 0, - 22, + 25, + 26, ], - "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, + "column": 28, "line": 1, }, "start": Object { - "column": 0, + "column": 27, "line": 1, }, }, "range": Array [ - 0, - 1, + 27, + 28, ], - "type": "Punctuator", - "value": "@", + "type": "Identifier", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 5, + "column": 31, "line": 1, }, "start": Object { - "column": 1, + "column": 29, "line": 1, }, }, "range": Array [ - 1, - 5, + 29, + 31, ], "type": "Identifier", - "value": "deco", + "value": "is", }, Object { "loc": Object { "end": Object { - "column": 6, + "column": 38, "line": 1, }, "start": Object { - "column": 5, + "column": 32, "line": 1, }, }, "range": Array [ - 5, - 6, + 32, + 38, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 7, + "column": 40, "line": 1, }, "start": Object { - "column": 6, + "column": 39, "line": 1, }, }, "range": Array [ - 6, - 7, + 39, + 40, ], "type": "Punctuator", - "value": ")", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 10, "line": 2, }, "start": Object { - "column": 0, + "column": 4, "line": 2, }, }, "range": Array [ - 8, - 17, + 45, + 51, ], "type": "Keyword", - "value": "interface", + "value": "return", }, Object { "loc": Object { "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { "column": 11, "line": 2, }, + }, + "range": Array [ + 52, + 58, + ], + "type": "Keyword", + "value": "typeof", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, "start": Object { - "column": 10, + "column": 18, "line": 2, }, }, "range": Array [ - 18, - 19, + 59, + 60, ], "type": "Identifier", - "value": "M", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 23, "line": 2, }, "start": Object { - "column": 12, + "column": 20, "line": 2, }, }, "range": Array [ - 20, - 21, + 61, + 64, ], "type": "Punctuator", - "value": "{", + "value": "===", }, Object { "loc": Object { "end": Object { - "column": 14, + "column": 32, "line": 2, }, "start": Object { - "column": 13, + "column": 24, "line": 2, }, }, "range": Array [ - 21, - 22, + 65, + 73, + ], + "type": "String", + "value": "'string'", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 74, + 75, ], "type": "Punctuator", "value": "}", @@ -58963,123 +56089,227 @@ Object { } `; -exports[`typescript fixtures/errorRecovery/empty-type-arguments.src 1`] = ` +exports[`typescript fixtures/basics/type-guard-in-interface.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": 10, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "isString", + "range": Array [ + 18, + 26, + ], + "type": "Identifier", + }, "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 38, + "line": 2, }, "start": Object { - "column": 6, - "line": 1, + "column": 2, + "line": 2, }, }, - "name": "foo", + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "node", + "range": Array [ + 27, + 36, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 36, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 33, + 36, + ], + "type": "TSAnyKeyword", + }, + }, + }, + ], "range": Array [ - 6, - 16, + 18, + 54, ], - "type": "Identifier", - "typeAnnotation": Object { + "returnType": Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 37, + "line": 2, }, "start": Object { - "column": 9, - "line": 1, + "column": 21, + "line": 2, }, }, "range": Array [ - 9, - 16, + 37, + 53, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 37, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 23, + "line": 2, }, }, - "range": Array [ - 11, - 16, - ], - "type": "TSTypeReference", - "typeName": Object { + "parameterName": Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 27, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 23, + "line": 2, }, }, - "name": "Foo", + "name": "node", "range": Array [ - 11, - 14, + 39, + 43, ], "type": "Identifier", }, - "typeParameters": Object { + "range": Array [ + 39, + 53, + ], + "type": "TSTypePredicate", + "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 37, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 31, + "line": 2, }, }, - "params": Array [], "range": Array [ - 14, - 16, + 47, + 53, ], - "type": "TSTypeParameterInstantiation", + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "range": Array [ + 47, + 53, + ], + "type": "TSStringKeyword", + }, }, }, }, + "type": "TSMethodSignature", }, - "init": null, - "loc": Object { - "end": Object { - "column": 16, - "line": 1, - }, - "start": Object { - "column": 6, - "line": 1, - }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, }, - "range": Array [ - 6, - 16, - ], - "type": "VariableDeclarator", }, - ], - "kind": "const", + "range": Array [ + 14, + 56, + ], + "type": "TSInterfaceBody", + }, + "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": 16, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { "column": 0, @@ -59088,15 +56318,15 @@ Object { }, "range": Array [ 0, - 16, + 56, ], - "type": "VariableDeclaration", + "type": "TSInterfaceDeclaration", }, ], "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 0, + "line": 4, }, "start": Object { "column": 0, @@ -59105,14 +56335,14 @@ Object { }, "range": Array [ 0, - 16, + 57, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, + "column": 9, "line": 1, }, "start": Object { @@ -59122,514 +56352,259 @@ Object { }, "range": Array [ 0, - 5, + 9, ], "type": "Keyword", - "value": "const", + "value": "interface", }, Object { "loc": Object { "end": Object { - "column": 9, + "column": 13, "line": 1, }, "start": Object { - "column": 6, + "column": 10, "line": 1, }, }, "range": Array [ - 6, - 9, + 10, + 13, ], "type": "Identifier", - "value": "foo", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 10, + "column": 15, "line": 1, }, "start": Object { - "column": 9, + "column": 14, "line": 1, }, }, "range": Array [ - 9, - 10, + 14, + 15, ], "type": "Punctuator", - "value": ":", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 10, + "line": 2, }, "start": Object { - "column": 11, - "line": 1, + "column": 2, + "line": 2, }, }, "range": Array [ - 11, - 14, - ], + 18, + 26, + ], "type": "Identifier", - "value": "Foo", + "value": "isString", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 11, + "line": 2, }, "start": Object { - "column": 14, - "line": 1, + "column": 10, + "line": 2, }, }, "range": Array [ - 14, - 15, + 26, + 27, ], "type": "Punctuator", - "value": "<", + "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, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 11, + "line": 2, }, }, "range": Array [ - 0, - 72, + 27, + 31, ], - "source": null, - "specifiers": Array [], - "type": "ExportNamedDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 72, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Identifier", + "value": "node", }, - }, - "range": Array [ - 0, - 72, - ], - "sourceType": "module", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 16, + "line": 2, }, "start": Object { - "column": 0, - "line": 1, + "column": 15, + "line": 2, }, }, "range": Array [ - 0, - 6, + 31, + 32, ], - "type": "Keyword", - "value": "export", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 1, + "column": 20, + "line": 2, }, "start": Object { - "column": 7, - "line": 1, + "column": 17, + "line": 2, }, }, "range": Array [ - 7, - 14, + 33, + 36, ], - "type": "Keyword", - "value": "private", + "type": "Identifier", + "value": "any", }, Object { "loc": Object { "end": Object { "column": 21, - "line": 1, + "line": 2, }, "start": Object { - "column": 15, - "line": 1, + "column": 20, + "line": 2, }, }, "range": Array [ - 15, - 21, + 36, + 37, ], - "type": "Keyword", - "value": "public", + "type": "Punctuator", + "value": ")", }, 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, + "line": 2, }, "start": Object { - "column": 32, - "line": 1, + "column": 21, + "line": 2, }, }, "range": Array [ - 32, + 37, 38, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 47, - "line": 1, + "column": 27, + "line": 2, }, "start": Object { - "column": 39, - "line": 1, + "column": 23, + "line": 2, }, }, "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, + 43, ], "type": "Identifier", - "value": "abstract", + "value": "node", }, Object { "loc": Object { "end": Object { - "column": 62, - "line": 1, + "column": 30, + "line": 2, }, "start": Object { - "column": 57, - "line": 1, + "column": 28, + "line": 2, }, }, "range": Array [ - 57, - 62, + 44, + 46, ], "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", + "value": "is", }, Object { "loc": Object { "end": Object { - "column": 69, - "line": 1, + "column": 37, + "line": 2, }, "start": Object { - "column": 68, - "line": 1, + "column": 31, + "line": 2, }, }, "range": Array [ - 68, - 69, + 47, + 53, ], "type": "Identifier", - "value": "X", + "value": "string", }, Object { "loc": Object { "end": Object { - "column": 71, - "line": 1, + "column": 38, + "line": 2, }, "start": Object { - "column": 70, - "line": 1, + "column": 37, + "line": 2, }, }, "range": Array [ - 70, - 71, + 53, + 54, ], "type": "Punctuator", - "value": "{", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 72, - "line": 1, + "column": 1, + "line": 3, }, "start": Object { - "column": 71, - "line": 1, + "column": 0, + "line": 3, }, }, "range": Array [ - 71, - 72, + 55, + 56, ], "type": "Punctuator", "value": "}", @@ -59639,204 +56614,14 @@ Object { } `; -exports[`typescript fixtures/errorRecovery/interface-empty-extends.src 1`] = ` +exports[`typescript fixtures/basics/type-guard-in-method.src 1`] = ` Object { "body": Array [ Object { - "abstract": false, - "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 { - "abstract": false, "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 { @@ -59844,1923 +56629,503 @@ Object { "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, - "name": "bar", + "name": "isBar", "range": Array [ - 20, - 23, + 14, + 19, ], "type": "Identifier", }, + "kind": "method", "loc": Object { "end": Object { - "column": 22, - "line": 2, + "column": 3, + "line": 4, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "range": Array [ - 20, - 38, + 14, + 75, ], - "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 { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 51, + 55, + ], + "type": "ThisExpression", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "operator": "instanceof", + "range": Array [ + 51, + 70, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 3, + }, + }, + "name": "Foo", + "range": Array [ + 67, + 70, + ], + "type": "Identifier", + }, + "type": "BinaryExpression", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 44, + 71, + ], + "type": "ReturnStatement", + }, + ], "loc": Object { "end": Object { - "column": 15, - "line": 2, + "column": 3, + "line": 4, }, "start": Object { - "column": 9, + "column": 26, "line": 2, }, }, "range": Array [ - 25, - 31, + 38, + 75, ], - "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": 3, + "line": 4, }, "start": Object { - "column": 12, - "line": 3, + "column": 7, + "line": 2, }, }, + "params": Array [], "range": Array [ - 51, - 59, + 19, + 75, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "returnType": Object { "loc": Object { "end": Object { - "column": 20, - "line": 3, + "column": 25, + "line": 2, }, "start": Object { - "column": 14, - "line": 3, + "column": 9, + "line": 2, }, }, "range": Array [ - 53, - 59, + 21, + 37, ], - "type": "TSStringKeyword", + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "parameterName": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 23, + 27, + ], + "type": "TSThisType", + }, + "range": Array [ + 23, + 37, + ], + "type": "TSTypePredicate", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "TSStringKeyword", + }, + }, + }, }, + "type": "FunctionExpression", }, }, Object { - "accessibility": "private", "computed": false, "key": Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 7, + "line": 5, }, "start": Object { - "column": 12, - "line": 4, + "column": 2, + "line": 5, }, }, - "name": "b", + "name": "isBaz", "range": Array [ - 73, - 74, + 78, + 83, ], "type": "Identifier", }, "loc": Object { "end": Object { - "column": 22, - "line": 4, + "column": 3, + "line": 7, }, "start": Object { - "column": 4, - "line": 4, + "column": 2, + "line": 5, }, }, "range": Array [ - 65, - 83, + 78, + 145, ], - "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 { + "static": false, + "type": "ClassProperty", + "value": Object { + "async": false, + "body": Object { + "body": Array [ + Object { + "argument": Object { + "left": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 6, + }, + "start": Object { + "column": 11, + "line": 6, + }, + }, + "range": Array [ + 121, + 125, + ], + "type": "ThisExpression", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 6, + }, + "start": Object { + "column": 11, + "line": 6, + }, + }, + "operator": "instanceof", + "range": Array [ + 121, + 140, + ], + "right": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 6, + }, + "start": Object { + "column": 27, + "line": 6, + }, + }, + "name": "Foo", + "range": Array [ + 137, + 140, + ], + "type": "Identifier", + }, + "type": "BinaryExpression", + }, + "loc": Object { + "end": Object { + "column": 31, + "line": 6, + }, + "start": Object { + "column": 4, + "line": 6, + }, + }, + "range": Array [ + 114, + 141, + ], + "type": "ReturnStatement", + }, + ], "loc": Object { "end": Object { - "column": 21, - "line": 4, + "column": 3, + "line": 7, }, "start": Object { - "column": 15, - "line": 4, + "column": 32, + "line": 5, }, }, "range": Array [ - 76, - 82, + 108, + 145, ], - "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, + "type": "BlockStatement", }, - }, - "range": Array [ - 88, - 108, - ], - "type": "TSPropertySignature", - "typeAnnotation": Object { + "expression": false, + "generator": false, + "id": null, "loc": Object { "end": Object { - "column": 23, - "line": 5, + "column": 3, + "line": 7, }, "start": Object { - "column": 15, + "column": 10, "line": 5, }, }, + "params": Array [], "range": Array [ - 99, - 107, + 86, + 145, ], - "type": "TSTypeAnnotation", - "typeAnnotation": Object { + "returnType": Object { "loc": Object { "end": Object { - "column": 23, + "column": 28, "line": 5, }, "start": Object { - "column": 17, + "column": 12, "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, + 88, + 104, ], "type": "TSTypeAnnotation", "typeAnnotation": Object { "loc": Object { "end": Object { - "column": 23, - "line": 10, + "column": 28, + "line": 5, }, "start": Object { - "column": 17, - "line": 10, + "column": 14, + "line": 5, }, }, - "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, + "parameterName": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 5, + }, + "start": Object { + "column": 14, + "line": 5, + }, }, + "range": Array [ + 90, + 94, + ], + "type": "TSThisType", }, "range": Array [ - 230, - 236, + 90, + 104, ], - "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, + "type": "TSTypePredicate", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 5, + }, + "start": Object { + "column": 22, + "line": 5, + }, }, - "start": Object { - "column": 20, - "line": 12, + "range": Array [ + 98, + 104, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 5, + }, + "start": Object { + "column": 22, + "line": 5, + }, + }, + "range": Array [ + 98, + 104, + ], + "type": "TSStringKeyword", }, }, - "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", - }, + "type": "ArrowFunctionExpression", }, }, - 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", - }, - }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 8, }, - 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", - }, - }, + "start": Object { + "column": 10, + "line": 1, }, - 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", - }, - }, + }, + "range": Array [ + 10, + 147, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, }, - 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, + "start": Object { + "column": 6, + "line": 1, }, }, "name": "Foo", "range": Array [ - 10, - 13, + 6, + 9, ], "type": "Identifier", }, "loc": Object { "end": Object { "column": 1, - "line": 23, + "line": 8, }, "start": Object { "column": 0, @@ -61769,15 +57134,16 @@ Object { }, "range": Array [ 0, - 594, + 147, ], - "type": "TSInterfaceDeclaration", + "superClass": null, + "type": "ClassDeclaration", }, ], "loc": Object { "end": Object { "column": 0, - "line": 25, + "line": 9, }, "start": Object { "column": 0, @@ -61786,14 +57152,14 @@ Object { }, "range": Array [ 0, - 596, + 148, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 9, + "column": 5, "line": 1, }, "start": Object { @@ -61803,25 +57169,25 @@ Object { }, "range": Array [ 0, - 9, + 5, ], "type": "Keyword", - "value": "interface", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 9, "line": 1, }, "start": Object { - "column": 10, + "column": 6, "line": 1, }, }, "range": Array [ - 10, - 13, + 6, + 9, ], "type": "Identifier", "value": "Foo", @@ -61829,17 +57195,17 @@ Object { Object { "loc": Object { "end": Object { - "column": 15, + "column": 11, "line": 1, }, "start": Object { - "column": 14, + "column": 10, "line": 1, }, }, "range": Array [ - 14, - 15, + 10, + 11, ], "type": "Punctuator", "value": "{", @@ -61851,16 +57217,16 @@ Object { "line": 2, }, "start": Object { - "column": 4, + "column": 2, "line": 2, }, }, "range": Array [ - 20, - 23, + 14, + 19, ], "type": "Identifier", - "value": "bar", + "value": "isBar", }, Object { "loc": Object { @@ -61874,83 +57240,119 @@ Object { }, }, "range": Array [ - 23, - 24, + 19, + 20, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 9, "line": 2, }, "start": Object { - "column": 9, + "column": 8, "line": 2, }, }, "range": Array [ - 25, - 31, + 20, + 21, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 17, + "column": 10, "line": 2, }, "start": Object { - "column": 16, + "column": 9, "line": 2, }, }, "range": Array [ - 32, - 33, + 21, + 22, ], "type": "Punctuator", - "value": "=", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 15, "line": 2, }, "start": Object { - "column": 18, + "column": 11, "line": 2, }, }, "range": Array [ - 34, - 37, + 23, + 27, ], - "type": "String", - "value": "'a'", - }, + "type": "Keyword", + "value": "this", + }, Object { "loc": Object { "end": Object { - "column": 22, + "column": 18, "line": 2, }, "start": Object { - "column": 21, + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 28, + 30, + ], + "type": "Identifier", + "value": "is", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, "line": 2, }, }, "range": Array [ + 31, 37, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ 38, + 39, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { @@ -61964,16 +57366,16 @@ Object { }, }, "range": Array [ - 43, - 49, + 44, + 50, ], "type": "Keyword", - "value": "public", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 15, "line": 3, }, "start": Object { @@ -61982,62 +57384,62 @@ Object { }, }, "range": Array [ - 50, 51, + 55, ], - "type": "Identifier", - "value": "a", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 26, "line": 3, }, "start": Object { - "column": 12, + "column": 16, "line": 3, }, }, "range": Array [ - 51, - 52, + 56, + 66, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "instanceof", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 30, "line": 3, }, "start": Object { - "column": 14, + "column": 27, "line": 3, }, }, "range": Array [ - 53, - 59, + 67, + 70, ], "type": "Identifier", - "value": "string", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 31, "line": 3, }, "start": Object { - "column": 20, + "column": 30, "line": 3, }, }, "range": Array [ - 59, - 60, + 70, + 71, ], "type": "Punctuator", "value": ";", @@ -62045,92 +57447,92 @@ Object { Object { "loc": Object { "end": Object { - "column": 11, + "column": 3, "line": 4, }, "start": Object { - "column": 4, + "column": 2, "line": 4, }, }, "range": Array [ - 65, - 72, + 74, + 75, ], - "type": "Keyword", - "value": "private", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 4, + "column": 7, + "line": 5, }, "start": Object { - "column": 12, - "line": 4, + "column": 2, + "line": 5, }, }, "range": Array [ - 73, - 74, + 78, + 83, ], "type": "Identifier", - "value": "b", + "value": "isBaz", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 4, + "column": 9, + "line": 5, }, "start": Object { - "column": 13, - "line": 4, + "column": 8, + "line": 5, }, }, "range": Array [ - 74, - 75, + 84, + 85, ], "type": "Punctuator", - "value": ":", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 4, + "column": 11, + "line": 5, }, "start": Object { - "column": 15, - "line": 4, + "column": 10, + "line": 5, }, }, "range": Array [ - 76, - 82, + 86, + 87, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 22, - "line": 4, + "column": 12, + "line": 5, }, "start": Object { - "column": 21, - "line": 4, + "column": 11, + "line": 5, }, }, "range": Array [ - 82, - 83, + 87, + 88, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { @@ -62139,21 +57541,21 @@ Object { "line": 5, }, "start": Object { - "column": 4, + "column": 12, "line": 5, }, }, "range": Array [ 88, - 97, + 89, ], - "type": "Keyword", - "value": "protected", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 15, + "column": 18, "line": 5, }, "start": Object { @@ -62162,44 +57564,44 @@ Object { }, }, "range": Array [ - 98, - 99, + 90, + 94, ], - "type": "Identifier", - "value": "c", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 16, + "column": 21, "line": 5, }, "start": Object { - "column": 15, + "column": 19, "line": 5, }, }, "range": Array [ - 99, - 100, + 95, + 97, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "is", }, Object { "loc": Object { "end": Object { - "column": 23, + "column": 28, "line": 5, }, "start": Object { - "column": 17, + "column": 22, "line": 5, }, }, "range": Array [ - 101, - 107, + 98, + 104, ], "type": "Identifier", "value": "string", @@ -62207,503 +57609,874 @@ Object { Object { "loc": Object { "end": Object { - "column": 24, + "column": 31, "line": 5, }, "start": Object { - "column": 23, + "column": 29, "line": 5, }, }, "range": Array [ + 105, 107, - 108, ], "type": "Punctuator", - "value": ";", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 6, + "column": 33, + "line": 5, }, "start": Object { - "column": 4, - "line": 6, + "column": 32, + "line": 5, }, }, "range": Array [ - 113, - 119, + 108, + 109, ], - "type": "Keyword", - "value": "static", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, + "column": 10, "line": 6, }, "start": Object { - "column": 11, + "column": 4, "line": 6, }, }, "range": Array [ + 114, 120, - 121, ], - "type": "Identifier", - "value": "d", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 15, "line": 6, }, "start": Object { - "column": 12, + "column": 11, "line": 6, }, }, "range": Array [ 121, - 122, + 125, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 20, + "column": 26, "line": 6, }, "start": Object { - "column": 14, + "column": 16, "line": 6, }, }, "range": Array [ - 123, - 129, + 126, + 136, ], - "type": "Identifier", - "value": "string", + "type": "Keyword", + "value": "instanceof", }, Object { "loc": Object { "end": Object { - "column": 21, + "column": 30, "line": 6, }, "start": Object { - "column": 20, + "column": 27, "line": 6, }, }, "range": Array [ - 129, - 130, + 137, + 140, ], - "type": "Punctuator", - "value": ";", + "type": "Identifier", + "value": "Foo", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 7, + "column": 31, + "line": 6, }, "start": Object { - "column": 4, - "line": 7, + "column": 30, + "line": 6, }, }, "range": Array [ - 135, + 140, 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", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 13, + "column": 3, "line": 7, }, "start": Object { - "column": 12, + "column": 2, "line": 7, }, }, "range": Array [ - 143, 144, + 145, ], "type": "Punctuator", - "value": ":", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 7, + "column": 1, + "line": 8, }, "start": Object { - "column": 14, - "line": 7, + "column": 0, + "line": 8, }, }, "range": Array [ - 145, - 151, + 146, + 147, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "}", }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/type-parameters-comments.src 1`] = ` +Object { + "body": Array [ Object { - "loc": Object { - "end": Object { - "column": 21, - "line": 7, + "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", }, - "start": Object { - "column": 20, - "line": 7, + "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 { + "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", }, }, - "range": Array [ - 151, - 152, - ], - "type": "Punctuator", - "value": ";", - }, - Object { "loc": Object { "end": Object { - "column": 12, - "line": 8, + "column": 43, + "line": 1, }, "start": Object { - "column": 4, - "line": 8, + "column": 0, + "line": 1, }, }, "range": Array [ - 157, - 165, + 0, + 43, ], - "type": "Identifier", - "value": "readonly", + "type": "ExpressionStatement", }, Object { - "loc": Object { - "end": Object { - "column": 14, - "line": 8, + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 43, + "line": 2, + }, + "start": Object { + "column": 40, + "line": 2, + }, }, - "start": Object { - "column": 13, - "line": 8, + "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", }, - "range": Array [ - 166, - 167, - ], - "type": "Identifier", - "value": "f", - }, - Object { "loc": Object { "end": Object { - "column": 15, - "line": 8, + "column": 43, + "line": 2, }, "start": Object { - "column": 14, - "line": 8, + "column": 0, + "line": 2, }, }, + "params": Array [], "range": Array [ - 167, - 168, + 44, + 87, ], - "type": "Punctuator", - "value": ":", - }, - Object { - "loc": Object { - "end": Object { - "column": 22, - "line": 8, + "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": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "name": "A", + "range": Array [ + 68, + 69, + ], + "type": "Identifier", + }, + "range": Array [ + 68, + 69, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 56, + 81, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + Object { + "async": false, + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 46, + "line": 3, + }, + }, + "range": Array [ + 134, + 137, + ], + "type": "BlockStatement", + }, + "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": 16, - "line": 8, + "column": 0, + "line": 3, }, }, + "params": Array [], "range": Array [ - 169, - 175, + 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": 41, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "name": "A", + "range": Array [ + 112, + 113, + ], + "type": "Identifier", + }, + "range": Array [ + 112, + 129, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 100, + 131, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 138, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, ], "type": "Identifier", - "value": "string", + "value": "foo", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 8, + "column": 4, + "line": 1, }, "start": Object { - "column": 22, - "line": 8, + "column": 3, + "line": 1, }, }, "range": Array [ - 175, - 176, + 3, + 4, ], "type": "Punctuator", - "value": ";", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 10, + "column": 22, + "line": 1, }, "start": Object { - "column": 4, - "line": 10, + "column": 21, + "line": 1, }, }, "range": Array [ - 182, - 188, + 21, + 22, ], - "type": "Keyword", - "value": "public", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 10, + "column": 40, + "line": 1, }, "start": Object { - "column": 11, - "line": 10, + "column": 39, + "line": 1, }, }, "range": Array [ - 189, - 190, + 39, + 40, ], "type": "Punctuator", - "value": "[", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 10, + "column": 41, + "line": 1, }, "start": Object { - "column": 12, - "line": 10, + "column": 40, + "line": 1, }, }, "range": Array [ - 190, - 193, + 40, + 41, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 10, + "column": 42, + "line": 1, }, "start": Object { - "column": 15, - "line": 10, + "column": 41, + "line": 1, }, }, "range": Array [ - 193, - 194, + 41, + 42, ], "type": "Punctuator", - "value": ":", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 10, + "column": 43, + "line": 1, }, "start": Object { - "column": 17, - "line": 10, + "column": 42, + "line": 1, }, }, "range": Array [ - 195, - 201, + 42, + 43, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 44, + 52, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 53, + 56, ], "type": "Identifier", - "value": "string", + "value": "bar", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 10, + "column": 13, + "line": 2, }, "start": Object { - "column": 23, - "line": 10, + "column": 12, + "line": 2, }, }, "range": Array [ - 201, - 202, + 56, + 57, ], "type": "Punctuator", - "value": "]", + "value": "<", }, Object { "loc": Object { "end": Object { "column": 25, - "line": 10, + "line": 2, }, "start": Object { "column": 24, - "line": 10, + "line": 2, }, }, "range": Array [ - 202, - 203, + 68, + 69, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 36, + "line": 2, + }, + }, + "range": Array [ + 80, + 81, ], "type": "Punctuator", - "value": ":", + "value": ">", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 10, + "column": 38, + "line": 2, }, "start": Object { - "column": 26, - "line": 10, + "column": 37, + "line": 2, }, }, "range": Array [ - 204, - 210, + 81, + 82, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 10, + "column": 39, + "line": 2, }, "start": Object { - "column": 32, - "line": 10, + "column": 38, + "line": 2, }, }, "range": Array [ - 210, - 211, + 82, + 83, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 11, + "column": 41, + "line": 2, }, "start": Object { - "column": 4, - "line": 11, + "column": 40, + "line": 2, }, }, "range": Array [ - 216, - 223, + 84, + 85, ], - "type": "Keyword", - "value": "private", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 11, + "column": 43, + "line": 2, }, "start": Object { - "column": 12, - "line": 11, + "column": 42, + "line": 2, }, }, "range": Array [ - 224, - 225, + 86, + 87, ], "type": "Punctuator", - "value": "[", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 11, + "column": 8, + "line": 3, }, "start": Object { - "column": 13, - "line": 11, + "column": 0, + "line": 3, }, }, "range": Array [ - 225, - 228, + 88, + 96, + ], + "type": "Keyword", + "value": "function", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 97, + 100, ], "type": "Identifier", "value": "baz", @@ -62711,395 +58484,51391 @@ Object { Object { "loc": Object { "end": Object { - "column": 17, - "line": 11, + "column": 13, + "line": 3, }, "start": Object { - "column": 16, - "line": 11, + "column": 12, + "line": 3, }, }, "range": Array [ - 228, - 229, + 100, + 101, ], "type": "Punctuator", - "value": ":", + "value": "<", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 11, + "column": 25, + "line": 3, }, "start": Object { - "column": 18, - "line": 11, + "column": 24, + "line": 3, + }, + }, + "range": Array [ + 112, + 113, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 3, + }, + "start": Object { + "column": 36, + "line": 3, + }, + }, + "range": Array [ + 124, + 125, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 3, + }, + "start": Object { + "column": 38, + "line": 3, + }, + }, + "range": Array [ + 126, + 129, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 3, + }, + "start": Object { + "column": 42, + "line": 3, + }, + }, + "range": Array [ + 130, + 131, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 3, + }, + "start": Object { + "column": 43, + "line": 3, + }, + }, + "range": Array [ + 131, + 132, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 3, + }, + "start": Object { + "column": 44, + "line": 3, + }, + }, + "range": Array [ + 132, + 133, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 3, + }, + "start": Object { + "column": 46, + "line": 3, + }, + }, + "range": Array [ + 134, + 135, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 3, + }, + "start": Object { + "column": 48, + "line": 3, + }, + }, + "range": Array [ + 136, + 137, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/type-reference-comments.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "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, + 78, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 21, + ], + "type": "Identifier", + "value": "AudioBufferList", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 26, + 34, + ], + "type": "Identifier", + "value": "mBuffers", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 36, + 43, + ], + "type": "Identifier", + "value": "interop", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 44, + 53, + ], + "type": "Identifier", + "value": "Reference", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 29, + "line": 2, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 54, + 57, + ], + "type": "Identifier", + "value": "any", + }, + Object { + "loc": Object { + "end": Object { + "column": 50, + "line": 2, + }, + "start": Object { + "column": 49, + "line": 2, + }, + }, + "range": Array [ + 73, + 74, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 51, + "line": 2, + }, + "start": Object { + "column": 50, + "line": 2, + }, + }, + "range": Array [ + 74, + 75, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 76, + 77, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-bigint.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": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSBigIntKeyword", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "Identifier", + "value": "bigint", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-boolean.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": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 18, + ], + "type": "TSBooleanKeyword", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 19, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 18, + ], + "type": "Identifier", + "value": "boolean", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-false.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": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "literal": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "raw": "false", + "type": "Literal", + "value": false, + }, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "type": "TSLiteralType", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "type": "Boolean", + "value": "false", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-never.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": 16, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "type": "TSNeverKeyword", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 16, + ], + "type": "Identifier", + "value": "never", + }, + ], + "type": "Program", +} +`; + +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": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 15, + ], + "type": "Keyword", + "value": "null", + }, + ], + "type": "Program", +} +`; + +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": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSNumberKeyword", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "Identifier", + "value": "number", + }, + ], + "type": "Program", +} +`; + +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": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSObjectKeyword", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "Identifier", + "value": "object", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-keyword-string.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": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSStringKeyword", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "Identifier", + "value": "string", + }, + ], + "type": "Program", +} +`; + +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": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSSymbolKeyword", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "Identifier", + "value": "symbol", + }, + ], + "type": "Program", +} +`; + +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": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "literal": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 15, + ], + "raw": "true", + "type": "Literal", + "value": true, + }, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 15, + ], + "type": "TSLiteralType", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 16, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 15, + ], + "type": "Boolean", + "value": "true", + }, + ], + "type": "Program", +} +`; + +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": 20, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 20, + ], + "type": "TSUndefinedKeyword", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 21, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 20, + ], + "type": "Identifier", + "value": "undefined", + }, + ], + "type": "Program", +} +`; + +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": 18, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 18, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 18, + ], + "type": "TSUnknownKeyword", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 19, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 18, + ], + "type": "Identifier", + "value": "unknown", + }, + ], + "type": "Program", +} +`; + +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": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 15, + ], + "type": "TSVoidKeyword", + }, + }, + ], + "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/basics/typed-method-signature.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, + 57, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "members": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "h", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 17, + 28, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 20, + 28, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 15, + 36, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 29, + 35, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 31, + 35, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", + }, + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "name": "g", + "range": Array [ + 39, + 40, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 3, + }, + }, + "name": "bar", + "range": Array [ + 44, + 50, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 47, + 50, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "name": "T", + "range": Array [ + 49, + 50, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "range": Array [ + 39, + 55, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 51, + 54, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "name": "T", + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + }, + }, + }, + "type": "TSMethodSignature", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 3, + }, + "start": Object { + "column": 3, + "line": 3, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "T", + "range": Array [ + 41, + 42, + ], + "type": "Identifier", + }, + "range": Array [ + 41, + 42, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 40, + 43, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "range": Array [ + 11, + 57, + ], + "type": "TSTypeLiteral", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 58, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + "value": "h", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 31, + 35, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 2, + "line": 3, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Identifier", + "value": "g", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 3, + }, + "start": Object { + "column": 3, + "line": 3, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 7, + "line": 3, + }, + }, + "range": Array [ + 44, + 47, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 3, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 56, + 57, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/typed-this.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 1, + "line": 2, + }, + }, + "name": "addClickListener", + "range": Array [ + 23, + 39, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 65, + "line": 2, + }, + "start": Object { + "column": 1, + "line": 2, + }, + }, + "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, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "params": 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, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 2, + }, + "start": Object { + "column": 50, + "line": 2, + }, + }, + "range": Array [ + 72, + 79, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 2, + }, + "start": Object { + "column": 53, + "line": 2, + }, + }, + "range": Array [ + 75, + 79, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSFunctionType", + }, + }, + }, + ], + "range": Array [ + 23, + 87, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 64, + "line": 2, + }, + "start": Object { + "column": 58, + "line": 2, + }, + }, + "range": Array [ + 80, + 86, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 64, + "line": 2, + }, + "start": Object { + "column": 60, + "line": 2, + }, + }, + "range": Array [ + 82, + 86, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 89, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "UIElement", + "range": Array [ + 10, + 19, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 89, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 90, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 19, + ], + "type": "Identifier", + "value": "UIElement", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 1, + "line": 2, + }, + }, + "range": Array [ + 23, + 39, + ], + "type": "Identifier", + "value": "addClickListener", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 40, + 47, + ], + "type": "Identifier", + "value": "onclick", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 50, + 54, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 56, + 60, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 2, + }, + "start": Object { + "column": 38, + "line": 2, + }, + }, + "range": Array [ + 60, + 61, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 40, + "line": 2, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Identifier", + "value": "e", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 41, + "line": 2, + }, + }, + "range": Array [ + 63, + 64, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 2, + }, + "start": Object { + "column": 43, + "line": 2, + }, + }, + "range": Array [ + 65, + 70, + ], + "type": "Identifier", + "value": "Event", + }, + Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 2, + }, + "start": Object { + "column": 48, + "line": 2, + }, + }, + "range": Array [ + 70, + 71, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 52, + "line": 2, + }, + "start": Object { + "column": 50, + "line": 2, + }, + }, + "range": Array [ + 72, + 74, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 2, + }, + "start": Object { + "column": 53, + "line": 2, + }, + }, + "range": Array [ + 75, + 79, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 58, + "line": 2, + }, + "start": Object { + "column": 57, + "line": 2, + }, + }, + "range": Array [ + 79, + 80, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 59, + "line": 2, + }, + "start": Object { + "column": 58, + "line": 2, + }, + }, + "range": Array [ + 80, + 81, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 64, + "line": 2, + }, + "start": Object { + "column": 60, + "line": 2, + }, + }, + "range": Array [ + 82, + 86, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 65, + "line": 2, + }, + "start": Object { + "column": 64, + "line": 2, + }, + }, + "range": Array [ + 86, + 87, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 88, + 89, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +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": 23, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "operator": "unique", + "range": Array [ + 9, + 22, + ], + "type": "TSTypeOperator", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 22, + ], + "type": "TSSymbolKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "type": "Identifier", + "value": "unique", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 22, + ], + "type": "Identifier", + "value": "symbol", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/unknown-type-annotation.src 1`] = ` +Object { + "body": Array [ + Object { + "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, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 16, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 16, + ], + "type": "TSUnknownKeyword", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 16, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "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": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 16, + ], + "type": "Identifier", + "value": "unknown", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +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, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 17, + ], + "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": 15, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 18, + 33, + ], + "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": 15, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 34, + 49, + ], + "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": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "const", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "!", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 16, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 18, + 21, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "!", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 26, + 32, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 34, + 37, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 3, + }, + "start": Object { + "column": 5, + "line": 3, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "!", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 6, + "line": 3, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 42, + 48, + ], + "type": "Identifier", + "value": "object", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/var-with-dotted-type.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": "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": 14, + "line": 1, + }, + "start": Object { + "column": 9, + "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", + }, + "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", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 14, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "var", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 15, + ], + "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": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + "value": "B", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + "value": "C", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/basics/var-with-type.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 { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 15, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 15, + ], + "type": "TSStringKeyword", + }, + }, + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 28, + ], + "raw": "\\"Nicholas\\"", + "type": "Literal", + "value": "Nicholas", + }, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 28, + ], + "type": "VariableDeclarator", + }, + ], + "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, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 37, + 45, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 39, + 45, + ], + "type": "TSStringKeyword", + }, + }, + }, + "init": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 48, + 53, + ], + "raw": "\\"Bar\\"", + "type": "Literal", + "value": "Bar", + }, + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 34, + 53, + ], + "type": "VariableDeclarator", + }, + ], + "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, + "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 [ + 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, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "type": "TSModuleDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 24, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 14, + ], + "type": "Identifier", + "value": "module", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +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": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 17, + ], + "type": "Identifier", + "value": "namespace", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +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": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 25, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "TSStringKeyword", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 12, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "Identifier", + "value": "string", + }, + ], + "type": "Program", +} +`; + +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": 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": 7, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 7, + ], + "type": "Identifier", + "value": "declare", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 11, + ], + "type": "Keyword", + "value": "var", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 15, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 20, + ], + "type": "Identifier", + "value": "any", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/accessor-decorators/accessor-decorator-factory-instance-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": 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, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Point", + "range": Array [ + 6, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 72, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 72, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 11, + ], + "type": "Identifier", + "value": "Point", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 19, + 31, + ], + "type": "Identifier", + "value": "configurable", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 32, + 37, + ], + "type": "Boolean", + "value": "false", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 43, + 46, + ], + "type": "Identifier", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 53, + 59, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 60, + 64, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 3, + }, + "start": Object { + "column": 25, + "line": 3, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 65, + 67, + ], + "type": "Identifier", + "value": "_x", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 3, + }, + }, + "range": Array [ + 67, + 68, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 3, + }, + }, + "range": Array [ + 69, + 70, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 71, + 72, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +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, + }, + }, + "range": Array [ + 12, + 82, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Other", + "range": Array [ + 6, + 11, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 82, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 82, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 11, + ], + "type": "Identifier", + "value": "Other", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 19, + 22, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 25, + 28, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 30, + 34, + ], + "type": "Boolean", + "value": "true", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 42, + 48, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 49, + 52, + ], + "type": "Identifier", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 53, + 56, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 56, + 57, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 57, + 58, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 59, + 60, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 23, + "line": 3, + }, + }, + "range": Array [ + 61, + 67, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 3, + }, + }, + "range": Array [ + 68, + 72, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 3, + }, + "start": Object { + "column": 34, + "line": 3, + }, + }, + "range": Array [ + 72, + 73, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 3, + }, + "start": Object { + "column": 35, + "line": 3, + }, + }, + "range": Array [ + 73, + 77, + ], + "type": "Identifier", + "value": "_bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 3, + }, + "start": Object { + "column": 39, + "line": 3, + }, + }, + "range": Array [ + 77, + 78, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 3, + }, + "start": Object { + "column": 41, + "line": 3, + }, + }, + "range": Array [ + 79, + 80, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 81, + 82, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +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": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "name": "z", + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + }, + "kind": "get", + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 4, + "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, + }, + }, + "object": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 43, + 47, + ], + "type": "ThisExpression", + }, + "property": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "name": "_z", + "range": Array [ + 48, + 50, + ], + "type": "Identifier", + }, + "range": Array [ + 43, + 50, + ], + "type": "MemberExpression", + }, + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 36, + 51, + ], + "type": "ReturnStatement", + }, + ], + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 34, + 53, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "params": Array [], + "range": Array [ + 31, + 53, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 55, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "P", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 55, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 55, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "P", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 21, + ], + "type": "Identifier", + "value": "hidden", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + "value": "get", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Identifier", + "value": "z", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 9, + "line": 3, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 3, + }, + "start": Object { + "column": 10, + "line": 3, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 3, + }, + }, + "range": Array [ + 36, + 42, + ], + "type": "Keyword", + "value": "return", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 43, + 47, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 3, + }, + "start": Object { + "column": 25, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 48, + 50, + ], + "type": "Identifier", + "value": "_z", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 3, + }, + "start": Object { + "column": 30, + "line": 3, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/accessor-decorators/accessor-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": 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": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "name": "y", + "range": Array [ + 43, + 44, + ], + "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", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "range": Array [ + 48, + 76, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "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, + }, + }, + "name": "User", + "range": Array [ + 6, + 10, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 78, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 78, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 10, + ], + "type": "Identifier", + "value": "User", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 18, + 27, + ], + "type": "Identifier", + "value": "adminonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 39, + 42, + ], + "type": "Identifier", + "value": "set", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 3, + }, + "start": Object { + "column": 15, + "line": 3, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Identifier", + "value": "y", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 3, + }, + "start": Object { + "column": 16, + "line": 3, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 17, + "line": 3, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 4, + }, + "start": Object { + "column": 8, + "line": 4, + }, + }, + "range": Array [ + 58, + 62, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 4, + }, + "start": Object { + "column": 12, + "line": 4, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 4, + }, + "start": Object { + "column": 13, + "line": 4, + }, + }, + "range": Array [ + 63, + 65, + ], + "type": "Identifier", + "value": "_y", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 4, + }, + }, + "range": Array [ + 66, + 67, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 4, + }, + "start": Object { + "column": 18, + "line": 4, + }, + }, + "range": Array [ + 68, + 69, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 4, + }, + "start": Object { + "column": 19, + "line": 4, + }, + }, + "range": Array [ + 69, + 70, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 5, + }, + "start": Object { + "column": 4, + "line": 5, + }, + }, + "range": Array [ + 75, + 76, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 6, + }, + }, + "range": Array [ + 77, + 78, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +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, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 20, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 7, + ], + "type": "Identifier", + "value": "sealed", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 2, + }, + }, + "range": Array [ + 8, + 13, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 14, + 17, + ], + "type": "Identifier", + "value": "Qux", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +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": 21, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 58, + ], + "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": 1, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 1, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 1, + "line": 1, + }, + }, + "range": Array [ + 1, + 10, + ], + "type": "Identifier", + "value": "Component", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 25, + ], + "type": "Identifier", + "value": "selector", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 27, + 32, + ], + "type": "String", + "value": "'foo'", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 2, + "line": 3, + }, + "start": Object { + "column": 1, + "line": 3, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 37, + 42, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 4, + }, + "start": Object { + "column": 6, + "line": 4, + }, + }, + "range": Array [ + 43, + 55, + ], + "type": "Identifier", + "value": "FooComponent", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 4, + }, + "start": Object { + "column": 19, + "line": 4, + }, + }, + "range": Array [ + 56, + 57, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 4, + }, + "start": Object { + "column": 20, + "line": 4, + }, + }, + "range": Array [ + 57, + 58, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/method-decorators/method-decorator-factory-instance-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": 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", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 30, + ], + "type": "Decorator", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "name": "instanceMethod", + "range": Array [ + 35, + 49, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 54, + ], + "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 [ + 52, + 54, + ], + "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 [ + 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, + }, + }, + "name": "B", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 56, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 57, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "B", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 23, + ], + "type": "Identifier", + "value": "onlyRead", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 24, + 29, + ], + "type": "Boolean", + "value": "false", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 35, + 49, + ], + "type": "Identifier", + "value": "instanceMethod", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/method-decorators/method-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": 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", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "name": "staticMethod", + "range": Array [ + 37, + 49, + ], + "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 [], + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 52, + 54, + ], + "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 [ + 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, + }, + }, + "name": "C", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 56, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 57, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "C", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 19, + 24, + ], + "type": "Boolean", + "value": "false", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 37, + 49, + ], + "type": "Identifier", + "value": "staticMethod", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 23, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 52, + 53, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 3, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 55, + 56, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/method-decorators/method-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": 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", + }, + "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": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 49, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 50, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "A", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 23, + ], + "type": "Identifier", + "value": "onlyRead", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 28, + 42, + ], + "type": "Identifier", + "value": "instanceMethod", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 3, + }, + "start": Object { + "column": 18, + "line": 3, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 22, + "line": 3, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/method-decorators/method-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": "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", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "D", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 49, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 50, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "D", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 15, + 18, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 3, + }, + "start": Object { + "column": 4, + "line": 3, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 3, + }, + }, + "range": Array [ + 30, + 42, + ], + "type": "Identifier", + "value": "staticMethod", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 3, + }, + "start": Object { + "column": 23, + "line": 3, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 3, + }, + "start": Object { + "column": 24, + "line": 3, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 26, + "line": 3, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 3, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 4, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-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 [ + 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", + }, + }, + ], + "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": 13, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "Service", + "range": Array [ + 6, + 13, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 115, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 6, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 116, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 13, + ], + "type": "Identifier", + "value": "Service", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 31, + ], + "type": "Identifier", + "value": "constructor", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 33, + 39, + ], + "type": "Identifier", + "value": "Inject", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 50, + ], + "type": "Identifier", + "value": "APP_CONFIG", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 36, + "line": 2, + }, + }, + "range": Array [ + 52, + 58, + ], + "type": "Identifier", + "value": "config", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 2, + }, + "start": Object { + "column": 42, + "line": 2, + }, + }, + "range": Array [ + 58, + 59, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 2, + }, + "start": Object { + "column": 44, + "line": 2, + }, + }, + "range": Array [ + 60, + 69, + ], + "type": "Identifier", + "value": "AppConfig", + }, + Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 2, + }, + "start": Object { + "column": 53, + "line": 2, + }, + }, + "range": Array [ + 69, + 70, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 56, + "line": 2, + }, + "start": Object { + "column": 55, + "line": 2, + }, + }, + "range": Array [ + 71, + 72, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 3, + }, + "start": Object { + "column": 8, + "line": 3, + }, + }, + "range": Array [ + 81, + 85, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 3, + }, + "start": Object { + "column": 12, + "line": 3, + }, + }, + "range": Array [ + 85, + 86, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 3, + }, + "start": Object { + "column": 13, + "line": 3, + }, + }, + "range": Array [ + 86, + 91, + ], + "type": "Identifier", + "value": "title", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 3, + }, + "start": Object { + "column": 19, + "line": 3, + }, + }, + "range": Array [ + 92, + 93, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 3, + }, + "start": Object { + "column": 21, + "line": 3, + }, + }, + "range": Array [ + 94, + 100, + ], + "type": "Identifier", + "value": "config", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 3, + }, + "start": Object { + "column": 27, + "line": 3, + }, + }, + "range": Array [ + 100, + 101, + ], + "type": "Punctuator", + "value": ".", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 3, + }, + "start": Object { + "column": 28, + "line": 3, + }, + }, + "range": Array [ + 101, + 106, + ], + "type": "Identifier", + "value": "title", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 3, + }, + "start": Object { + "column": 33, + "line": 3, + }, + }, + "range": Array [ + 106, + 107, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 4, + }, + }, + "range": Array [ + 112, + 113, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 5, + }, + }, + "range": Array [ + 114, + 115, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.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": "bar", + "range": Array [ + 16, + 19, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 16, + 50, + ], + "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", + }, + "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", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "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 [ + 6, + 9, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 52, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 53, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 9, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 16, + 19, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 8, + "line": 2, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 21, + 28, + ], + "type": "Identifier", + "value": "special", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 29, + 33, + ], + "type": "Boolean", + "value": "true", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 35, + 38, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 2, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 2, + }, + "start": Object { + "column": 36, + "line": 2, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 2, + }, + "start": Object { + "column": 37, + "line": 2, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src 1`] = ` +Object { + "body": Array [ + Object { + "body": 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 [ + 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": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 65, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "name": "StaticFoo", + "range": Array [ + 6, + 15, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 65, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 66, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 15, + ], + "type": "Identifier", + "value": "StaticFoo", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 29, + 32, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "@", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 34, + 41, + ], + "type": "Identifier", + "value": "special", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 42, + 46, + ], + "type": "Boolean", + "value": "true", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 48, + 51, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 2, + }, + "start": Object { + "column": 35, + "line": 2, + }, + }, + "range": Array [ + 53, + 59, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 2, + }, + "start": Object { + "column": 41, + "line": 2, + }, + }, + "range": Array [ + 59, + 60, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 2, + }, + "start": Object { + "column": 43, + "line": 2, + }, + }, + "range": Array [ + 61, + 62, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 2, + }, + "start": Object { + "column": 44, + "line": 2, + }, + }, + "range": Array [ + 62, + 63, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 64, + 65, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +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": 9, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "name": "greet", + "range": Array [ + 20, + 25, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 95, + ], + "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": 5, + "line": 4, + }, + "start": Object { + "column": 34, + "line": 2, + }, + }, + "range": Array [ + 50, + 95, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "params": Array [ + Object { + "decorators": Array [ + Object { + "expression": Object { + "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", + }, + }, + }, + ], + "range": Array [ + 25, + 95, + ], + "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 { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "greet", + "range": Array [ + 33, + 38, + ], + "type": "Identifier", + }, + "kind": "method", + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 26, + 108, + ], + "static": true, + "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", + }, + ], + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 41, + "line": 2, + }, + }, + "range": Array [ + 63, + 108, + ], + "type": "BlockStatement", + }, + "expression": false, + "generator": false, + "id": null, + "loc": Object { + "end": Object { + "column": 5, + "line": 4, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "params": Array [ + Object { + "decorators": Array [ + Object { + "expression": Object { + "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, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "name": "name", + "range": Array [ + 49, + 61, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "range": Array [ + 53, + 61, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 55, + 61, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 38, + 108, + ], + "type": "FunctionExpression", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 5, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 110, + ], + "type": "ClassBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "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", + }, + ], + "key": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "name": "data", + "range": Array [ + 35, + 39, + ], + "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": 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": 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", + }, + }, + ], + "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 { + "expression": 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": "TSClassImplements", + }, + ], + "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/class-multiple-implements.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 36, + ], + "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", + }, + "implements": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "b", + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "TSClassImplements", + }, + ], + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 36, + ], + "superClass": null, + "type": "ClassDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 5, + ], + "type": "Keyword", + "value": "class", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, + }, + "range": Array [ + 6, + 7, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 18, + ], + "type": "Keyword", + "value": "implements", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 31, + ], + "type": "Keyword", + "value": "implements", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Identifier", + "value": "c", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +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", + }, + ], + "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/index-signature-parameters.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": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "members": Array [ + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": 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", + }, + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "name": "b", + "range": Array [ + 27, + 36, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 28, + 36, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 15, + 46, + ], + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 37, + 45, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 39, + 45, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 11, + 48, + ], + "type": "TSTypeLiteral", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 49, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 39, + 45, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +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", + }, + "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-implements.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 27, + ], + "type": "TSInterfaceBody", + }, + "id": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "name": "d", + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + }, + "implements": Array [ + Object { + "expression": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "e", + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "TSInterfaceHeritage", + }, + ], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 27, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Identifier", + "value": "d", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 22, + ], + "type": "Keyword", + "value": "implements", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + "value": "e", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-index-signature-export.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "export": true, + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 26, + 37, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 37, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 18, + 47, + ], + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 38, + 46, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 49, + ], + "type": "TSInterfaceBody", + }, + "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, + 49, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 51, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-index-signature-private.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "private", + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 27, + 38, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 18, + 48, + ], + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 39, + 47, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 47, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 50, + ], + "type": "TSInterfaceBody", + }, + "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, + 50, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 52, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 25, + ], + "type": "Keyword", + "value": "private", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 47, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-index-signature-protected.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "protected", + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 29, + 40, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 40, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 18, + 50, + ], + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 49, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 43, + 49, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 52, + ], + "type": "TSInterfaceBody", + }, + "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, + 52, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 54, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 27, + ], + "type": "Keyword", + "value": "protected", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 32, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 43, + 49, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 2, + }, + "start": Object { + "column": 33, + "line": 2, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 51, + 52, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-index-signature-public.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "public", + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 26, + 37, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 37, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 18, + 47, + ], + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 38, + 46, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 49, + ], + "type": "TSInterfaceBody", + }, + "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, + 49, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 51, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "Keyword", + "value": "public", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-index-signature-static.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "name": "baz", + "range": Array [ + 26, + 37, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 37, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 18, + 47, + ], + "static": true, + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 38, + 46, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 49, + ], + "type": "TSInterfaceBody", + }, + "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, + 49, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 51, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 29, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 46, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 30, + "line": 2, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-method-export.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "export": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "g", + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 29, + 40, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 40, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 20, + 48, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 47, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 43, + 47, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 50, + ], + "type": "TSInterfaceBody", + }, + "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, + 50, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 52, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 26, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + "value": "g", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 32, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 43, + 47, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-method-private.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "private", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "name": "g", + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 30, + 41, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 33, + 41, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 35, + 41, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 20, + 49, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 42, + 48, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 44, + 48, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 51, + ], + "type": "TSInterfaceBody", + }, + "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, + 51, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 53, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 27, + ], + "type": "Keyword", + "value": "private", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + "value": "g", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 33, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 35, + 41, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 44, + 48, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-method-protected.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "protected", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "name": "g", + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 30, + 41, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 33, + 41, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 35, + 41, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 18, + 49, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 42, + 48, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 44, + 48, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 51, + ], + "type": "TSInterfaceBody", + }, + "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, + 51, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 53, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 27, + ], + "type": "Keyword", + "value": "protected", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + "value": "g", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 33, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 35, + 41, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 28, + "line": 2, + }, + }, + "range": Array [ + 44, + 48, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 50, + 51, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-method-public.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "public", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "g", + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 29, + 40, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 40, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 20, + 48, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 47, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 43, + 47, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSMethodSignature", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 50, + ], + "type": "TSInterfaceBody", + }, + "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, + 50, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 52, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 26, + ], + "type": "Keyword", + "value": "public", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + "value": "g", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 32, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 40, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 40, + 41, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 2, + }, + "start": Object { + "column": 27, + "line": 2, + }, + }, + "range": Array [ + 43, + 47, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 31, + "line": 2, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 49, + 50, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-method-static.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "g", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 27, + 38, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 18, + 46, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 39, + 45, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 45, + ], + "type": "TSVoidKeyword", + }, + }, + "static": true, + "type": "TSMethodSignature", + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 48, + ], + "type": "TSInterfaceBody", + }, + "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, + 48, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 50, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + "value": "g", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 30, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 38, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 22, + "line": 2, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 2, + }, + "start": Object { + "column": 25, + "line": 2, + }, + }, + "range": Array [ + 41, + 45, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + }, + "start": Object { + "column": 29, + "line": 2, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-multiple-extends.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [], + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 40, + ], + "type": "TSInterfaceBody", + }, + "extends": Array [ + Object { + "expression": 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 { + "expression": Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "name": "baz", + "range": Array [ + 34, + 37, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 37, + ], + "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": 40, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 40, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 41, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 21, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 25, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 33, + ], + "type": "Keyword", + "value": "extends", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 37, + ], + "type": "Identifier", + "value": "baz", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-property-export.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "export": true, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 35, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 34, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 34, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 37, + ], + "type": "TSInterfaceBody", + }, + "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, + 37, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "Keyword", + "value": "export", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 34, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-property-private.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "private", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "name": "b", + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 36, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 35, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 35, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 38, + ], + "type": "TSInterfaceBody", + }, + "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, + 38, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 40, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 25, + ], + "type": "Keyword", + "value": "private", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 35, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-property-protected.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "protected", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 38, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 37, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 40, + ], + "type": "TSInterfaceBody", + }, + "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, + 40, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 42, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 27, + ], + "type": "Keyword", + "value": "protected", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 31, + 37, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-property-public.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "accessibility": "public", + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 37, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 36, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 39, + ], + "type": "TSInterfaceBody", + }, + "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, + 39, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 41, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 20, + 26, + ], + "type": "Keyword", + "value": "public", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 20, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-property-static.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "key": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "name": "a", + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 35, + ], + "static": true, + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 34, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 34, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 37, + ], + "type": "TSInterfaceBody", + }, + "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, + 37, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 5, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "Keyword", + "value": "static", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 9, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 2, + }, + "start": Object { + "column": 10, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 28, + 34, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 18, + "line": 2, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/errorRecovery/interface-property-with-default-value.src 1`] = ` +Object { + "body": Array [ + Object { + "body": Object { + "body": Array [ + Object { + "computed": false, + "initializer": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 35, + ], + "raw": "'a'", + "type": "Literal", + "value": "a", + }, + "key": Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "name": "bar", + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 36, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 21, + 29, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 38, + ], + "type": "TSInterfaceBody", + }, + "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, + 38, + ], + "type": "TSInterfaceDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 9, + ], + "type": "Keyword", + "value": "interface", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 13, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 18, + 21, + ], + "type": "Identifier", + "value": "bar", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 2, + }, + "start": Object { + "column": 5, + "line": 2, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 7, + "line": 2, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 14, + "line": 2, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + }, + "start": Object { + "column": 16, + "line": 2, + }, + }, + "range": Array [ + 32, + 35, + ], + "type": "String", + "value": "'a'", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +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 [ + 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": "TSDeclareFunction", + }, + "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", + }, + "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, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSStringKeyword", + }, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 19, + ], + "type": "TSArrayType", + }, + }, + ], + "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 [ + 4, + 47, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 47, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "checkType": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 13, + ], + "type": "TSNumberKeyword", + }, + "extendsType": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "TSStringKeyword", + }, + "falseType": Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 47, + ], + "type": "TSStringKeyword", + }, + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 47, + ], + "trueType": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 38, + ], + "type": "TSBooleanKeyword", + }, + "type": "TSConditionalType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 47, + ], + "type": "VariableDeclarator", + }, + ], + "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-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": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + "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": Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 13, + 14, + ], + "type": "Identifier", + }, + "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": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 2, + }, + "start": Object { + "column": 19, + "line": 2, + }, + }, + "name": "U", + "range": Array [ + 38, + 39, + ], + "type": "Identifier", + }, + "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": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 3, + }, + "start": Object { + "column": 20, + "line": 3, + }, + }, + "name": "U", + "range": Array [ + 69, + 70, + ], + "type": "Identifier", + }, + "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": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 4, + }, + "start": Object { + "column": 30, + "line": 4, + }, + }, + "name": "U", + "range": Array [ + 107, + 108, + ], + "type": "Identifier", + }, + "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": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + "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": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 35, + 36, + ], + "type": "Identifier", + }, + "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": Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "name": "U", + "range": Array [ + 47, + 48, + ], + "type": "Identifier", + }, + "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": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + "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 [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 45, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 45, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "checkType": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 13, + ], + "type": "TSNumberKeyword", + }, + "extendsType": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 28, + ], + "type": "TSStringKeyword", + }, + "falseType": Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 45, + ], + "type": "TSNullKeyword", + }, + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 45, + ], + "trueType": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 38, + ], + "type": "TSBooleanKeyword", + }, + "type": "TSConditionalType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 45, + ], + "type": "VariableDeclarator", + }, + ], + "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/constructor.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 4, + 42, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 42, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 12, + 21, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 21, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 21, + ], + "type": "TSNumberKeyword", + }, + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "name": "b", + "optional": true, + "range": Array [ + 23, + 33, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 33, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 33, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 7, + 42, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 42, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 42, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSConstructorType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 42, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 43, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 44, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 10, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 21, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 33, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 37, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 42, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/constructor-generic.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 4, + 25, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 25, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 15, + 19, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 19, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "range": Array [ + 7, + 25, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 25, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 24, + 25, + ], + "type": "Identifier", + }, + }, + }, + "type": "TSConstructorType", + "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": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "range": Array [ + 12, + 13, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 11, + 14, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 25, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "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": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 10, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 23, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/constructor-in-generic.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 30, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 30, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 30, + ], + "type": "TSTypeReference", + "typeName": Object { + "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": 30, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 13, + 29, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 29, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "TSStringKeyword", + }, + }, + "type": "TSConstructorType", + }, + ], + "range": Array [ + 12, + 30, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 30, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 32, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 12, + ], + "type": "Identifier", + "value": "Array", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 16, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 22, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 30, + "line": 1, + }, + }, + "range": Array [ + 30, + 31, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/constructor-with-rest.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": "f", + "range": Array [ + 4, + 35, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 35, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 26, + ], + "type": "RestElement", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 26, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "elementType": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "TSNumberKeyword", + }, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 26, + ], + "type": "TSArrayType", + }, + }, + }, + ], + "range": Array [ + 7, + 35, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 35, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 35, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSConstructorType", + }, + }, + }, + "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": 36, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 36, + ], + "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": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 10, + ], + "type": "Keyword", + "value": "new", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 15, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 24, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 28, + "line": 1, + }, + }, + "range": Array [ + 28, + 30, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 35, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/function.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 4, + 38, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 8, + 17, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 17, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSNumberKeyword", + }, + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "name": "b", + "optional": true, + "range": Array [ + 19, + 29, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 29, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 7, + 38, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 38, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 38, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSFunctionType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 38, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 39, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 40, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Identifier", + "value": "b", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 29, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 33, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 38, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 39, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/function-generic.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": "f", + "range": Array [ + 4, + 21, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 21, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 11, + 15, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 15, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + }, + }, + }, + }, + ], + "range": Array [ + 7, + 21, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 21, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + }, + }, + }, + "type": "TSFunctionType", + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + }, + "range": Array [ + 8, + 9, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 7, + 10, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 21, + ], + "type": "VariableDeclarator", + }, + ], + "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": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 23, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 10, + "line": 1, + }, + }, + "range": Array [ + 10, + 11, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 19, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/function-in-generic.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 24, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 24, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 24, + ], + "type": "TSTypeReference", + "typeName": Object { + "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": 24, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "params": Array [], + "range": Array [ + 13, + 23, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 23, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 23, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSFunctionType", + }, + ], + "range": Array [ + 12, + 24, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 24, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 25, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 26, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 12, + ], + "type": "Identifier", + "value": "Array", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 14, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 18, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 23, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/function-with-rest.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 4, + 31, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 31, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "name": "a", + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 22, + ], + "type": "RestElement", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 22, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "elementType": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 20, + ], + "type": "TSNumberKeyword", + }, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 22, + ], + "type": "TSArrayType", + }, + }, + }, + ], + "range": Array [ + 7, + 31, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 31, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 31, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSFunctionType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 31, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 32, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 33, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 11, + ], + "type": "Punctuator", + "value": "...", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 20, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 26, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 31, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/function-with-this.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "f", + "range": Array [ + 4, + 29, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 29, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "name": "this", + "range": Array [ + 8, + 20, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 20, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 20, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 7, + 29, + ], + "returnType": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 29, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 29, + ], + "type": "TSVoidKeyword", + }, + }, + "type": "TSFunctionType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 29, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 30, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 31, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "f", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 12, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 20, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 24, + ], + "type": "Punctuator", + "value": "=>", + }, + Object { + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 29, + ], + "type": "Keyword", + "value": "void", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 30, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/index-signature.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": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 37, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "members": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": 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, + 35, + ], + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 26, + 34, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 28, + 34, + ], + "type": "TSStringKeyword", + }, + }, + }, + ], + "range": Array [ + 11, + 37, + ], + "type": "TSTypeLiteral", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 38, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 28, + 34, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 2, + }, + "start": Object { + "column": 21, + "line": 2, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/index-signature-readonly.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": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 48, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "members": Array [ + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "name": "key", + "range": Array [ + 25, + 36, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 28, + 36, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 15, + 46, + ], + "readonly": true, + "type": "TSIndexSignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 37, + 45, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 39, + 45, + ], + "type": "TSNumberKeyword", + }, + }, + }, + ], + "range": Array [ + 11, + 48, + ], + "type": "TSTypeLiteral", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 49, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 15, + 23, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 11, + "line": 2, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 25, + 28, + ], + "type": "Identifier", + "value": "key", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 2, + }, + "start": Object { + "column": 15, + "line": 2, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 2, + }, + "start": Object { + "column": 17, + "line": 2, + }, + }, + "range": Array [ + 30, + 36, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 2, + }, + "start": Object { + "column": 23, + "line": 2, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 2, + }, + "start": Object { + "column": 24, + "line": 2, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 2, + }, + "start": Object { + "column": 26, + "line": 2, + }, + }, + "range": Array [ + 39, + 45, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 2, + }, + "start": Object { + "column": 32, + "line": 2, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/index-signature-without-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": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 29, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "members": Array [ + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "parameters": 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, + 27, + ], + "type": "TSIndexSignature", + "typeAnnotation": null, + }, + ], + "range": Array [ + 11, + 29, + ], + "type": "TSTypeLiteral", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 4, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 30, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 2, + }, + "start": Object { + "column": 2, + "line": 2, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 2, + }, + "start": Object { + "column": 3, + "line": 2, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "a", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 2, + }, + "start": Object { + "column": 4, + "line": 2, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + }, + "start": Object { + "column": 6, + "line": 2, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 2, + }, + "start": Object { + "column": 12, + "line": 2, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 14, + "line": 2, + }, + "start": Object { + "column": 13, + "line": 2, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 1, + "line": 3, + }, + "start": Object { + "column": 0, + "line": 3, + }, + }, + "range": Array [ + 28, + 29, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +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 [ + 4, + 11, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 11, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "indexType": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "name": "K", + "range": Array [ + 9, + 10, + ], + "type": "Identifier", + }, + }, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "objectType": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "TSTypeReference", + "typeName": Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 7, + 8, + ], + "type": "Identifier", + }, + }, + "range": Array [ + 7, + 11, + ], + "type": "TSIndexedAccessType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 11, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 11, + ], + "type": "VariableDeclarator", + }, + ], + "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 { + "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": "T", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "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": 46, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 46, + ], + "type": "TSPropertySignature", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 46, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 46, + ], + "type": "TSTypeReference", + "typeName": Object { + "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 [ + 25, + 48, + ], + "type": "TSTypeLiteral", + }, + ], + }, + "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, + }, + }, + "name": Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "name": "T", + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + }, + "range": Array [ + 16, + 17, + ], + "type": "TSTypeParameter", + }, + ], + "range": Array [ + 15, + 18, + ], + "type": "TSTypeParameterDeclaration", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 50, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 15, + ], + "type": "Identifier", + "value": "LinkedList", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 15, + "line": 1, + }, + }, + "range": Array [ + 15, + 16, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 17, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 18, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "&", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 31, + ], + "type": "Identifier", + "value": "next", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 31, + "line": 1, + }, + }, + "range": Array [ + 31, + 32, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 43, + ], + "type": "Identifier", + "value": "LinkedList", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 49, + "line": 1, + }, + "start": Object { + "column": 48, + "line": 1, + }, + }, + "range": Array [ + 48, + 49, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +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-number-negative.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 9, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 9, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "literal": Object { + "argument": Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "raw": "1", + "type": "Literal", + "value": 1, + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "operator": "-", + "prefix": true, + "range": Array [ + 7, + 9, + ], + "type": "UnaryExpression", + }, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 9, + ], + "type": "TSLiteralType", + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 9, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 10, + ], + "type": "VariableDeclaration", + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 11, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": "-", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Numeric", + "value": "1", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +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 [ + 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": Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "name": "P", + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + }, + "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": 36, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 36, + ], + "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": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "map", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Identifier", + "value": "P", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + }, + "start": Object { + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 16, + ], + "type": "Keyword", + "value": "in", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 17, + "line": 1, + }, + }, + "range": Array [ + 17, + 23, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 24, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 25, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 32, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/mapped-readonly.src 1`] = ` +Object { + "body": Array [ + Object { + "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": Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "name": "P", + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "map", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 19, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Identifier", + "value": "P", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 23, + "line": 1, + }, + }, + "range": Array [ + 23, + 25, + ], + "type": "Keyword", + "value": "in", + }, + Object { + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 32, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 32, + "line": 1, + }, + }, + "range": Array [ + 32, + 33, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 42, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/mapped-readonly-minus.src 1`] = ` +Object { + "body": Array [ + Object { + "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": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "P", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "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", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 47, + ], + "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": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "map", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "-", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 20, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + "value": "P", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 26, + ], + "type": "Keyword", + "value": "in", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 33, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "-", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 44, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 46, + "line": 1, + }, + "start": Object { + "column": 45, + "line": 1, + }, + }, + "range": Array [ + 45, + 46, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/mapped-readonly-plus.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": "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": Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "name": "P", + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + }, + "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", + }, + ], + "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": 7, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 7, + ], + "type": "Identifier", + "value": "map", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "+", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 20, + ], + "type": "Identifier", + "value": "readonly", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 22, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Identifier", + "value": "P", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 24, + "line": 1, + }, + }, + "range": Array [ + 24, + 26, + ], + "type": "Keyword", + "value": "in", + }, + Object { + "loc": Object { + "end": Object { + "column": 33, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 33, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + }, + "start": Object { + "column": 34, + "line": 1, + }, + }, + "range": Array [ + 34, + 35, + ], + "type": "Punctuator", + "value": "+", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 36, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 38, + "line": 1, + }, + }, + "range": Array [ + 38, + 44, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": ";", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 48, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 48, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +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": 80, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 80, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 80, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 80, + ], + "type": "TSUnionType", + "types": Array [ + Object { + "elementTypes": Array [ + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 18, + ], + "type": "TSNumberKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 27, + ], + "type": "TSOptionalType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 26, + ], + "type": "TSStringKeyword", + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 37, + ], + "type": "TSOptionalType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 36, + ], + "type": "TSBooleanKeyword", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 38, + ], + "type": "TSTupleType", + }, + Object { + "loc": Object { + "end": Object { + "column": 80, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 80, + ], + "type": "TSIntersectionType", + "types": Array [ + Object { + "elementTypes": Array [ + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "members": Array [], + "range": Array [ + 42, + 44, + ], + "type": "TSTypeLiteral", + }, + Object { + "loc": Object { + "end": Object { + "column": 74, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 74, + ], + "type": "TSUnionType", + "types": Array [ + Object { + "elementTypes": Array [ + Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 54, + ], + "type": "TSOptionalType", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 53, + ], + "type": "TSNumberKeyword", + }, + }, + ], + "loc": Object { + "end": Object { + "column": 55, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 55, + ], + "type": "TSTupleType", + }, + Object { + "loc": Object { + "end": Object { + "column": 74, + "line": 1, + }, + "start": Object { + "column": 58, + "line": 1, + }, + }, + "range": Array [ + 58, + 74, + ], + "type": "TSIntersectionType", + "types": Array [ + Object { + "loc": Object { + "end": Object { + "column": 62, + "line": 1, + }, + "start": Object { + "column": 58, + "line": 1, + }, + }, + "range": Array [ + 58, + 62, + ], + "type": "TSNullKeyword", + }, + Object { + "elementType": Object { + "loc": Object { + "end": Object { + "column": 72, + "line": 1, + }, + "start": Object { + "column": 65, + "line": 1, + }, + }, + "range": Array [ + 65, + 72, + ], + "type": "TSBooleanKeyword", + }, + "loc": Object { + "end": Object { + "column": 74, + "line": 1, + }, + "start": Object { + "column": 65, + "line": 1, + }, + }, + "range": Array [ + 65, + 74, + ], + "type": "TSArrayType", + }, + ], + }, + ], + }, + ], + "loc": Object { + "end": Object { + "column": 75, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 75, + ], + "type": "TSTupleType", + }, + Object { + "loc": Object { + "end": Object { + "column": 80, + "line": 1, + }, + "start": Object { + "column": 78, + "line": 1, + }, + }, + "members": Array [], + "range": Array [ + 78, + 80, + ], + "type": "TSTypeLiteral", + }, + ], + }, + ], + }, + }, + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 2, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 81, + ], + "sourceType": "script", + "tokens": Array [ + Object { + "loc": Object { + "end": Object { + "column": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 18, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 26, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 29, + "line": 1, + }, + }, + "range": Array [ + 29, + 36, + ], + "type": "Identifier", + "value": "boolean", + }, + Object { + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + }, + "start": Object { + "column": 36, + "line": 1, + }, + }, + "range": Array [ + 36, + 37, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + }, + "start": Object { + "column": 37, + "line": 1, + }, + }, + "range": Array [ + 37, + 38, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + }, + "start": Object { + "column": 39, + "line": 1, + }, + }, + "range": Array [ + 39, + 40, + ], + "type": "Punctuator", + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 44, + "line": 1, + }, + "start": Object { + "column": 43, + "line": 1, + }, + }, + "range": Array [ + 43, + 44, + ], + "type": "Punctuator", + "value": "}", + }, + Object { + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + }, + "start": Object { + "column": 44, + "line": 1, + }, + }, + "range": Array [ + 44, + 45, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 47, + "line": 1, + }, + "start": Object { + "column": 46, + "line": 1, + }, + }, + "range": Array [ + 46, + 47, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 53, + "line": 1, + }, + "start": Object { + "column": 47, + "line": 1, + }, + }, + "range": Array [ + 47, + 53, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 54, + "line": 1, + }, + "start": Object { + "column": 53, + "line": 1, + }, + }, + "range": Array [ + 53, + 54, + ], + "type": "Punctuator", + "value": "?", + }, + Object { + "loc": Object { + "end": Object { + "column": 55, + "line": 1, + }, + "start": Object { + "column": 54, + "line": 1, + }, + }, + "range": Array [ + 54, + 55, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 57, + "line": 1, + }, + "start": Object { + "column": 56, + "line": 1, + }, + }, + "range": Array [ + 56, + 57, + ], + "type": "Punctuator", + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 62, + "line": 1, + }, + "start": Object { + "column": 58, + "line": 1, + }, + }, + "range": Array [ + 58, + 62, + ], + "type": "Keyword", + "value": "null", + }, + Object { + "loc": Object { + "end": Object { + "column": 64, + "line": 1, + }, + "start": Object { + "column": 63, + "line": 1, + }, + }, + "range": Array [ + 63, + 64, + ], + "type": "Punctuator", + "value": "&", + }, + Object { + "loc": Object { + "end": Object { + "column": 72, + "line": 1, + }, + "start": Object { + "column": 65, + "line": 1, + }, + }, + "range": Array [ + 65, + 72, + ], + "type": "Identifier", + "value": "boolean", + }, + Object { + "loc": Object { + "end": Object { + "column": 73, + "line": 1, + }, + "start": Object { + "column": 72, + "line": 1, + }, + }, + "range": Array [ + 72, + 73, + ], + "type": "Punctuator", + "value": "[", + }, + Object { + "loc": Object { + "end": Object { + "column": 74, + "line": 1, + }, + "start": Object { + "column": 73, + "line": 1, + }, + }, + "range": Array [ + 73, + 74, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 75, + "line": 1, + }, + "start": Object { + "column": 74, + "line": 1, + }, + }, + "range": Array [ + 74, + 75, + ], + "type": "Punctuator", + "value": "]", + }, + Object { + "loc": Object { + "end": Object { + "column": 77, + "line": 1, + }, + "start": Object { + "column": 76, + "line": 1, + }, + }, + "range": Array [ + 76, + 77, + ], + "type": "Punctuator", + "value": "&", + }, + Object { + "loc": Object { + "end": Object { + "column": 79, + "line": 1, + }, + "start": Object { + "column": 78, + "line": 1, + }, + }, + "range": Array [ + 78, + 79, + ], + "type": "Punctuator", + "value": "{", + }, + Object { + "loc": Object { + "end": Object { + "column": 80, + "line": 1, + }, + "start": Object { + "column": 79, + "line": 1, + }, + }, + "range": Array [ + 79, + 80, + ], + "type": "Punctuator", + "value": "}", + }, + ], + "type": "Program", +} +`; + +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": 28, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 28, + ], + "type": "TSTypeAliasDeclaration", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "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": 4, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 4, + ], + "type": "Identifier", + "value": "type", + }, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 8, + ], + "type": "Identifier", + "value": "Foo", + }, + Object { + "loc": Object { + "end": Object { + "column": 10, + "line": 1, + }, + "start": Object { + "column": 9, + "line": 1, + }, + }, + "range": Array [ + 9, + 10, + ], + "type": "Punctuator", + "value": "=", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 11, + "line": 1, + }, + }, + "range": Array [ + 11, + 12, + ], + "type": "Punctuator", + "value": "(", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 18, + ], + "type": "Identifier", + "value": "string", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 21, + "line": 1, + }, + }, + "range": Array [ + 21, + 27, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ")", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/reference.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 { + "loc": Object { + "end": Object { + "column": 8, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 8, + ], + "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", + }, + }, + }, + }, + "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": "Identifier", + "value": "T", + }, + Object { + "loc": Object { + "end": Object { + "column": 9, + "line": 1, + }, + "start": Object { + "column": 8, + "line": 1, + }, + }, + "range": Array [ + 8, + 9, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +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": 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": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 12, + ], + "type": "Identifier", + "value": "Array", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 19, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 20, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 21, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +exports[`typescript fixtures/types/reference-generic-nested.src 1`] = ` +Object { + "body": Array [ + Object { + "declarations": Array [ + Object { + "id": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "name": "x", + "range": Array [ + 4, + 27, + ], + "type": "Identifier", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 27, + ], + "type": "TSTypeAnnotation", + "typeAnnotation": Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 27, + ], + "type": "TSTypeReference", + "typeName": Object { + "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": 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", + }, + "typeParameters": Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "params": Array [ + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "TSNumberKeyword", + }, + ], + "range": Array [ + 18, + 26, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + ], + "range": Array [ + 12, + 27, + ], + "type": "TSTypeParameterInstantiation", + }, + }, + }, + }, + "init": null, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 27, + ], + "type": "VariableDeclarator", + }, + ], + "kind": "let", + "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": 3, + "line": 1, + }, + "start": Object { + "column": 0, + "line": 1, + }, + }, + "range": Array [ + 0, + 3, + ], + "type": "Keyword", + "value": "let", + }, + Object { + "loc": Object { + "end": Object { + "column": 5, + "line": 1, + }, + "start": Object { + "column": 4, + "line": 1, + }, + }, + "range": Array [ + 4, + 5, + ], + "type": "Identifier", + "value": "x", + }, + Object { + "loc": Object { + "end": Object { + "column": 6, + "line": 1, + }, + "start": Object { + "column": 5, + "line": 1, + }, + }, + "range": Array [ + 5, + 6, + ], + "type": "Punctuator", + "value": ":", + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + }, + "start": Object { + "column": 7, + "line": 1, + }, + }, + "range": Array [ + 7, + 12, + ], + "type": "Identifier", + "value": "Array", + }, + Object { + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + }, + "start": Object { + "column": 12, + "line": 1, + }, + }, + "range": Array [ + 12, + 13, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + }, + "start": Object { + "column": 13, + "line": 1, + }, + }, + "range": Array [ + 13, + 18, + ], + "type": "Identifier", + "value": "Array", + }, + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + }, + "start": Object { + "column": 18, + "line": 1, + }, + }, + "range": Array [ + 18, + 19, + ], + "type": "Punctuator", + "value": "<", + }, + Object { + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + }, + "start": Object { + "column": 19, + "line": 1, + }, + }, + "range": Array [ + 19, + 25, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + }, + "start": Object { + "column": 25, + "line": 1, + }, + }, + "range": Array [ + 25, + 26, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + }, + "start": Object { + "column": 26, + "line": 1, + }, + }, + "range": Array [ + 26, + 27, + ], + "type": "Punctuator", + "value": ">", + }, + Object { + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, + }, + }, + "range": Array [ + 27, + 28, + ], + "type": "Punctuator", + "value": ";", + }, + ], + "type": "Program", +} +`; + +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", }, - "range": Array [ - 230, - 236, - ], - "type": "Identifier", - "value": "string", - }, - Object { - "loc": Object { - "end": Object { - "column": 25, - "line": 11, - }, - "start": Object { - "column": 24, - "line": 11, + "id": Object { + "loc": Object { + "end": Object { + "column": 7, + "line": 1, + }, + "start": Object { + "column": 6, + "line": 1, + }, }, + "name": "A", + "range": Array [ + 6, + 7, + ], + "type": "Identifier", }, - "range": Array [ - 236, - 237, - ], - "type": "Punctuator", - "value": "]", - }, - Object { "loc": Object { "end": Object { - "column": 26, - "line": 11, + "column": 1, + "line": 29, }, "start": Object { - "column": 25, - "line": 11, + "column": 0, + "line": 1, }, }, "range": Array [ - 237, - 238, + 0, + 451, ], - "type": "Punctuator", - "value": ":", + "superClass": null, + "type": "ClassDeclaration", }, - Object { - "loc": Object { - "end": Object { - "column": 33, - "line": 11, - }, - "start": Object { - "column": 27, - "line": 11, - }, - }, - "range": Array [ - 239, - 245, - ], - "type": "Identifier", - "value": "string", + ], + "loc": Object { + "end": Object { + "column": 0, + "line": 30, }, - Object { - "loc": Object { - "end": Object { - "column": 34, - "line": 11, - }, - "start": Object { - "column": 33, - "line": 11, - }, - }, - "range": Array [ - 245, - 246, - ], - "type": "Punctuator", - "value": ";", + "start": Object { + "column": 0, + "line": 1, }, + }, + "range": Array [ + 0, + 452, + ], + "sourceType": "script", + "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 13, - "line": 12, + "column": 5, + "line": 1, }, "start": Object { - "column": 4, - "line": 12, + "column": 0, + "line": 1, }, }, "range": Array [ - 251, - 260, + 0, + 5, ], "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": ":", + "value": "class", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 12, + "column": 7, + "line": 1, }, "start": Object { - "column": 29, - "line": 12, + "column": 6, + "line": 1, }, }, "range": Array [ - 276, - 282, + 6, + 7, ], "type": "Identifier", - "value": "string", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 36, - "line": 12, + "column": 9, + "line": 1, }, "start": Object { - "column": 35, - "line": 12, + "column": 8, + "line": 1, }, }, "range": Array [ - 282, - 283, + 8, + 9, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 13, + "column": 8, + "line": 2, }, "start": Object { - "column": 4, - "line": 13, + "column": 2, + "line": 2, }, }, "range": Array [ - 288, - 294, + 12, + 18, ], "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": ":", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 13, + "column": 10, + "line": 2, }, "start": Object { - "column": 17, - "line": 13, + "column": 9, + "line": 2, }, }, "range": Array [ - 301, - 307, + 19, + 20, ], "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": "]", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 13, + "column": 11, + "line": 2, }, "start": Object { - "column": 24, - "line": 13, + "column": 10, + "line": 2, }, }, "range": Array [ - 308, - 309, + 20, + 21, ], "type": "Punctuator", "value": ":", @@ -63107,35 +109876,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 32, - "line": 13, + "column": 18, + "line": 2, }, "start": Object { - "column": 26, - "line": 13, + "column": 12, + "line": 2, }, }, "range": Array [ - 310, - 316, + 22, + 28, ], "type": "Identifier", - "value": "string", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 13, + "column": 19, + "line": 2, }, "start": Object { - "column": 32, - "line": 13, + "column": 18, + "line": 2, }, }, "range": Array [ - 316, - 317, + 28, + 29, ], "type": "Punctuator", "value": ";", @@ -63143,125 +109912,89 @@ Object { Object { "loc": Object { "end": Object { - "column": 10, - "line": 14, + "column": 8, + "line": 4, }, "start": Object { - "column": 4, - "line": 14, + "column": 2, + "line": 4, }, }, "range": Array [ - 322, - 328, + 33, + 39, ], "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": "[", + "value": "public", }, 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, + "line": 4, }, "start": Object { - "column": 15, - "line": 14, + "column": 9, + "line": 4, }, }, "range": Array [ - 333, - 334, + 40, + 46, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "method", }, Object { "loc": Object { "end": Object { - "column": 23, - "line": 14, + "column": 16, + "line": 4, }, "start": Object { - "column": 17, - "line": 14, + "column": 15, + "line": 4, }, }, "range": Array [ - 335, - 341, + 46, + 47, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 14, + "column": 20, + "line": 4, }, "start": Object { - "column": 23, - "line": 14, + "column": 16, + "line": 4, }, }, "range": Array [ - 341, - 342, + 47, + 51, ], - "type": "Punctuator", - "value": "]", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 14, + "column": 21, + "line": 4, }, "start": Object { - "column": 24, - "line": 14, + "column": 20, + "line": 4, }, }, "range": Array [ - 342, - 343, + 51, + 52, ], "type": "Punctuator", "value": ":", @@ -63269,215 +110002,215 @@ Object { Object { "loc": Object { "end": Object { - "column": 32, - "line": 14, + "column": 26, + "line": 4, }, "start": Object { - "column": 26, - "line": 14, + "column": 22, + "line": 4, }, }, "range": Array [ - 344, - 350, + 53, + 57, ], - "type": "Identifier", - "value": "string", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 14, + "column": 27, + "line": 4, }, "start": Object { - "column": 32, - "line": 14, + "column": 26, + "line": 4, }, }, "range": Array [ - 350, - 351, + 57, + 58, ], "type": "Punctuator", - "value": ";", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 15, + "column": 28, + "line": 4, }, "start": Object { - "column": 4, - "line": 15, + "column": 27, + "line": 4, }, }, "range": Array [ - 356, - 364, + 58, + 59, ], - "type": "Identifier", - "value": "readonly", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 15, + "column": 35, + "line": 4, }, "start": Object { - "column": 13, - "line": 15, + "column": 29, + "line": 4, }, }, "range": Array [ - 365, - 366, + 60, + 66, ], - "type": "Punctuator", - "value": "[", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 15, + "column": 37, + "line": 4, }, "start": Object { - "column": 14, - "line": 15, + "column": 36, + "line": 4, }, }, "range": Array [ - 366, - 369, + 67, + 68, ], - "type": "Identifier", - "value": "baz", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 15, + "column": 10, + "line": 5, }, "start": Object { - "column": 17, - "line": 15, + "column": 4, + "line": 5, }, }, "range": Array [ - 369, - 370, + 73, + 79, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 15, + "column": 15, + "line": 5, }, "start": Object { - "column": 19, - "line": 15, + "column": 11, + "line": 5, }, }, "range": Array [ - 371, - 377, + 80, + 84, ], - "type": "Identifier", - "value": "string", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 15, + "column": 16, + "line": 5, }, "start": Object { - "column": 25, - "line": 15, + "column": 15, + "line": 5, }, }, "range": Array [ - 377, - 378, + 84, + 85, ], "type": "Punctuator", - "value": "]", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 15, + "column": 17, + "line": 5, }, "start": Object { - "column": 26, - "line": 15, + "column": 16, + "line": 5, }, }, "range": Array [ - 378, - 379, + 85, + 86, ], - "type": "Punctuator", - "value": ":", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 15, + "column": 18, + "line": 5, }, "start": Object { - "column": 28, - "line": 15, + "column": 17, + "line": 5, }, }, "range": Array [ - 380, - 386, + 86, + 87, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 15, + "column": 3, + "line": 6, }, "start": Object { - "column": 34, - "line": 15, + "column": 2, + "line": 6, }, }, "range": Array [ - 386, - 387, + 90, + 91, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 17, + "column": 8, + "line": 8, }, "start": Object { - "column": 4, - "line": 17, + "column": 2, + "line": 8, }, }, "range": Array [ - 393, - 399, + 95, + 101, ], "type": "Keyword", "value": "public", @@ -63485,35 +110218,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 12, - "line": 17, + "column": 16, + "line": 8, }, "start": Object { - "column": 11, - "line": 17, + "column": 9, + "line": 8, }, }, "range": Array [ - 400, - 401, + 102, + 109, ], "type": "Identifier", - "value": "g", + "value": "method2", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 17, + "column": 17, + "line": 8, }, "start": Object { - "column": 12, - "line": 17, + "column": 16, + "line": 8, }, }, "range": Array [ - 401, - 402, + 109, + 110, ], "type": "Punctuator", "value": "(", @@ -63521,35 +110254,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, - "line": 17, + "column": 21, + "line": 8, }, "start": Object { - "column": 13, - "line": 17, + "column": 17, + "line": 8, }, }, "range": Array [ - 402, - 405, + 110, + 114, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 17, + "column": 22, + "line": 8, }, "start": Object { - "column": 16, - "line": 17, + "column": 21, + "line": 8, }, }, "range": Array [ - 405, - 406, + 114, + 115, ], "type": "Punctuator", "value": ":", @@ -63558,34 +110291,34 @@ Object { "loc": Object { "end": Object { "column": 24, - "line": 17, + "line": 8, }, "start": Object { - "column": 18, - "line": 17, + "column": 23, + "line": 8, }, }, "range": Array [ - 407, - 413, + 116, + 117, ], "type": "Identifier", - "value": "string", + "value": "A", }, Object { "loc": Object { "end": Object { "column": 25, - "line": 17, + "line": 8, }, "start": Object { "column": 24, - "line": 17, + "line": 8, }, }, "range": Array [ - 413, - 414, + 117, + 118, ], "type": "Punctuator", "value": ")", @@ -63594,16 +110327,16 @@ Object { "loc": Object { "end": Object { "column": 26, - "line": 17, + "line": 8, }, "start": Object { "column": 25, - "line": 17, + "line": 8, }, }, "range": Array [ - 414, - 415, + 118, + 119, ], "type": "Punctuator", "value": ":", @@ -63612,628 +110345,664 @@ Object { "loc": Object { "end": Object { "column": 31, - "line": 17, + "line": 8, }, "start": Object { "column": 27, - "line": 17, + "line": 8, }, }, "range": Array [ - 416, - 420, + 120, + 124, ], "type": "Keyword", - "value": "void", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 17, + "column": 33, + "line": 8, }, "start": Object { - "column": 31, - "line": 17, + "column": 32, + "line": 8, }, }, "range": Array [ - 420, - 421, + 125, + 126, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 11, - "line": 18, + "column": 10, + "line": 9, }, "start": Object { "column": 4, - "line": 18, + "line": 9, }, }, "range": Array [ - 426, - 433, + 131, + 137, ], "type": "Keyword", - "value": "private", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 18, + "column": 15, + "line": 9, }, "start": Object { - "column": 12, - "line": 18, + "column": 11, + "line": 9, }, }, "range": Array [ - 434, - 435, + 138, + 142, ], - "type": "Identifier", - "value": "h", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 18, + "column": 16, + "line": 9, }, "start": Object { - "column": 13, - "line": 18, + "column": 15, + "line": 9, }, }, "range": Array [ - 435, - 436, + 142, + 143, ], "type": "Punctuator", - "value": "(", + "value": ".", }, Object { "loc": Object { "end": Object { "column": 17, - "line": 18, + "line": 9, }, "start": Object { - "column": 14, - "line": 18, + "column": 16, + "line": 9, }, }, "range": Array [ - 436, - 439, + 143, + 144, ], "type": "Identifier", - "value": "bar", + "value": "a", }, Object { "loc": Object { "end": Object { "column": 18, - "line": 18, + "line": 9, }, "start": Object { "column": 17, - "line": 18, + "line": 9, }, }, "range": Array [ - 439, - 440, + 144, + 145, ], "type": "Punctuator", - "value": ":", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 18, + "column": 3, + "line": 10, }, "start": Object { - "column": 19, - "line": 18, + "column": 2, + "line": 10, }, }, "range": Array [ - 441, - 447, + 148, + 149, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 18, + "column": 8, + "line": 12, }, "start": Object { - "column": 25, - "line": 18, + "column": 2, + "line": 12, }, }, "range": Array [ - 447, - 448, + 153, + 159, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 18, + "column": 16, + "line": 12, }, "start": Object { - "column": 26, - "line": 18, + "column": 9, + "line": 12, }, }, "range": Array [ - 448, - 449, + 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": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 18, + "column": 21, + "line": 12, }, "start": Object { - "column": 28, - "line": 18, + "column": 17, + "line": 12, }, }, "range": Array [ - 450, - 454, + 168, + 172, ], "type": "Keyword", - "value": "void", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 18, + "column": 22, + "line": 12, }, "start": Object { - "column": 32, - "line": 18, + "column": 21, + "line": 12, }, }, "range": Array [ - 454, - 455, + 172, + 173, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 19, + "column": 27, + "line": 12, }, "start": Object { - "column": 4, - "line": 19, + "column": 23, + "line": 12, }, }, "range": Array [ - 460, - 469, + 174, + 178, ], "type": "Keyword", - "value": "protected", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 19, + "column": 28, + "line": 12, }, "start": Object { - "column": 14, - "line": 19, + "column": 27, + "line": 12, }, }, "range": Array [ - 470, - 471, + 178, + 179, ], - "type": "Identifier", - "value": "i", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 19, + "column": 29, + "line": 12, }, "start": Object { - "column": 15, - "line": 19, + "column": 28, + "line": 12, }, }, "range": Array [ - 471, - 472, + 179, + 180, ], "type": "Punctuator", - "value": "(", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 19, + "column": 36, + "line": 12, }, "start": Object { - "column": 16, - "line": 19, + "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 [ - 472, - 475, + 188, + 189, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 19, + "column": 7, + "line": 13, }, "start": Object { - "column": 19, - "line": 19, + "column": 4, + "line": 13, }, }, "range": Array [ - 475, - 476, + 194, + 197, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 19, + "column": 10, + "line": 13, }, "start": Object { - "column": 21, - "line": 19, + "column": 8, + "line": 13, }, }, "range": Array [ - 477, - 483, + 198, + 200, ], "type": "Identifier", - "value": "string", + "value": "fn", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 19, + "column": 12, + "line": 13, }, "start": Object { - "column": 27, - "line": 19, + "column": 11, + "line": 13, }, }, "range": Array [ - 483, - 484, + 201, + 202, ], "type": "Punctuator", - "value": ")", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 29, - "line": 19, + "column": 14, + "line": 13, }, "start": Object { - "column": 28, - "line": 19, + "column": 13, + "line": 13, }, }, "range": Array [ - 484, - 485, + 203, + 204, ], "type": "Punctuator", - "value": ":", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 19, + "column": 15, + "line": 13, }, "start": Object { - "column": 30, - "line": 19, + "column": 14, + "line": 13, }, }, "range": Array [ - 486, - 490, + 204, + 205, ], - "type": "Keyword", - "value": "void", + "type": "Punctuator", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 35, - "line": 19, + "column": 18, + "line": 13, }, "start": Object { - "column": 34, - "line": 19, + "column": 16, + "line": 13, }, }, "range": Array [ - 490, - 491, + 206, + 208, ], "type": "Punctuator", - "value": ";", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 20, + "column": 23, + "line": 13, }, "start": Object { - "column": 4, - "line": 20, + "column": 19, + "line": 13, }, }, "range": Array [ - 496, - 502, + 209, + 213, ], "type": "Keyword", - "value": "static", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 20, + "column": 24, + "line": 13, }, "start": Object { - "column": 11, - "line": 20, + "column": 23, + "line": 13, }, }, "range": Array [ - 503, - 504, + 213, + 214, ], - "type": "Identifier", - "value": "j", + "type": "Punctuator", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 20, + "column": 25, + "line": 13, }, "start": Object { - "column": 12, - "line": 20, + "column": 24, + "line": 13, }, }, "range": Array [ - 504, - 505, + 214, + 215, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 20, + "column": 26, + "line": 13, }, "start": Object { - "column": 13, - "line": 20, + "column": 25, + "line": 13, }, }, "range": Array [ - 505, - 508, + 215, + 216, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 20, + "column": 10, + "line": 14, }, "start": Object { - "column": 16, - "line": 20, + "column": 4, + "line": 14, }, }, "range": Array [ - 508, - 509, + 221, + 227, ], - "type": "Punctuator", - "value": ":", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 20, + "column": 13, + "line": 14, }, "start": Object { - "column": 18, - "line": 20, + "column": 11, + "line": 14, }, }, "range": Array [ - 510, - 516, + 228, + 230, ], "type": "Identifier", - "value": "string", + "value": "fn", }, Object { "loc": Object { "end": Object { - "column": 25, - "line": 20, + "column": 14, + "line": 14, }, "start": Object { - "column": 24, - "line": 20, + "column": 13, + "line": 14, }, }, "range": Array [ - 516, - 517, + 230, + 231, ], "type": "Punctuator", - "value": ")", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 20, + "column": 15, + "line": 14, }, "start": Object { - "column": 25, - "line": 20, + "column": 14, + "line": 14, }, }, "range": Array [ - 517, - 518, + 231, + 232, ], "type": "Punctuator", - "value": ":", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 31, - "line": 20, + "column": 16, + "line": 14, }, "start": Object { - "column": 27, - "line": 20, + "column": 15, + "line": 14, }, }, "range": Array [ - 519, - 523, + 232, + 233, ], - "type": "Keyword", - "value": "void", + "type": "Punctuator", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 20, + "column": 3, + "line": 15, }, "start": Object { - "column": 31, - "line": 20, + "column": 2, + "line": 15, }, }, "range": Array [ - 523, - 524, + 236, + 237, ], "type": "Punctuator", - "value": ";", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 10, - "line": 21, + "column": 8, + "line": 17, }, "start": Object { - "column": 4, - "line": 21, + "column": 2, + "line": 17, }, }, "range": Array [ - 529, - 535, + 241, + 247, ], "type": "Keyword", - "value": "export", + "value": "public", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 21, + "column": 16, + "line": 17, }, "start": Object { - "column": 11, - "line": 21, + "column": 9, + "line": 17, }, }, "range": Array [ - 536, - 537, + 248, + 255, ], "type": "Identifier", - "value": "k", + "value": "method4", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 21, + "column": 17, + "line": 17, }, "start": Object { - "column": 12, - "line": 21, + "column": 16, + "line": 17, }, }, "range": Array [ - 537, - 538, + 255, + 256, ], "type": "Punctuator", "value": "(", @@ -64241,35 +111010,35 @@ Object { Object { "loc": Object { "end": Object { - "column": 16, - "line": 21, + "column": 21, + "line": 17, }, "start": Object { - "column": 13, - "line": 21, + "column": 17, + "line": 17, }, }, "range": Array [ - 538, - 541, + 256, + 260, ], - "type": "Identifier", - "value": "bar", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 21, + "column": 22, + "line": 17, }, "start": Object { - "column": 16, - "line": 21, + "column": 21, + "line": 17, }, }, "range": Array [ - 541, - 542, + 260, + 261, ], "type": "Punctuator", "value": ":", @@ -64278,34 +111047,34 @@ Object { "loc": Object { "end": Object { "column": 24, - "line": 21, + "line": 17, }, "start": Object { - "column": 18, - "line": 21, + "column": 23, + "line": 17, }, }, "range": Array [ - 543, - 549, + 262, + 263, ], "type": "Identifier", - "value": "string", + "value": "A", }, Object { "loc": Object { "end": Object { "column": 25, - "line": 21, + "line": 17, }, "start": Object { "column": 24, - "line": 21, + "line": 17, }, }, "range": Array [ - 549, - 550, + 263, + 264, ], "type": "Punctuator", "value": ")", @@ -64314,16 +111083,16 @@ Object { "loc": Object { "end": Object { "column": 26, - "line": 21, + "line": 17, }, "start": Object { "column": 25, - "line": 21, + "line": 17, }, }, "range": Array [ - 550, - 551, + 264, + 265, ], "type": "Punctuator", "value": ":", @@ -64331,215 +111100,215 @@ Object { Object { "loc": Object { "end": Object { - "column": 31, - "line": 21, + "column": 33, + "line": 17, }, "start": Object { "column": 27, - "line": 21, + "line": 17, }, }, "range": Array [ - 552, - 556, + 266, + 272, ], - "type": "Keyword", - "value": "void", + "type": "Identifier", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 32, - "line": 21, + "column": 35, + "line": 17, }, "start": Object { - "column": 31, - "line": 21, + "column": 34, + "line": 17, }, }, "range": Array [ - 556, - 557, + 273, + 274, ], "type": "Punctuator", - "value": ";", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 22, + "column": 7, + "line": 18, }, "start": Object { "column": 4, - "line": 22, + "line": 18, }, }, "range": Array [ - 562, - 570, + 279, + 282, ], - "type": "Identifier", - "value": "readonly", + "type": "Keyword", + "value": "var", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 22, + "column": 10, + "line": 18, }, "start": Object { - "column": 13, - "line": 22, + "column": 8, + "line": 18, }, }, "range": Array [ - 571, - 572, + 283, + 285, ], "type": "Identifier", - "value": "l", + "value": "fn", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 22, + "column": 12, + "line": 18, }, "start": Object { - "column": 14, - "line": 22, + "column": 11, + "line": 18, }, }, "range": Array [ - 572, - 573, + 286, + 287, ], "type": "Punctuator", - "value": "(", + "value": "=", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 22, + "column": 14, + "line": 18, }, "start": Object { - "column": 15, - "line": 22, + "column": 13, + "line": 18, }, }, "range": Array [ - 573, - 576, + 288, + 289, ], - "type": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 22, + "column": 15, + "line": 18, }, "start": Object { - "column": 18, - "line": 22, + "column": 14, + "line": 18, }, }, "range": Array [ - 576, - 577, + 289, + 290, ], "type": "Punctuator", - "value": ":", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 26, - "line": 22, + "column": 18, + "line": 18, }, "start": Object { - "column": 20, - "line": 22, + "column": 16, + "line": 18, }, }, "range": Array [ - 578, - 584, + 291, + 293, ], - "type": "Identifier", - "value": "string", + "type": "Punctuator", + "value": "=>", }, Object { "loc": Object { "end": Object { - "column": 27, - "line": 22, + "column": 23, + "line": 18, }, "start": Object { - "column": 26, - "line": 22, + "column": 19, + "line": 18, }, }, "range": Array [ - 584, - 585, + 294, + 298, ], - "type": "Punctuator", - "value": ")", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 28, - "line": 22, + "column": 24, + "line": 18, }, "start": Object { - "column": 27, - "line": 22, + "column": 23, + "line": 18, }, }, "range": Array [ - 585, - 586, + 298, + 299, ], "type": "Punctuator", - "value": ":", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 22, + "column": 25, + "line": 18, }, "start": Object { - "column": 29, - "line": 22, + "column": 24, + "line": 18, }, }, "range": Array [ - 587, - 591, + 299, + 300, ], - "type": "Keyword", - "value": "void", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 22, + "column": 26, + "line": 18, }, "start": Object { - "column": 33, - "line": 22, + "column": 25, + "line": 18, }, }, "range": Array [ - 591, - 592, + 300, + 301, ], "type": "Punctuator", "value": ";", @@ -64547,346 +111316,233 @@ Object { Object { "loc": Object { "end": Object { - "column": 1, - "line": 23, + "column": 10, + "line": 19, }, "start": Object { - "column": 0, - "line": 23, + "column": 4, + "line": 19, }, }, "range": Array [ - 593, - 594, + 306, + 312, ], - "type": "Punctuator", - "value": "}", + "type": "Keyword", + "value": "return", }, - ], - "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, - }, + "loc": Object { + "end": Object { + "column": 13, + "line": 19, }, - "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", + "start": Object { + "column": 11, + "line": 19, }, }, + "range": Array [ + 313, + 315, + ], + "type": "Identifier", + "value": "fn", + }, + Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 14, + "line": 19, }, "start": Object { - "column": 0, - "line": 1, + "column": 13, + "line": 19, }, }, "range": Array [ - 0, - 9, + 315, + 316, ], - "type": "ExpressionStatement", + "type": "Punctuator", + "value": "(", }, 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, - }, + "loc": Object { + "end": Object { + "column": 15, + "line": 19, }, - "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", + "start": Object { + "column": 14, + "line": 19, }, }, + "range": Array [ + 316, + 317, + ], + "type": "Punctuator", + "value": ")", + }, + Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 16, + "line": 19, }, "start": Object { - "column": 0, - "line": 2, + "column": 15, + "line": 19, }, }, "range": Array [ - 10, - 24, + 317, + 318, ], - "type": "ExpressionStatement", + "type": "Punctuator", + "value": ";", }, - ], - "loc": Object { - "end": Object { - "column": 14, - "line": 2, + Object { + "loc": Object { + "end": Object { + "column": 3, + "line": 20, + }, + "start": Object { + "column": 2, + "line": 20, + }, + }, + "range": Array [ + 321, + 322, + ], + "type": "Punctuator", + "value": "}", }, - "start": Object { - "column": 0, - "line": 1, + Object { + "loc": Object { + "end": Object { + "column": 8, + "line": 22, + }, + "start": Object { + "column": 2, + "line": 22, + }, + }, + "range": Array [ + 326, + 332, + ], + "type": "Keyword", + "value": "static", }, - }, - "range": Array [ - 0, - 24, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 3, - "line": 1, + "column": 21, + "line": 22, }, "start": Object { - "column": 0, - "line": 1, + "column": 9, + "line": 22, }, }, "range": Array [ - 0, - 3, + 333, + 345, ], "type": "Identifier", - "value": "foo", + "value": "staticMethod", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 1, + "column": 22, + "line": 22, }, "start": Object { - "column": 3, - "line": 1, + "column": 21, + "line": 22, }, }, "range": Array [ - 3, - 4, + 345, + 346, ], "type": "Punctuator", - "value": "<", + "value": "(", }, Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 26, + "line": 22, }, "start": Object { - "column": 4, - "line": 1, + "column": 22, + "line": 22, }, }, "range": Array [ - 4, - 5, + 346, + 350, ], - "type": "Identifier", - "value": "A", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 6, - "line": 1, + "column": 27, + "line": 22, }, "start": Object { - "column": 5, - "line": 1, + "column": 26, + "line": 22, }, }, "range": Array [ - 5, - 6, + 350, + 351, ], "type": "Punctuator", - "value": ">", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 29, + "line": 22, }, "start": Object { - "column": 6, - "line": 1, + "column": 28, + "line": 22, }, }, "range": Array [ - 6, - 7, + 352, + 353, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 8, - "line": 1, + "column": 30, + "line": 22, }, "start": Object { - "column": 7, - "line": 1, + "column": 29, + "line": 22, }, }, "range": Array [ - 7, - 8, + 353, + 354, ], "type": "Punctuator", "value": ")", @@ -64894,658 +111550,591 @@ Object { Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 31, + "line": 22, }, "start": Object { - "column": 8, - "line": 1, + "column": 30, + "line": 22, }, }, "range": Array [ - 8, - 9, + 354, + 355, ], "type": "Punctuator", - "value": ";", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 3, - "line": 2, + "column": 38, + "line": 22, }, "start": Object { - "column": 0, - "line": 2, + "column": 32, + "line": 22, }, }, "range": Array [ - 10, - 13, + 356, + 362, ], "type": "Identifier", - "value": "foo", + "value": "number", }, Object { "loc": Object { "end": Object { - "column": 4, - "line": 2, + "column": 40, + "line": 22, }, "start": Object { - "column": 3, - "line": 2, + "column": 39, + "line": 22, }, }, "range": Array [ - 13, - 14, + 363, + 364, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { "column": 10, - "line": 2, + "line": 23, }, "start": Object { "column": 4, - "line": 2, + "line": 23, }, }, "range": Array [ - 14, - 20, + 369, + 375, ], - "type": "Identifier", - "value": "number", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { + "column": 15, + "line": 23, + }, + "start": Object { "column": 11, - "line": 2, + "line": 23, + }, + }, + "range": Array [ + 376, + 380, + ], + "type": "Keyword", + "value": "this", + }, + Object { + "loc": Object { + "end": Object { + "column": 16, + "line": 23, }, "start": Object { - "column": 10, - "line": 2, + "column": 15, + "line": 23, }, }, "range": Array [ - 20, - 21, + 380, + 381, ], "type": "Punctuator", - "value": ">", + "value": ".", }, Object { "loc": Object { "end": Object { - "column": 12, - "line": 2, + "column": 17, + "line": 23, }, "start": Object { - "column": 11, - "line": 2, + "column": 16, + "line": 23, }, }, "range": Array [ - 21, - 22, + 381, + 382, ], - "type": "Punctuator", - "value": "(", + "type": "Identifier", + "value": "a", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 2, + "column": 18, + "line": 23, }, "start": Object { - "column": 12, - "line": 2, + "column": 17, + "line": 23, }, }, "range": Array [ - 22, - 23, + 382, + 383, ], "type": "Punctuator", - "value": ")", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 14, - "line": 2, + "column": 3, + "line": 24, }, "start": Object { - "column": 13, - "line": 2, + "column": 2, + "line": 24, }, }, "range": Array [ - 23, - 24, + 386, + 387, ], "type": "Punctuator", - "value": ";", + "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", + "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, ], - "kind": "const", + "type": "Keyword", + "value": "typeof", + }, + Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 16, + "line": 26, }, "start": Object { - "column": 0, - "line": 1, + "column": 15, + "line": 26, }, }, "range": Array [ - 0, - 21, + 404, + 405, ], - "type": "VariableDeclaration", - }, - ], - "loc": Object { - "end": Object { - "column": 21, - "line": 1, - }, - "start": Object { - "column": 0, - "line": 1, + "type": "Punctuator", + "value": "(", }, - }, - "range": Array [ - 0, - 21, - ], - "sourceType": "script", - "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 5, - "line": 1, + "column": 20, + "line": 26, }, "start": Object { - "column": 0, - "line": 1, + "column": 16, + "line": 26, }, }, "range": Array [ - 0, - 5, + 405, + 409, ], "type": "Keyword", - "value": "const", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 7, - "line": 1, + "column": 21, + "line": 26, }, "start": Object { - "column": 6, - "line": 1, + "column": 20, + "line": 26, }, }, "range": Array [ - 6, - 7, + 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", + "value": "A", }, Object { "loc": Object { "end": Object { - "column": 9, - "line": 1, + "column": 24, + "line": 26, }, "start": Object { - "column": 8, - "line": 1, + "column": 23, + "line": 26, }, }, "range": Array [ - 8, - 9, + 412, + 413, ], "type": "Punctuator", - "value": "=", + "value": ")", }, Object { "loc": Object { "end": Object { - "column": 13, - "line": 1, + "column": 25, + "line": 26, }, "start": Object { - "column": 10, - "line": 1, + "column": 24, + "line": 26, }, }, "range": Array [ - 10, - 13, + 413, + 414, ], - "type": "Keyword", - "value": "new", + "type": "Punctuator", + "value": ":", }, Object { "loc": Object { "end": Object { - "column": 15, - "line": 1, + "column": 30, + "line": 26, }, "start": Object { - "column": 14, - "line": 1, + "column": 26, + "line": 26, }, }, "range": Array [ - 14, - 15, + 415, + 419, ], - "type": "Identifier", - "value": "A", + "type": "Keyword", + "value": "this", }, Object { "loc": Object { "end": Object { - "column": 16, - "line": 1, + "column": 32, + "line": 26, }, "start": Object { - "column": 15, - "line": 1, + "column": 31, + "line": 26, }, }, "range": Array [ - 15, - 16, + 420, + 421, ], "type": "Punctuator", - "value": "<", + "value": "{", }, Object { "loc": Object { "end": Object { - "column": 17, - "line": 1, + "column": 10, + "line": 27, }, "start": Object { - "column": 16, - "line": 1, + "column": 4, + "line": 27, }, }, "range": Array [ - 16, - 17, + 426, + 432, ], - "type": "Identifier", - "value": "B", + "type": "Keyword", + "value": "return", }, Object { "loc": Object { "end": Object { - "column": 18, - "line": 1, + "column": 17, + "line": 27, }, "start": Object { - "column": 17, - "line": 1, + "column": 11, + "line": 27, }, }, "range": Array [ - 17, - 18, + 433, + 439, ], - "type": "Punctuator", - "value": ">", + "type": "Keyword", + "value": "typeof", }, Object { "loc": Object { "end": Object { - "column": 19, - "line": 1, + "column": 22, + "line": 27, }, "start": Object { "column": 18, - "line": 1, + "line": 27, }, }, "range": Array [ - 18, - 19, + 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": "(", + "value": ";", }, Object { "loc": Object { "end": Object { - "column": 20, - "line": 1, + "column": 3, + "line": 28, }, "start": Object { - "column": 19, - "line": 1, + "column": 2, + "line": 28, }, }, "range": Array [ - 19, - 20, + 448, + 449, ], "type": "Punctuator", - "value": ")", + "value": "}", }, Object { "loc": Object { "end": Object { - "column": 21, - "line": 1, + "column": 1, + "line": 29, }, "start": Object { - "column": 20, - "line": 1, + "column": 0, + "line": 29, }, }, "range": Array [ - 20, - 21, + 450, + 451, ], "type": "Punctuator", - "value": ";", + "value": "}", }, ], "type": "Program", } `; -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 { @@ -65555,15 +112144,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, @@ -65572,7 +112161,7 @@ Object { }, "range": Array [ 0, - 14, + 33, ], "sourceType": "script", "tokens": Array [ @@ -65591,95 +112180,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": "Identifier", - "value": "bar", + "type": "Punctuator", + "value": "[", }, Object { "loc": Object { "end": Object { + "column": 14, + "line": 1, + }, + "start": Object { "column": 8, "line": 1, }, + }, + "range": Array [ + 8, + 14, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + }, "start": Object { - "column": 7, + "column": 14, + "line": 1, + }, + }, + "range": Array [ + 14, + 15, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + }, + "start": Object { + "column": 16, + "line": 1, + }, + }, + "range": Array [ + 16, + 22, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + }, + "start": Object { + "column": 22, + "line": 1, + }, + }, + "range": Array [ + 22, + 23, + ], + "type": "Punctuator", + "value": ",", + }, + Object { + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + }, + "start": Object { + "column": 24, "line": 1, }, }, "range": Array [ - 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": ";", @@ -65689,126 +112368,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, @@ -65817,15 +112458,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, @@ -65834,14 +112475,14 @@ Object { }, "range": Array [ 0, - 57, + 11, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 3, "line": 1, }, "start": Object { @@ -65851,424 +112492,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, - "body": null, - "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, @@ -66277,15 +112821,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, @@ -66294,14 +112838,14 @@ Object { }, "range": Array [ 0, - 84, + 45, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 3, "line": 1, }, "start": Object { @@ -66311,46 +112855,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 { @@ -66359,121 +112957,414 @@ 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": 34, + "line": 1, + }, + "start": Object { + "column": 33, + "line": 1, + }, + }, + "range": Array [ + 33, + 34, + ], + "type": "Punctuator", + "value": "|", + }, + Object { + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + }, + "start": Object { + "column": 35, + "line": 1, + }, + }, + "range": Array [ + 35, + 41, + ], + "type": "Identifier", + "value": "number", + }, + Object { + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + }, + "start": Object { + "column": 41, + "line": 1, + }, + }, + "range": Array [ + 41, + 42, + ], + "type": "Punctuator", + "value": ")", + }, + Object { + "loc": Object { + "end": Object { + "column": 43, + "line": 1, + }, + "start": Object { + "column": 42, + "line": 1, + }, + }, + "range": Array [ + 42, + 43, + ], + "type": "Punctuator", + "value": "?", }, Object { "loc": Object { "end": Object { - "column": 24, - "line": 2, + "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", + }, + ], + "kind": "let", + "loc": Object { + "end": Object { + "column": 28, + "line": 1, }, "start": Object { - "column": 18, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 41, - 47, + 0, + 28, ], - "type": "Identifier", - "value": "select", + "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": 25, - "line": 2, + "column": 3, + "line": 1, }, "start": Object { - "column": 24, - "line": 2, + "column": 0, + "line": 1, }, }, "range": Array [ - 47, - 48, + 0, + 3, ], - "type": "Punctuator", - "value": "(", + "type": "Keyword", + "value": "let", }, Object { "loc": Object { "end": Object { - "column": 33, - "line": 2, + "column": 5, + "line": 1, }, "start": Object { - "column": 25, - "line": 2, + "column": 4, + "line": 1, }, }, "range": Array [ - 48, - 56, + 4, + 5, ], "type": "Identifier", - "value": "selector", + "value": "x", }, Object { "loc": Object { "end": Object { - "column": 34, - "line": 2, + "column": 6, + "line": 1, }, "start": Object { - "column": 33, - "line": 2, + "column": 5, + "line": 1, }, }, "range": Array [ - 56, - 57, + 5, + 6, ], "type": "Punctuator", "value": ":", @@ -66481,342 +113372,265 @@ Object { 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, + "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, @@ -66825,14 +113639,14 @@ Object { }, "range": Array [ 0, - 92, + 29, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 4, "line": 1, }, "start": Object { @@ -66842,1158 +113656,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, + "start": Object { + "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, + }, + }, + "range": Array [ + 11, + 17, + ], + "type": "TSNumberKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + }, + "start": Object { + "column": 20, + "line": 1, + }, + }, + "range": Array [ + 20, + 24, + ], + "type": "TSNullKeyword", + }, + Object { + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + }, + "start": Object { + "column": 27, + "line": 1, }, }, - "name": "x", "range": Array [ 27, - 28, + 36, ], - "type": "Identifier", + "type": "TSUndefinedKeyword", }, - "init": Object { + ], + }, + }, + }, + "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": 32, - "line": 3, + "column": 24, + "line": 2, }, "start": Object { - "column": 19, - "line": 3, + "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 [ - 31, - 44, + 65, + 71, ], - "raw": "'hello world'", - "type": "Literal", - "value": "hello world", - }, - "loc": Object { - "end": Object { - "column": 32, - "line": 3, - }, - "start": Object { - "column": 15, - "line": 3, - }, + "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 { @@ -68001,581 +115232,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 { - "abstract": false, - "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, - }, - "start": Object { - "column": 18, - "line": 7, + "type": "TSBooleanKeyword", }, - }, - "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, @@ -68584,14 +115555,14 @@ Object { }, "range": Array [ 0, - 231, + 161, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 6, + "column": 3, "line": 1, }, "start": Object { @@ -68601,28 +115572,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 { @@ -68640,346 +115611,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, + 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": ":", @@ -68987,17 +115778,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", @@ -69005,251 +115796,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": ":", @@ -69257,125 +116066,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 { @@ -69385,9 +116210,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 { @@ -69402,14 +116280,14 @@ Object { }, "range": Array [ 0, - 33, + 27, ], "sourceType": "script", "tokens": Array [ Object { "loc": Object { "end": Object { - "column": 7, + "column": 4, "line": 1, }, "start": Object { @@ -69419,64 +116297,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/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)); }); }); diff --git a/tests/lib/semantic-diagnostics-enabled.ts b/tests/lib/semantic-diagnostics-enabled.ts new file mode 100644 index 0000000..e983e67 --- /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 "errorOnTypeScriptSyntacticAndSemanticIssues" enabled', () => { + testFiles.forEach(filename => { + const code = shelljs.cat(`${path.resolve(FIXTURES_DIR, filename)}`); + const config = { + loc: true, + range: true, + tokens: true, + errorOnUnknownASTType: true, + errorOnTypeScriptSyntacticAndSemanticIssues: 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 d0c1f37..db1671c 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( @@ -77,48 +75,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 +117,49 @@ 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 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); @@ -178,6 +188,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 diff --git a/yarn.lock b/yarn.lock index 39a2805..8924e5c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,42 +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-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.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.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.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 "^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.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.0.0" + "@babel/types" "^7.2.2" jsesc "^2.5.1" lodash "^4.17.10" source-map "^0.5.0" @@ -46,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" @@ -59,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" @@ -67,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" @@ -75,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" @@ -82,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" @@ -90,57 +93,66 @@ "@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" + 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": 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" @@ -149,17 +161,19 @@ "@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" + 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": 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" @@ -167,137 +181,148 @@ "@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" + 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/helpers@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.1.0.tgz#429bf0f0020be56a4242883432084e3d70a8a141" - dependencies: - "@babel/template" "^7.1.0" - "@babel/traverse" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/types" "^7.2.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" +"@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: - 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.2.0" "@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.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.1.0.tgz#a7cd42cb3c12aec52e24375189a47b39759b783e" +"@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" +"@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" +"@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" +"@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" +"@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" +"@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" +"@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" +"@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" +"@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" +"@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" +"@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" +"@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" +"@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.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.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" +"@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" @@ -308,83 +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" +"@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.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.0.0.tgz#68e911e1935dda2f06b6ccbbf184ffb024e9d43a" +"@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" +"@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" +"@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" +"@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" +"@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" +"@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" +"@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" +"@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" +"@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.0.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.0.0.tgz#8873d876d4fee23209decc4d1feab8f198cf2df4" +"@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" +"@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" @@ -392,19 +429,22 @@ "@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" +"@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" +"@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" @@ -413,98 +453,107 @@ "@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" +"@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" +"@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" +"@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" +"@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" +"@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" +"@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" + 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.0" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.1.0.tgz#e67ea5b0441cfeab1d6f41e9b5c79798800e8d11" + 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.0.0" - "@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" @@ -512,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" @@ -521,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", "@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.0" - "@babel/types" "^7.0.0" + "@babel/parser" "^7.2.2" + "@babel/types" "^7.2.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.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.0.0" + "@babel/generator" "^7.2.2" "@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.2.3" + "@babel/types" "^7.2.2" + 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.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" 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" @@ -565,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" @@ -583,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" @@ -626,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" @@ -637,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" @@ -646,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" @@ -654,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" @@ -666,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" @@ -692,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.1" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-3.1.1.tgz#ede9afefaa4d6b7584169e12346425c6fbb45cc3" + integrity sha512-KPkoTvKwCTetu/UqonLs1pfwFO5HAqTv/Ksp9y4NAg//ZgUCpvJsT4Hrst85uEzJvkB8+LxKyR4Bfv2X8O4cmQ== + dependencies: + deepmerge "3.0.0" + 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: - before-after-hook "^1.1.0" + "@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.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" 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" @@ -734,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.7" + resolved "https://registry.yarnpkg.com/@semantic-release/github/-/github-5.2.7.tgz#d9eb8bcc9332a02b85458ddb0988a17023e2b460" + integrity sha512-cWQhM9bdBv8KAwClmwM64Mo3vsOHVM2aJAGI6K3qbJfJ3GsLJLh1hTi+rMd5EkZ2DA8zUUHCiAJZ3ujMvUB0yg== 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" @@ -753,32 +853,31 @@ 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.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.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" - 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" @@ -786,223 +885,244 @@ 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" - 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" 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.119" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.119.tgz#be847e5f4bc3e35e46d041c394ead8b603ad8b39" + integrity sha512-Z3TNyBL8Vd/M9D9Ms2S3LmFq2sSMzahodD6rCS9V2N44HUMINb75jNkSuwAx7eo2ufqTdfOdtGQpNbieUjPQmw== "@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.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" 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" + 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" "*" 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@^5.0.0, acorn@^5.5.3: - version "5.7.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8" +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.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.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.2.tgz#caceccf474bf3fc3ce3b147443711a24063cc30d" + integrity sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g== 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" @@ -1010,120 +1130,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, 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" + integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= dependencies: chalk "^1.1.3" esutils "^2.0.2" @@ -1132,6 +1279,7 @@ babel-code-frame@6.26.0, 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" @@ -1156,6 +1304,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" @@ -1169,13 +1318,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" @@ -1183,12 +1334,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" @@ -1198,14 +1351,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" @@ -1214,6 +1370,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" @@ -1221,6 +1378,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" @@ -1233,6 +1391,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" @@ -1240,6 +1399,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" @@ -1250,6 +1410,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" @@ -1264,27 +1425,27 @@ 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" 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" + 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" @@ -1297,16 +1458,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" @@ -1317,20 +1481,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" +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.11.0" - resolved "https://registry.yarnpkg.com/bottleneck/-/bottleneck-2.11.0.tgz#d91e194ef071ddb88312f13454405e52067ea9cc" + 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" 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" @@ -1343,6 +1511,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" @@ -1350,6 +1519,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" @@ -1358,6 +1528,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" @@ -1371,62 +1542,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" +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.30000884" - electron-to-chromium "^1.3.62" - node-releases "^1.0.0-alpha.11" + caniuse-lite "^1.0.30000921" + electron-to-chromium "^1.3.92" + node-releases "^1.1.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" @@ -1443,27 +1626,29 @@ 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.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: 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" @@ -1475,9 +1660,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.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" @@ -1490,58 +1676,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.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" 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" @@ -1549,17 +1761,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" @@ -1568,6 +1775,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" @@ -1578,32 +1786,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.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== 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" @@ -1613,27 +1827,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" @@ -1643,27 +1862,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" @@ -1672,16 +1886,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" @@ -1689,98 +1906,105 @@ 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" + 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" 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" 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== dependencies: ini "^1.3.4" proto-list "~1.2.1" @@ -1788,6 +2012,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" @@ -1799,27 +2024,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" @@ -1832,10 +2061,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" @@ -1843,6 +2074,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" @@ -1853,8 +2085,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" @@ -1864,19 +2097,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" @@ -1888,18 +2119,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" + 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" 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" @@ -1907,9 +2142,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" @@ -1917,12 +2154,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" @@ -1931,6 +2170,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" @@ -1941,30 +2181,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" @@ -1975,130 +2221,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" + 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" 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.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== dependencies: ms "^2.1.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= 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@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" + 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" @@ -2106,32 +2380,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" @@ -2139,10 +2420,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" @@ -2150,38 +2433,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" @@ -2191,6 +2481,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" @@ -2198,30 +2489,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.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" 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.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" @@ -2229,22 +2526,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" @@ -2253,30 +2554,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" @@ -2288,28 +2594,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" @@ -2322,6 +2634,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" @@ -2334,6 +2647,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" @@ -2346,6 +2660,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" @@ -2355,23 +2670,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" @@ -2384,46 +2698,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" @@ -2437,47 +2758,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" @@ -2485,16 +2815,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" @@ -2502,6 +2835,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" @@ -2512,6 +2846,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" @@ -2521,6 +2856,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" @@ -2529,14 +2865,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" @@ -2544,25 +2883,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" @@ -2570,38 +2913,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" @@ -2609,13 +2954,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" @@ -2624,12 +2971,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" @@ -2638,6 +2987,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" @@ -2647,10 +2997,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" @@ -2658,6 +3010,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" @@ -2667,10 +3020,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" @@ -2681,13 +3036,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" @@ -2701,38 +3058,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" @@ -2744,6 +3109,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" @@ -2751,22 +3117,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" @@ -2774,12 +3128,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" @@ -2787,10 +3143,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" @@ -2799,9 +3157,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.3: 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" @@ -2813,20 +3172,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" @@ -2838,7 +3201,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" @@ -2853,31 +3217,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.5.0" + resolved "https://registry.yarnpkg.com/got/-/got-9.5.0.tgz#6fd0312c6b694c0a11d9119d95fd7daed174eb49" + integrity sha512-N+4kb6i9t1lauJ4NwLVVoFVLxZNa6i+iivtNzCSVw7+bVbTXoq0qXctdd8i9rj3lrI0zDk5NGzcO4bfpEP6Uuw== dependencies: - "@sindresorhus/is" "^0.11.0" + "@sindresorhus/is" "^0.14.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" +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== 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" @@ -2885,55 +3254,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" @@ -2942,6 +3306,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" @@ -2950,10 +3315,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" @@ -2961,12 +3328,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" @@ -2974,32 +3343,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" @@ -3007,6 +3383,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" @@ -3015,6 +3392,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" @@ -3022,64 +3400,72 @@ 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" @@ -3087,14 +3473,17 @@ import-local@^1.0.0: 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" @@ -3102,14 +3491,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" @@ -3123,97 +3515,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" @@ -3222,6 +3633,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" @@ -3230,76 +3642,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" @@ -3307,144 +3734,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" @@ -3453,82 +3906,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" +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== dependencies: ansi-escapes "^3.0.0" chalk "^2.0.1" @@ -3542,18 +4004,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" @@ -3567,49 +4029,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" @@ -3618,6 +4086,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" @@ -3625,53 +4094,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" @@ -3682,47 +4158,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" @@ -3731,14 +4213,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" @@ -3749,25 +4231,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" @@ -3778,18 +4263,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" @@ -3799,6 +4276,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" @@ -3807,31 +4285,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" +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.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" @@ -3839,10 +4323,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" @@ -3874,58 +4360,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" @@ -3935,70 +4434,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" @@ -4006,6 +4514,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" @@ -4025,6 +4534,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" @@ -4032,6 +4542,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" @@ -4045,6 +4556,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" @@ -4072,10 +4584,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" @@ -4083,35 +4597,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" @@ -4122,6 +4639,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" @@ -4131,6 +4649,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" @@ -4138,6 +4657,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" @@ -4145,6 +4665,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" @@ -4152,12 +4673,14 @@ 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._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" @@ -4165,82 +4688,112 @@ lodash._baseuniq@~4.6.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._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.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" @@ -4248,81 +4801,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" @@ -4330,31 +4896,44 @@ 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" +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" + 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" @@ -4371,6 +4950,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" @@ -4387,36 +4967,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" @@ -4425,26 +5012,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" @@ -4453,6 +5045,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" @@ -4467,6 +5060,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" @@ -4481,20 +5075,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" @@ -4513,6 +5111,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" @@ -4528,47 +5127,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" @@ -4576,31 +5172,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.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" 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" @@ -4616,6 +5218,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" @@ -4631,6 +5234,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" @@ -4638,16 +5242,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" @@ -4659,22 +5266,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.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" 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" @@ -4691,10 +5303,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" @@ -4703,32 +5317,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" @@ -4746,23 +5366,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" @@ -4775,21 +5399,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.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" "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" @@ -4797,6 +5424,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" @@ -4806,41 +5434,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.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" + 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" 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" @@ -4854,19 +5495,22 @@ 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" 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: - version "1.1.11" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.11.tgz#84e8c683cbe7867d34b1d357d893ce29e28a02de" +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== dependencies: ignore-walk "^3.0.1" npm-bundled "^1.0.1" @@ -4874,19 +5518,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" @@ -4894,6 +5542,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" @@ -4912,6 +5561,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" @@ -4923,6 +5573,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" @@ -4934,24 +5585,28 @@ 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" which "^1.2.10" npm@^6.3.0: - version "6.4.1" - resolved "https://registry.yarnpkg.com/npm/-/npm-6.4.1.tgz#4f39f9337b557a28faed4a771d5c8802d6b4288b" + 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" @@ -4960,28 +5615,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" @@ -5015,7 +5670,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" @@ -5023,7 +5678,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" @@ -5041,14 +5696,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" @@ -5066,6 +5721,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" @@ -5075,44 +5731,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" @@ -5120,6 +5780,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" @@ -5127,26 +5788,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: +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== 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" @@ -5154,6 +5827,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" @@ -5165,10 +5839,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" @@ -5177,100 +5853,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" +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" 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" @@ -5280,6 +5985,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" @@ -5310,6 +6016,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" @@ -5318,10 +6025,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" @@ -5331,64 +6040,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: +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== 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" @@ -5397,40 +6111,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" @@ -5438,53 +6160,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" @@ -5492,18 +6217,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" @@ -5511,6 +6240,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" @@ -5518,38 +6248,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: - version "1.1.29" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67" +psl@^1.1.24, psl@^1.1.28: + 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" 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" @@ -5557,6 +6290,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" @@ -5564,6 +6298,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" @@ -5572,26 +6307,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" @@ -5599,14 +6340,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" @@ -5615,6 +6359,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" @@ -5624,12 +6369,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" @@ -5643,6 +6390,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" @@ -5654,6 +6402,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" @@ -5664,6 +6413,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" @@ -5671,6 +6421,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" @@ -5678,6 +6429,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" @@ -5685,6 +6437,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" @@ -5693,6 +6446,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" @@ -5701,6 +6455,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" @@ -5709,12 +6464,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" @@ -5726,7 +6483,8 @@ 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" @@ -5736,6 +6494,7 @@ readable-stream@~1.1.10: 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" @@ -5743,20 +6502,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" @@ -5764,60 +6526,75 @@ 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: +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" + 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" 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" + 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" 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" @@ -5825,54 +6602,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" +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" +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" 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" @@ -5895,46 +6682,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" @@ -5942,115 +6708,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: - version "1.8.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" +resolve@1.x, resolve@^1.1.6, resolve@^1.3.2: + 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" 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" @@ -6066,26 +6848,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.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.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" @@ -6102,40 +6885,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, 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== -"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" @@ -6145,6 +6932,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" @@ -6154,6 +6942,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" @@ -6161,16 +6950,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" @@ -6179,14 +6971,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" @@ -6195,30 +6990,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" @@ -6227,12 +7029,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" @@ -6246,6 +7050,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" @@ -6253,6 +7058,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" @@ -6260,13 +7066,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" @@ -6274,10 +7082,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" @@ -6285,6 +7095,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" @@ -6295,19 +7106,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" @@ -6315,113 +7121,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.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" 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.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" 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.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" - 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: +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== 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" @@ -6429,10 +7247,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" @@ -6440,6 +7260,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" @@ -6447,6 +7268,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" @@ -6454,18 +7276,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" @@ -6473,6 +7299,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" @@ -6481,6 +7308,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" @@ -6488,105 +7316,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" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== 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" - 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== 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" +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== 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" @@ -6594,75 +7434,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" @@ -6670,38 +7525,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.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" @@ -6710,7 +7572,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" @@ -6719,18 +7581,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" @@ -6738,72 +7604,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.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.1.tgz#3362ba9dd1e482ebb2355b02dfe8bcd19a2c7c96" - -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" +typescript@~3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.1.tgz#0b7a04b8cf3868188de914d9568bd030f0c56192" + 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" @@ -6811,55 +7676,65 @@ 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" 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== 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" @@ -6867,10 +7742,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" @@ -6883,56 +7760,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" @@ -6940,12 +7835,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" @@ -6954,18 +7851,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" @@ -6973,26 +7873,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" @@ -7001,71 +7915,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" @@ -7074,56 +8000,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" @@ -7139,11 +8080,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" @@ -7153,13 +8095,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"