swc/crates/swc_ecma_parser/tests/tsc/importCallExpressionAsyncES2020.json

775 lines
24 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 60,
"end": 556,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 60,
"end": 136,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 82,
"end": 84,
"ctxt": 0
},
"value": "fn",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 67,
"end": 136,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 87,
"end": 136,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 93,
"end": 127,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 99,
"end": 127,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 99,
"end": 102,
"ctxt": 0
},
"value": "req",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 105,
"end": 127,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 111,
"end": 127,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 111,
"end": 117,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 118,
"end": 126,
"ctxt": 0
},
"value": "./test",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
}
},
"definite": false
}
]
}
]
},
"generator": false,
"async": true,
"typeParameters": null,
"returnType": null
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 138,
"end": 237,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 151,
"end": 154,
"ctxt": 0
},
"value": "cl1",
"optional": false
},
"declare": false,
"span": {
"start": 145,
"end": 237,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 161,
"end": 235,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 174,
"end": 175,
"ctxt": 0
},
"value": "m",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 161,
"end": 235,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 178,
"end": 235,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 188,
"end": 222,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 194,
"end": 222,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 194,
"end": 197,
"ctxt": 0
},
"value": "req",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 200,
"end": 222,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 206,
"end": 222,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 206,
"end": 212,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 213,
"end": 221,
"ctxt": 0
},
"value": "./test",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
}
},
"definite": false
}
]
}
]
},
"generator": false,
"async": true,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": "public",
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 239,
"end": 340,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 246,
"end": 340,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 252,
"end": 340,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 252,
"end": 255,
"ctxt": 0
},
"value": "obj",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 258,
"end": 340,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 264,
"end": 265,
"ctxt": 0
},
"value": "m",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 267,
"end": 338,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 279,
"end": 338,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 289,
"end": 323,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 295,
"end": 323,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 295,
"end": 298,
"ctxt": 0
},
"value": "req",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 301,
"end": 323,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 307,
"end": 323,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 307,
"end": 313,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 314,
"end": 322,
"ctxt": 0
},
"value": "./test",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
}
},
"definite": false
}
]
}
]
},
"async": true,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
]
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 342,
"end": 475,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 355,
"end": 358,
"ctxt": 0
},
"value": "cl2",
"optional": false
},
"declare": false,
"span": {
"start": 349,
"end": 475,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 365,
"end": 473,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 372,
"end": 373,
"ctxt": 0
},
"value": "p",
"optional": false
},
"value": {
"type": "ObjectExpression",
"span": {
"start": 376,
"end": 473,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 386,
"end": 387,
"ctxt": 0
},
"value": "m",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 389,
"end": 467,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 401,
"end": 467,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 415,
"end": 449,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 421,
"end": 449,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 421,
"end": 424,
"ctxt": 0
},
"value": "req",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 427,
"end": 449,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 433,
"end": 449,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 433,
"end": 439,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 440,
"end": 448,
"ctxt": 0
},
"value": "./test",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
}
},
"definite": false
}
]
}
]
},
"async": true,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
]
},
"typeAnnotation": null,
"isStatic": false,
"decorators": [],
"accessibility": "public",
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 477,
"end": 556,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 484,
"end": 556,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 490,
"end": 556,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 490,
"end": 491,
"ctxt": 0
},
"value": "l",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 494,
"end": 556,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 506,
"end": 556,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 512,
"end": 546,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 518,
"end": 546,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 518,
"end": 521,
"ctxt": 0
},
"value": "req",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 524,
"end": 546,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 530,
"end": 546,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 530,
"end": 536,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 537,
"end": 545,
"ctxt": 0
},
"value": "./test",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
],
"typeArguments": null
}
},
"definite": false
}
]
}
]
},
"async": true,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
}
}
],
"interpreter": null
}