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

755 lines
24 KiB
JSON

{
"type": "Module",
"span": {
"start": 73,
"end": 569,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 73,
"end": 149,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 95,
"end": 97,
"ctxt": 0
},
"value": "fn",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 80,
"end": 149,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 100,
"end": 149,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 106,
"end": 140,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 112,
"end": 140,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 112,
"end": 115,
"ctxt": 0
},
"value": "req",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 118,
"end": 140,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 124,
"end": 140,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 124,
"end": 130,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 131,
"end": 139,
"ctxt": 0
},
"value": "./test",
"raw": "'./test'"
}
}
],
"typeArguments": null
}
},
"definite": false
}
]
}
]
},
"generator": false,
"async": true,
"typeParameters": null,
"returnType": null
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 151,
"end": 250,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 164,
"end": 167,
"ctxt": 0
},
"value": "cl1",
"optional": false
},
"declare": false,
"span": {
"start": 158,
"end": 250,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 174,
"end": 248,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 187,
"end": 188,
"ctxt": 0
},
"value": "m",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 174,
"end": 248,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 191,
"end": 248,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 201,
"end": 235,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 207,
"end": 235,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 207,
"end": 210,
"ctxt": 0
},
"value": "req",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 213,
"end": 235,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 219,
"end": 235,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 219,
"end": 225,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 226,
"end": 234,
"ctxt": 0
},
"value": "./test",
"raw": "'./test'"
}
}
],
"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": 252,
"end": 353,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 259,
"end": 353,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 265,
"end": 353,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 265,
"end": 268,
"ctxt": 0
},
"value": "obj",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 271,
"end": 353,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 277,
"end": 278,
"ctxt": 0
},
"value": "m",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 280,
"end": 351,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 292,
"end": 351,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 302,
"end": 336,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 308,
"end": 336,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 308,
"end": 311,
"ctxt": 0
},
"value": "req",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 314,
"end": 336,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 320,
"end": 336,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 320,
"end": 326,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 327,
"end": 335,
"ctxt": 0
},
"value": "./test",
"raw": "'./test'"
}
}
],
"typeArguments": null
}
},
"definite": false
}
]
}
]
},
"async": true,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
]
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 355,
"end": 488,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 368,
"end": 371,
"ctxt": 0
},
"value": "cl2",
"optional": false
},
"declare": false,
"span": {
"start": 362,
"end": 488,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 378,
"end": 486,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 385,
"end": 386,
"ctxt": 0
},
"value": "p",
"optional": false
},
"value": {
"type": "ObjectExpression",
"span": {
"start": 389,
"end": 486,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 399,
"end": 400,
"ctxt": 0
},
"value": "m",
"optional": false
},
"value": {
"type": "ArrowFunctionExpression",
"span": {
"start": 402,
"end": 480,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 414,
"end": 480,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 428,
"end": 462,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 434,
"end": 462,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 434,
"end": 437,
"ctxt": 0
},
"value": "req",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 440,
"end": 462,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 446,
"end": 462,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 446,
"end": 452,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 453,
"end": 461,
"ctxt": 0
},
"value": "./test",
"raw": "'./test'"
}
}
],
"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": 490,
"end": 569,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 497,
"end": 569,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 503,
"end": 569,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 503,
"end": 504,
"ctxt": 0
},
"value": "l",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrowFunctionExpression",
"span": {
"start": 507,
"end": 569,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 519,
"end": 569,
"ctxt": 0
},
"stmts": [
{
"type": "VariableDeclaration",
"span": {
"start": 525,
"end": 559,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 531,
"end": 559,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 531,
"end": 534,
"ctxt": 0
},
"value": "req",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "AwaitExpression",
"span": {
"start": 537,
"end": 559,
"ctxt": 0
},
"argument": {
"type": "CallExpression",
"span": {
"start": 543,
"end": 559,
"ctxt": 0
},
"callee": {
"type": "Import",
"span": {
"start": 543,
"end": 549,
"ctxt": 0
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 550,
"end": 558,
"ctxt": 0
},
"value": "./test",
"raw": "'./test'"
}
}
],
"typeArguments": null
}
},
"definite": false
}
]
}
]
},
"async": true,
"generator": false,
"typeParameters": null,
"returnType": null
},
"definite": false
}
]
}
}
],
"interpreter": null
}